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

JS: More robust CommonJS/ES2015 detection logic for extractor #16061

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

RasmusWL
Copy link
Member

review commit-by-commit recommended.

These changes caused a few unrelated trap files to change as well, I think these are all for programs with syntax-errors, but would certainly like you to take a look at these @asgerf (see 60944a9)

I think the change-note for this need to go into the internal repo for the CLI.

Notice the TRAP lines

```
is_module(#20001)
is_es2015_module(#20001)
```
Should hopefully make it easier to review these changes to have it split into its' own commit :)
Created shared AbstractDetector to not duplicate all the tedious logic
;)

I took inspiration from the tests in  `javascript/extractor/tests/esnext/input/dynamic-import.js`
As I see it, these all seem to have invalid code initially anyway, but
this is definitely something a JS expert should review :)
@RasmusWL RasmusWL requested a review from a team as a code owner March 26, 2024 16:05
@github-actions github-actions bot added the JS label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant