mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Fix package.json Auto complete
Fixes #17342
**Bug**
I believe that 739d8ca77f introduced a regression for package.json auto complete where we end up inserting the text `*` for the package.version
**Fix**
Insert `""` instead of star to match previous behavior better
This commit is contained in:
@@ -67,7 +67,7 @@ export class PackageJSONContribution implements IJSONContribution {
|
|||||||
let name = keys[0];
|
let name = keys[0];
|
||||||
let insertText = new SnippetString().appendText(JSON.stringify(name));
|
let insertText = new SnippetString().appendText(JSON.stringify(name));
|
||||||
if (addValue) {
|
if (addValue) {
|
||||||
insertText.appendText(': ').appendPlaceholder('*');
|
insertText.appendText(': "').appendPlaceholder('').appendText('"');
|
||||||
if (!isLast) {
|
if (!isLast) {
|
||||||
insertText.appendText(',');
|
insertText.appendText(',');
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,7 @@ export class PackageJSONContribution implements IJSONContribution {
|
|||||||
this.mostDependedOn.forEach((name) => {
|
this.mostDependedOn.forEach((name) => {
|
||||||
let insertText = new SnippetString().appendText(JSON.stringify(name));
|
let insertText = new SnippetString().appendText(JSON.stringify(name));
|
||||||
if (addValue) {
|
if (addValue) {
|
||||||
insertText.appendText(': ').appendPlaceholder('*');
|
insertText.appendText(': "').appendPlaceholder('').appendText('"');
|
||||||
if (!isLast) {
|
if (!isLast) {
|
||||||
insertText.appendText(',');
|
insertText.appendText(',');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user