mirror of
https://github.com/hanzoai/uuid.git
synced 2026-09-24 17:04:02 +00:00
While ESM support has been stable in current versions of Node.js 14.x and 16.x, support for importing JSON files is still experimental and evolving. Since we still want to cover the fact that the package is exporting it's package.json file, this test is now extracted to only run with the updated JSON import syntax which requires import assertions and which was introduced in Node.js 16.14.0. Fixes #619 Co-authored-by: Robert Kieffer <[email protected]>
5 lines
170 B
JavaScript
5 lines
170 B
JavaScript
import pkg from 'uuid/package.json' assert { type: 'json' };
|
|
|
|
// Some tools like react-native need to introspect the package.json file
|
|
console.log('pkg.name', pkg.name);
|