feat(dependencies): complete npm package versions in package.json (#2596)

Completion inside a version string under dependencies, devDependencies,
peerDependencies or optionalDependencies lists the package's versions from the
npm registry (abbreviated metadata, shared version cache), newest first,
without deprecated versions and without pre-releases when the package has
releases. Aliases, paths, URLs and workspace protocols are left alone; the
scanner tolerates a document being edited.

Closes #2558
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-11 05:50:22 +08:00
1 джерело a8be534043
коміт b1bee808dd
6 files changed
+330 -4

No files matched your search

+1 -1
Переглянути файл
@@ -210,7 +210,7 @@ export function activate(): () => void {
extensions: (doc) => {
if (doc.virtual || doc.readOnly) return [];
if (/(?:^|\/)Cargo\.toml$/.test(doc.path)) return extension(doc);
if (/(?:^|\/)go\.mod$/.test(doc.path)) return versionCompletion(doc);
if (/(?:^|\/)(?:go\.mod|package\.json)$/.test(doc.path)) return versionCompletion(doc);
return [];
},
});