-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: Support import attributes #14484
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming the evaluation looks good 👍
The evaluations could be on a bigger set of sources. |
The evaluations look good. The only interesting results were syntax that changed locations reported on tests in babel/babel on files like https://github.com/babel/babel/blob/main/packages/babel-parser/test/fixtures/experimental/module-attributes/valid-syntax-with-attributes/input.js import foo from "foo.json" with type: "json"; The tests use the |
Adds support for import attributes, an evolution of import assertions. For example:
When implementing #12382, we thought the syntax of import assertions was unlikely to change. However, it did. The only difference is that instead of
assert
they now usewith
. The old syntax is still allowed but deprecated.In the QL library:
getImportAssertion()
predicates are deprecated, their new name isgetImportAttributes()
DynamicImportExpr::getImportAttributes()
is deprecated and renamed togetImportOptions()
Evaluation was uneventful.
Commit-by-commit review recommended.