Skip to content

Commit 94cc869

Browse files
authored
fix: get rid of import assertion
1 parent 4055d01 commit 94cc869

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/definitions/errors.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import {inspect} from 'util';
2-
import pkg from '../../package.json' assert {type: 'json'};
2+
import { createRequire } from "node:module";
3+
const require = createRequire(import.meta.url);
34

5+
const pkg = require("../../package.json");
46
const [homepage] = pkg.homepage.split('#');
57
const linkify = (file) => `${homepage}/blob/master/${file}`;
68
const stringify = (object) => inspect(object, {breakLength: Number.POSITIVE_INFINITY, depth: 2, maxArrayLength: 5});

0 commit comments

Comments
 (0)