-
-
Notifications
You must be signed in to change notification settings - Fork 539
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
feat(biome_js_parser): support defer attribute in import statements #4301
Conversation
6a1bead
to
a1d1c91
Compare
a1d1c91
to
b01dad3
Compare
CodSpeed Performance ReportMerging #4301 will improve performances by 6.06%Comparing Summary
Benchmarks breakdown
|
28d1e8a
to
2286c37
Compare
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.
Thank you
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.
@fireairforce can you please follow up with another PR and address my comments? I think there are some cases that we need to cover
@@ -178,6 +178,16 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b | |||
|
|||
### Parser | |||
|
|||
#### New features | |||
|
|||
- JS Parser support defer attribute in import statements ([#4215](https://github.com/biomejs/biome/issues/4215)). |
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.
- JS Parser support defer attribute in import statements ([#4215](https://github.com/biomejs/biome/issues/4215)). | |
- Add support for parsing the defer attribute in import statements ([#4215](https://github.com/biomejs/biome/issues/4215)). |
'type'? | ||
'defer'? |
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.
Is this correct? Did you check if typescript will add the keyword defer
after type
? It would be nice if you could provide this information at least in the PR description
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.
this is wrong, microsoft/TypeScript#59391, so maybe i need to support a new data structure like JsDeferImportNamespaceClause
to support this case:
JsDeferImportNamespaceClause =
'defer'?
namespace_specifier: JsNamespaceImportSpecifier
'from'
source: AnyJsModuleSource
assertion: JsImportAssertion?
What do you think?
// test js import_defer_clause | ||
// import defer * as yNamespace from "y"; |
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.
import type defer * as yNamespace from "y";
is missing, we should add a test case for that
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.
this case maybe need to be an error.
ok, i will follow this later |
…ements (biomejs#4301)" This reverts commit 27ff2a7.
Summary
closes: #4215
Test Plan