diff --git a/package.json b/package.json index e9be3f75b..7d809eeee 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "schemas", "src" ], - "imports": { - "#package": "./package.json" + "exports": { + "package": "./package.json" }, "scripts": { "build": "node scripts/build.cli.js", diff --git a/scripts/build.cli.js b/scripts/build.cli.js index edfbf55af..cf22aed57 100644 --- a/scripts/build.cli.js +++ b/scripts/build.cli.js @@ -46,7 +46,7 @@ Promise.all(builds.map(([entries, outfile]) => { currentConfig.external = [ ...Object.keys(dependencies), - '#package', + 'package', ]; return esbuild.build(currentConfig); diff --git a/src/cmd/translate/utils/fs.ts b/src/cmd/translate/utils/fs.ts index 4313590ed..4dea2bb24 100644 --- a/src/cmd/translate/utils/fs.ts +++ b/src/cmd/translate/utils/fs.ts @@ -3,7 +3,7 @@ import {dirname, join} from 'node:path'; import {readFile, writeFile} from 'node:fs/promises'; import {dump, load} from 'js-yaml'; -const ROOT = dirname(require.resolve('#package')); +const ROOT = dirname(require.resolve('@diplodoc/cli/package')); function last(array: T[]): T | undefined { return array[array.length - 1];