Skip to content

Commit

Permalink
Add import assertion (now required by node@16)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
broofa authored and ctavan committed Mar 16, 2022
1 parent 941446a commit 0e8ac58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/node-esmodules/example.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
version as uuidVersion,
} from 'uuid';
import * as uuid from 'uuid';
import pkg from 'uuid/package.json';
import pkg from 'uuid/package.json' assert {type: 'json'};

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

Expand Down

0 comments on commit 0e8ac58

Please sign in to comment.