Skip to content

Commit 9677b62

Browse files
committed
fixup! chore(*): refactor to use built-in --strip-types Node.js flag
1 parent 8693ed7 commit 9677b62

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mkshims.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {SupportedPackageManagerSet} from './sources/types.ts';
77

88
const engine = new Engine();
99

10-
const distDir = path.join(__dirname, `dist`);
11-
const shimsDir = path.join(__dirname, `shims`);
10+
const distDir = path.join(import.meta.dirname, `dist`);
11+
const shimsDir = path.join(import.meta.dirname, `shims`);
1212

1313
const physicalNodewinDir = path.join(shimsDir, `nodewin`);
1414
const virtualNodewinDir = path.join(physicalNodewinDir, `node_modules/corepack`);
@@ -59,7 +59,7 @@ async function main() {
5959

6060
// Last note: cmdShim generates shims with relative paths, so it doesn't matter
6161
// that the target files don't truly exist, as long as we mock the `stat` function.
62-
const remapPath = (p: string) => path.resolve(__dirname, path.relative(virtualNodewinDir, p));
62+
const remapPath = (p: string) => path.resolve(import.meta.dirname, path.relative(virtualNodewinDir, p));
6363

6464
const easyStatFs = Object.assign(Object.create(fs), {
6565
readFile: (p: string, encoding: BufferEncoding, cb: (err: any, str: string) => void) => fs.readFile(remapPath(p), encoding, cb),

0 commit comments

Comments
 (0)