Skip to content

Commit

Permalink
fix: get rid of import assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
fgreinacher authored Apr 29, 2024
1 parent 4055d01 commit 94cc869
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/definitions/errors.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {inspect} from 'util';
import pkg from '../../package.json' assert {type: 'json'};
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);

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

0 comments on commit 94cc869

Please sign in to comment.