@volar/jsdelivr 2.4.10 → 2.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/npm.js +2 -2
  2. package/package.json +3 -3
package/lib/npm.js CHANGED
@@ -125,7 +125,7 @@ function createNpmFileSystem(getCdnPath = (uri) => {
125
125
  if ((await _stat(path))?.type !== 1) {
126
126
  return;
127
127
  }
128
- const text = await fetchText(`https://cdn.jsdelivr.net/npm/${path}`);
128
+ const text = await fetchText(`https://cdn.jsdelivr.net/npm/${pkgName}@${_version || 'latest'}/${pkgFilePath}`);
129
129
  if (text !== undefined) {
130
130
  onFetch?.(path, text);
131
131
  }
@@ -208,7 +208,7 @@ function createNpmFileSystem(getCdnPath = (uri) => {
208
208
  version = modName.substring(modName.lastIndexOf('@') + 1);
209
209
  }
210
210
  if (!version && getPackageVersion) {
211
- getPackageVersion?.(pkgName);
211
+ version = getPackageVersion?.(pkgName);
212
212
  }
213
213
  return [modName, pkgName, version, path];
214
214
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/jsdelivr",
3
- "version": "2.4.10",
3
+ "version": "2.4.12",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -12,8 +12,8 @@
12
12
  "directory": "packages/jsdelivr"
13
13
  },
14
14
  "devDependencies": {
15
- "@volar/language-service": "2.4.10",
15
+ "@volar/language-service": "2.4.12",
16
16
  "vscode-uri": "^3.0.8"
17
17
  },
18
- "gitHead": "03d1e8b07e1e64921b76b635c7064d7b4fcf63b5"
18
+ "gitHead": "17b9b8a1f522afd1aad1e598d2fd935680d8a8d7"
19
19
  }