We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e77278 commit 5cb7784Copy full SHA for 5cb7784
1 file changed
tests/diagnostics/context.ts
@@ -2,6 +2,7 @@ import type { PackageInfo } from '#utils/api/package'
2
import type { Engines } from 'fast-npm-meta'
3
import type { DiagnosticContext } from '../../src/providers/diagnostics'
4
import { resolveDependencySpec } from '#utils/dependency'
5
+import { resolveExactVersion } from '#utils/package'
6
import { Uri } from 'vscode'
7
8
interface CreateContextOptions {
@@ -30,7 +31,7 @@ export function createContext(options: CreateContextOptions): DiagnosticContext
30
31
resolvedName,
32
resolvedSpec,
33
resolvedProtocol,
- resolvedVersion: async () => '',
34
+ resolvedVersion: async () => resolveExactVersion(pkg, resolvedSpec),
35
packageInfo: async () => (pkg),
36
}
37
return { uri: Uri.file('package.json'), dep, pkg }
0 commit comments