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

Normative: Add Import Attributes #3057

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

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented May 8, 2023

This proposal (https://tc39.es/proposal-import-attributes/, https://github.com/tc39/proposal-import-attributes) reached stage 3 during the March 2023 meeting, conditional on stage 3 reviews. I'm opening this PR before "real" stage 3 to help editors reviewing the full spec changes.

The proposal has already been integrated in HTML: https://html.spec.whatwg.org/#hostloadimportedmodule

PREVIEW: https://ci.tc39.es/preview/tc39/ecma262/pull/3057
DIFF: https://arai-a.github.io/ecma262-compare/?pr=3057 (note: the diff doesn't mark deprecated sections)

spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
@nicolo-ribaudo nicolo-ribaudo added normative change Affects behavior required to correctly evaluate some ECMAScript source text pending stage 4 This proposal has not yet achieved stage 4, but may otherwise be ready to merge. proposal This is related to a specific proposal, and will be closed/merged when the proposal reaches stage 4. needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 and removed pending stage 4 This proposal has not yet achieved stage 4, but may otherwise be ready to merge. labels May 8, 2023
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
@nicolo-ribaudo
Copy link
Member Author

nicolo-ribaudo commented May 22, 2023

@tc39/ecma262-editors Currently the only remaining condition for this proposal to be actually Stage 3 is the editorial review. It'd be great if you have time to do it :)

@bakkot bakkot added the editor call to be discussed in the next editor call label May 24, 2023
Copy link
Contributor

@bakkot bakkot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than comments.

spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Show resolved Hide resolved
@nicolo-ribaudo
Copy link
Member Author

I pushed two more normative commits, that are oversights from the assert->with migration:

  1. Added assert as an alternative to with also in export ... from statements
  2. Removed the [no LineTerminator here] restriction before with

spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
@nicolo-ribaudo
Copy link
Member Author

PR updated to remove support for float and bigint literal keys, as per consensus in the TC39 2023-09 meeting.

spec.html Outdated Show resolved Hide resolved
@nicolo-ribaudo
Copy link
Member Author

PR updated to remove the assert variant, as per consensus in the TC39 2024-07 meeting.

@tc39/ecma262-editors I'd like to open a PR for https://tc39.es/proposal-json-modules/, which I plan to propose for stage 4 at the next meeting. The PR for that proposal needs to be based on top of this one. Guy would also like to rebase #3094 on top of this PR. What approach do you prefer?

  1. I push this PR's branch to a temporary branch in this repository, and we open PRs targeting it
  2. those PRs include commits from this one
  3. we open those PRs in my fork, and you review there

@michaelficarra
Copy link
Member

@nicolo-ribaudo I prefer 1 but 3 is also fine.

@nicolo-ribaudo
Copy link
Member Author

It turns out I don't have push access to this repo. Could somebody (@michaelficarra? @ljharb?) push this PR's branch to this repo so I can open a PR targeting it? :) Or give me push access, I don't know what's the policy.

@ryzokuken
Copy link
Member

I did it for you at https://github.com/tc39/ecma262/tree/import-attributes.

* Add Import Attributes proposal
* `npm run format`
* Updates from review
* Changes from review
* Do not re-define ImportDeclaration
* Add `assert` deprecated syntax to `export ... from`
* Remove `[no LineTerminator here]` before `with`
* Use optional symbols to reduce grammar
* Update ImportEntries and ExportEntry to use ModuleRequest Records
* Review from Michael
* Replace AttributeKey with LiteralPropertyName
* Separate ModuleRequest and LoadedModuleRequest fields
* Validate attrs when lodaing deps and not when parsing
* Merge `AssertClause` into `WithClause`, and fix missing SDOs
* Fix type annotation
* Simplify AttributesKeyword
* Reviews
* Review
* Remove support for float and bigint literal keys
* Update wording
spec.html Show resolved Hide resolved
spec.html Show resolved Hide resolved
spec.html Show resolved Hide resolved
spec.html Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Show resolved Hide resolved
spec.html Show resolved Hide resolved
@nicolo-ribaudo
Copy link
Member Author

@jmdyck Done, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has test262 tests normative change Affects behavior required to correctly evaluate some ECMAScript source text pending stage 4 This proposal has not yet achieved stage 4, but may otherwise be ready to merge. proposal This is related to a specific proposal, and will be closed/merged when the proposal reaches stage 4.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants