Skip to content

Commit

Permalink
fix: windows compat
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Sep 4, 2024
1 parent c79e268 commit 2234bca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"lint:staged": "lint-staged",
"prepare": "husky",
"prepublishOnly": "npm run build",
"test": "node --import tsx ./test/impvol.spec.ts",
"test": "node --test --import tsx ./test/impvol.spec.ts",
"tsc": "tsc -p tsconfig.tsc.json"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/paths-cjs.cts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {pathToFileURL} from 'url';

export const HOOKS_PATH = require.resolve('./impvol-hooks.js');
export const HOOKS_PATH = pathToFileURL(require.resolve('./impvol-hooks.js'));

export const IMPVOL_URL = pathToFileURL(require.resolve('./impvol.js'));
9 changes: 3 additions & 6 deletions src/paths.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import {fileURLToPath} from 'url';

export const HOOKS_PATH = fileURLToPath(
export const HOOKS_PATH =
// @ts-ignore
new URL('./impvol-hooks.js', import.meta.url),
);
new URL('./impvol-hooks.js', import.meta.url);

// @ts-ignore
export const IMPVOL_URL = new URL('./impvol.js', import.meta.url).href;
export const IMPVOL_URL = new URL('./impvol.js', import.meta.url);

0 comments on commit 2234bca

Please sign in to comment.