Skip to content

Commit 0e8ac58

Browse files
broofactavan
authored andcommitted
Add import assertion (now required by node@16)
This should fix the breaking CI test. Apparently node@16 now throws if you try to import a .json file with no import assertion. Ref: nodejs/node#40250 cc: @ctavan for sanity check to make sure this won't break anything.
1 parent 941446a commit 0e8ac58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/node-esmodules/example.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
version as uuidVersion,
1111
} from 'uuid';
1212
import * as uuid from 'uuid';
13-
import pkg from 'uuid/package.json';
13+
import pkg from 'uuid/package.json' assert {type: 'json'};
1414

1515
console.log('uuidv1()', uuidv1());
1616

0 commit comments

Comments
 (0)