Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust-based JS import scanner #15

Open
zkat opened this issue Nov 9, 2019 · 1 comment
Open

Rust-based JS import scanner #15

zkat opened this issue Nov 9, 2019 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@zkat
Copy link
Contributor

zkat commented Nov 9, 2019

One super-critical part of the dependency download process for dstopic is the ability to batch downloads according to what will probably be required. To this end:

We need a Rust-based parser that can handle:

  • Modern JS
  • Typescript
  • JSX

And return a list of toplevel import-ed and require-ed paths. dstopic will use this to speed up dependency downloads by batching requests together. Note that the parser doesn't need to completely support the above -- just enough to extract imports and requires, and it doesn't need to handle dynamic ones, since this is largely an optimization. In theory, this could even be as simple as a regex, but I'd rather go the parser route if possible.

After doing some research, I found RESSA, which looks like it would be up to the task -- most other existing Rust-based parsers seem to be fairly incomplete, or designed specifically for Neon-based usage (like swc).

(original thread)

@zkat zkat added help wanted Extra attention is needed good first issue Good for newcomers labels Nov 9, 2019
@zkat
Copy link
Contributor Author

zkat commented Nov 9, 2019

There's a PR for this by @MilanLoveless over at entropic-dev/dstopic#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant