[json] package.json: complete package versions from scopes or private registries
See original GitHub issueWhile there are numerous issues explaining that package names cannot be autocompleted for scopes on the official registry or for private registries, that doesn’t mean you shouldn’t be able to autocomplete package versions.
And I’d argue that atleast for private registries autocompleting the version is generally more important than autocompleting the name. The name is usually well known for internal dependencies. But the version range available; that not so much…
Anyway, for scoped packages and even for scopes that are redirected to other registries using registry
entries in .npmrc
, the versions can be gotten from a simple npm view
command, which returns a JSON structure that also holds all of a package’s versions. No reason the functionality for that command couldn’t be tapped for autocompletion as well.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:12 (5 by maintainers)
Top GitHub Comments
Ive tried to follow the various issues mentioned in here but it does not seem that there has been a conclusion on this issue. It seems like many people assume this is an extension, but actually its not and its provided by core functionality, is that correct?
I would love this feature and think it would be an excellent addition to vscode.
Probably the best would be to call
npm
as a command so we get the version the user has configured.