Open nino-magazinovic opened 4 years ago
Would be great to include feature as on https://semver.npmjs.com/.
Example:
"peerDependencies": {
"lodash": "^1.0"
}
Completion should list versions that are calculated to the input ^1.0
or 1.x
:
"1.0.0", "1.0.1", ..., "1.1.0", ..., "1.3.0", "1.3.1"
Completion on empty input should list the latest version including caret and tilde:
"4.17.15", "^4.17.15", "~4.17.15",
I'm not aware of a language server we could reuse to provide that feature, and we cannot/shouldn't include such smartness directly in Wild Web Developer (we'd rather work on an independent language server to reuse in multiple IDEs). I've asked on https://github.com/theia-ide/typescript-language-server/issues/126 whether this could be in the scope of the JS/TS language server we're using.
vscode supports this feature (npm and bower). The code is managed with https://github.com/microsoft/vscode/blob/master/extensions/npm/src/features/jsonContributions.ts
The bad thing is that it uses vscode API, but I think this code could be LSPfied and it could be an extension of the JSON language server since https://github.com/microsoft/vscode/blob/master/extensions/npm/src/features/jsonContributions.ts is a contribution of vscode-json-languageservice I think.
Wild Web Developer: 0.7.0.201910102046
Autocomplete of angular.json and package.json properties works, but autocomplete of package.json dependency versions is missing (dependencies, devDependencies, peerDependencies).