Skip to content

Commit 6044200

Browse files
authored
fix: resolve vitest in yarn pnp on windows (#732)
1 parent 352215d commit 6044200

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.vscodeignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ tsconfig.base.json
2424
.vscode-test.mjs
2525
eslint.config.mjs
2626
scripts/**
27-
test-results/**
27+
test-results/**
28+
packages/**
29+
CLAUDE.md
30+
CONTRIBUTION.md
31+
pnpm-workspace.yaml

packages/extension/src/api/pkg.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function resolveVitestConfig(showWarning: boolean, configOrWorkspaceFile: vscode
6363
vscode.window.showWarningMessage(message.join(''))
6464
}
6565
}
66-
log.error('[API]', `Vitest not found for ${configOrWorkspaceFile}.`)
66+
log.error('[API]', `Vitest not found for ${configOrWorkspaceFile.fsPath}.`)
6767
return null
6868
}
6969

packages/extension/src/api/resolve.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type * as vscode from 'vscode'
22
import { findUpSync } from 'find-up'
33
import { dirname, resolve } from 'pathe'
4-
import { normalizeDriveLetter } from 'vitest-vscode-shared'
54
import { getConfig } from '../config'
65

76
const _require = require
@@ -61,7 +60,7 @@ export function resolveVitestPnpPackagePath(cwd: string) {
6160
return null
6261
}
6362
const pnpApi = _require(pnpPath)
64-
const vitestNodePath = pnpApi.resolveRequest('vitest/node', normalizeDriveLetter(cwd))
63+
const vitestNodePath = pnpApi.resolveRequest('vitest/node', cwd)
6564
return {
6665
pnpLoader: require.resolve('./.pnp.loader.mjs', {
6766
paths: [dirname(pnpPath)],

0 commit comments

Comments
 (0)