Skip to content

Commit 92734d4

Browse files
aduh95targos
authored andcommittedNov 23, 2023
esm: use import attributes instead of import assertions
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, This commit updates the documentation to encourage folks to use the new syntax, and add aliases for module customization hooks. PR-URL: #50140 Backport-PR-URL: #50669 Fixes: #50134 Refs: v8/v8@159c82c Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 6cf8dd9 commit 92734d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+401
-291
lines changed
 

‎.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ tools/lint-md/lint-md.mjs
88
benchmark/tmp
99
benchmark/fixtures
1010
doc/**/*.js
11+
doc/changelogs/CHANGELOG_v1*.md
12+
!doc/changelogs/CHANGELOG_v18.md
1113
!doc/api_assets/*.js
1214
!.eslintrc.js

‎.eslintrc.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const hacks = [
1818
'eslint-plugin-jsdoc',
1919
'eslint-plugin-markdown',
2020
'@babel/eslint-parser',
21-
'@babel/plugin-syntax-import-assertions',
21+
'@babel/plugin-syntax-import-attributes',
2222
];
2323
Module._findPath = (request, paths, isMain) => {
2424
const r = ModuleFindPath(request, paths, isMain);
@@ -44,7 +44,10 @@ module.exports = {
4444
parserOptions: {
4545
babelOptions: {
4646
plugins: [
47-
Module._findPath('@babel/plugin-syntax-import-assertions'),
47+
[
48+
Module._findPath('@babel/plugin-syntax-import-attributes'),
49+
{ deprecatedAssertSyntax: true },
50+
],
4851
],
4952
},
5053
requireConfigFile: false,

0 commit comments

Comments
 (0)
Please sign in to comment.