| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Implementation LGTM, discussion is ongoing though
Sorry, something went wrong.
|
Since the discussion seems to be narrowed to around how to deal w/ imports that lack the assertion, and it seems it would move from early error -> working at runtime. I think we should probably land this PR and continue discussion elsewhere unless there are clear concerns about moving those early errors into working at runtime code from this implementation in this PR. I tried to read the discussion again but don't see anything that stands out to me as absolutely concerned with the implementation here. |
Sorry, something went wrong.
There was a problem hiding this comment.
RSLGTM
Sorry, something went wrong.
There was a problem hiding this comment.
should we link out to the ongoing discussion in HTML spec?
Sorry, something went wrong.
There was a problem hiding this comment.
I’m not sure what the best link would be. There’s WebAssembly/esm-integration#42 or tc39/proposal-import-attributes#19 or others. It also feels a little messy to link to a discussion thread as opposed to a decision outcome. But if you have a link in particular you recommend, though, I’m happy to add it.
Sorry, something went wrong.
There was a problem hiding this comment.
Blocking as per my comments in https://github.com/nodejs/node/discussions/40790#discussioncomment-1647538. to summarize:
I'm in contact with @GeoffreyBooth with regards to next steps on this topic.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with one nit and assuming Guy concern can be resolved.
Sorry, something went wrong.
Commit Queue failed- Loading data for nodejs/node/pull/40785 ✔ Done loading data for nodejs/node/pull/40785 ----------------------------------- PR info ------------------------------------ Title Module: Import assertions improvements (#40785) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch GeoffreyBooth:more-import-assertion-types -> nodejs:master Labels module, esm, author ready, loaders Commits 2 - doc: fix spelling of 'WebAssembly' - module: import assertions improvements Committers 1 - Geoffrey Booth PR-URL: https://github.com/nodejs/node/pull/40785 Reviewed-By: James M Snell Reviewed-By: Bradley Farias Reviewed-By: Myles Borins Reviewed-By: Guy Bedford Reviewed-By: Antoine du Hamel ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/40785 Reviewed-By: James M Snell Reviewed-By: Bradley Farias Reviewed-By: Myles Borins Reviewed-By: Guy Bedford Reviewed-By: Antoine du Hamel -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - doc: fix spelling of 'WebAssembly' ⚠ - module: import assertions improvements ℹ This PR was created on Thu, 11 Nov 2021 05:02:37 GMT ✔ Approvals: 5 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/40785#pullrequestreview-805386076 ✔ - Bradley Farias (@bmeck): https://github.com/nodejs/node/pull/40785#pullrequestreview-811832395 ✔ - Myles Borins (@MylesBorins) (TSC): https://github.com/nodejs/node/pull/40785#pullrequestreview-806600800 ✔ - Guy Bedford (@guybedford): https://github.com/nodejs/node/pull/40785#pullrequestreview-811839664 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/40785#pullrequestreview-807849260 ✔ Last GitHub Actions successful ℹ Last Full PR CI on 2021-11-24T04:02:39Z: https://ci.nodejs.org/job/node-test-pull-request/41066/ - Querying data for job/node-test-pull-request/41066/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/1497846338 |
Sorry, something went wrong.
PR-URL: #40785 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #40785 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #40785 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #40785 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs#40785 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs#40785 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
| Back | FazBrowse Home | New Git URL |
This PR implements https://github.com/nodejs/node/discussions/40790#discussioncomment-1673795, making the following changes to Node’s support for import assertions:
An experimental warning is now printed for all imports with explicitly declared assertion types (currently only JSON).
In the module map, the string 'javascript' is used instead of a symbol to represent the “default” or implied type, to align with the HTML spec.
To align with Chrome and with Prevent modules from being imported with a type: 'javascript' assertion whatwg/html#7350, assert { type: 'javascript' } throws an error. (This was the behavior before, but now it’s made explicit since we use 'javascript' internally.)
Please see #40790 for the motivation behind these changes, and please use that thread for discussion of the desired functionality. I’d like to limit the discussion on this PR thread to technical concerns. Thanks! cc @nodejs/modules @nodejs/loaders