Skip to content

Commit 13c5950

Browse files
committed
refactor: do not use __dirname in ESM
1 parent 531ca0b commit 13c5950

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/codegen/e2e-test/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import dedent from 'dedent';
55
import { expect, test } from 'vitest';
66
import { createIFF } from '../src/test/fixture.js';
77

8-
const binPath = join(__dirname, '../bin/cmk.mjs');
9-
const tscPath = join(__dirname, '../../../node_modules/typescript/bin/tsc');
8+
const binPath = join(import.meta.dirname, '../bin/cmk.mjs');
9+
const tscPath = join(import.meta.dirname, '../../../node_modules/typescript/bin/tsc');
1010

1111
test('generates .d.ts', async () => {
1212
const iff = await createIFF({

packages/ts-plugin/e2e-test/test-util/tsserver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function launchTsserver(): Tsserver {
4242
'--globalPlugins',
4343
'@css-modules-kit/ts-plugin',
4444
'--pluginProbeLocations',
45-
__dirname,
45+
import.meta.dirname,
4646
],
4747
[],
4848
);

0 commit comments

Comments
 (0)