You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original commit message:
Reland "[import-attributes] Implement import attributes, with `assert` fallback"
This is a reland of commit 159c82c5e6392e78b9bba7161b1bed6e23758984, to set the correct author.
Original change's description:
> [import-attributes] Implement import attributes, with `assert` fallback
>
> In the past six months, the old import assertions proposal has been
> renamed to "import attributes" with the follwing major changes:
> 1. the keyword is now `with` instead of `assert`
> 2. unknown assertions cause an error rather than being ignored
>
> To preserve backward compatibility with existing applications that use
> `assert`, implementations _can_ keep it around as a fallback for both
> the static and dynamic forms.
>
> Additionally, the proposal has some minor changes that came up during
> the stage 3 reviews:
> 3. dynamic import first reads all the attributes, and then verifies
> that they are all strings
> 4. there is no need for a `[no LineTerminator here]` restriction before
> the `with` keyword
> 5. static import syntax allows any `LiteralPropertyName` as attribute
> keys, to align with every other syntax using key-value pairs
>
> The new syntax is enabled by a new `--harmony-import-attributes` flag,
> disabled by default. However, the new behavioral changes also apply to
> the old syntax that is under the `--harmony-import-assertions` flag.
>
> This patch does implements (1), (3), (4) and (5). Handling of unknown
> import assertions was not implemented directly in V8, but delegated
> to embedders. As such, it will be implemented separately in d8 and
> Chromium.
>
> To simplify the review, this patch doesn't migrate usage of the term
> "assertions" to "attributes". There are many variables and internal
> functions that could be easily renamed as soon as this patch landes.
> There is one usage in the public API
> (`ModuleRequest::GetImportAssertions`) that will probably need to be
> aliased and then removed following the same process as for other API
> breaking changes.
>
> Bug: v8:13856
> Change-Id: I78b167348d898887332c5ca7468bc5d58cd9b1ca
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4632799
> Commit-Queue: Shu-yu Guo <[email protected]>
> Reviewed-by: Adam Klein <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#89110}
Bug: v8:13856
Change-Id: Ic59aa3bd9101618e47ddf6cf6d6416a3a438ebec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4705558
Commit-Queue: Shu-yu Guo <[email protected]>
Reviewed-by: Shu-yu Guo <[email protected]>
Reviewed-by: Adam Klein <[email protected]>
Cr-Commit-Position: refs/heads/main@{#89115}
Refs: v8/v8@a0fd320
PR-URL: #51136
Reviewed-By: Yagiz Nizipli <[email protected]>
0 commit comments