Skip to content

Commit 3745548

Browse files
authoredSep 2, 2023
fix: suppress import assertion warning (#300)
1 parent e9116f9 commit 3745548

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed
 

‎src/suppress-warnings.cts

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ const ignoreWarnings = new Set([
44
'--experimental-loader is an experimental feature. This feature could change at any time',
55
'Custom ESM Loaders is an experimental feature. This feature could change at any time',
66

7-
// Changed in Node v18.13.0 via PR #45424
7+
// Changed in Node v18.13.0 via https://github.com/nodejs/node/pull/45424
88
'Custom ESM Loaders is an experimental feature and might change at any time',
9+
10+
// For JSON modules via https://github.com/nodejs/node/pull/46901
11+
'Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.',
912
]);
1013

1114
const { emit } = process;

‎tests/index.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ const packageTypes = [
1111

1212
const nodeVersions = [
1313
'12.20.0', // CJS named export detection added
14-
'12.22.11',
14+
'12',
1515
...(
1616
(process.env.CI && !isWin)
1717
? [
18-
'14.19.1',
19-
'16.13.2',
20-
'17.8.0',
21-
'18.13.0',
18+
'14',
19+
'16',
20+
'17',
21+
'18',
22+
'20',
2223
]
2324
: []
2425
),

‎tests/utils/node-supports.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export default {
2-
testRunner: '>= 18.0.0',
2+
// https://nodejs.org/api/test.html#test-runner
3+
testRunner: '^16.17.0 || >= 18.0.0',
34
};

0 commit comments

Comments
 (0)