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

Update references from "import assertions" to "import attributes" #9069

Merged
merged 2 commits into from
Mar 24, 2023

Conversation

nicolo-ribaudo
Copy link
Contributor

@nicolo-ribaudo nicolo-ribaudo commented Mar 23, 2023

This PR updates all references to import assertions to the new version of the proposal, now called import attributes. The proposal has reached consensus for Stage 3 during the March 2023 TC39 meeting, pending editorial reviews and tc39/proposal-import-attributes#133.

Significant changes:

  • import attributes can affect how a module is loaded and can be part of the cache key. This removes the willful violation HTML had in its usage of import assertions, and unblocks CSS and JSON module scripts and CSP #7233
  • the keyword has been changed from assert to with. Due to existing support in Chrome/Node.js/Deno the assert keyword will stick around for a while, and the V8 team will investigate the possibility of removing it.

/index.html ( diff )
/infrastructure.html ( diff )
/references.html ( diff )
/scripting.html ( diff )
/webappapis.html ( diff )

@domenic domenic added normative change topic: script integration Better coordination across standards needed labels Mar 24, 2023
@domenic domenic merged commit d131bfa into whatwg:main Mar 24, 2023
@nicolo-ribaudo nicolo-ribaudo deleted the import-attributes branch March 24, 2023 14:54
@GeoffreyBooth
Copy link

So as far as JSON imports are concerned, it seems like we're renaming assert to with and that's all that changes? The type is still part of the cache key and required?

@domenic
Copy link
Member

domenic commented Mar 25, 2023

Yes, but #7233 will probably change the fetch destination too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration Better coordination across standards needed normative change topic: script
Development

Successfully merging this pull request may close these issues.

3 participants