Skip to content

Commit

Permalink
fix: suppress import assertion warning (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber authored Sep 2, 2023
1 parent e9116f9 commit 3745548
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/suppress-warnings.cts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ const ignoreWarnings = new Set([
'--experimental-loader is an experimental feature. This feature could change at any time',
'Custom ESM Loaders is an experimental feature. This feature could change at any time',

// Changed in Node v18.13.0 via PR #45424
// Changed in Node v18.13.0 via https://github.com/nodejs/node/pull/45424
'Custom ESM Loaders is an experimental feature and might change at any time',

// For JSON modules via https://github.com/nodejs/node/pull/46901
'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.',
]);

const { emit } = process;
Expand Down
11 changes: 6 additions & 5 deletions tests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ const packageTypes = [

const nodeVersions = [
'12.20.0', // CJS named export detection added
'12.22.11',
'12',
...(
(process.env.CI && !isWin)
? [
'14.19.1',
'16.13.2',
'17.8.0',
'18.13.0',
'14',
'16',
'17',
'18',
'20',
]
: []
),
Expand Down
3 changes: 2 additions & 1 deletion tests/utils/node-supports.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export default {
testRunner: '>= 18.0.0',
// https://nodejs.org/api/test.html#test-runner
testRunner: '^16.17.0 || >= 18.0.0',
};

0 comments on commit 3745548

Please sign in to comment.