Skip to content

Commit

Permalink
fix: another try
Browse files Browse the repository at this point in the history
  • Loading branch information
lonr committed Nov 11, 2024
1 parent 611715f commit 8e2abc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
"license": "MIT",
"author": "lonr",
"type": "module",
"imports": {
"#package.json": "./package.json"
},
"bin": {
"tldr": "dist/cli.js"
},
Expand Down
3 changes: 2 additions & 1 deletion src/tldr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const SPEC_VERSION = '2.2';
const PAGES_REPO = 'https://github.com/tldr-pages/tldr';
const ROOT_DIR = fileURLToPath(new URL('../', import.meta.url));
const README_PATH = resolve(ROOT_DIR, 'README.md');
const PACKAGE_JSON_PATH = resolve(ROOT_DIR, 'package.json');

const SPACES = ' ';

Expand Down Expand Up @@ -81,7 +82,7 @@ class TLDR {
async printVersion() {
const {
default: { version },
} = (await import('#package.json', {
} = (await import(PACKAGE_JSON_PATH, {
with: { type: 'json' },
})) as { default: { version: string } };
console.log(
Expand Down

0 comments on commit 8e2abc0

Please sign in to comment.