diff options
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package-lock.json | 5 | ||||
-rw-r--r-- | editors/code/package.json | 3 | ||||
-rw-r--r-- | editors/code/src/scopes.ts | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json index 9c55c257f..a41497a23 100644 --- a/editors/code/package-lock.json +++ b/editors/code/package-lock.json | |||
@@ -720,6 +720,11 @@ | |||
720 | "esprima": "^4.0.0" | 720 | "esprima": "^4.0.0" |
721 | } | 721 | } |
722 | }, | 722 | }, |
723 | "jsonc-parser": { | ||
724 | "version": "2.2.0", | ||
725 | "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.0.tgz", | ||
726 | "integrity": "sha512-4fLQxW1j/5fWj6p78vAlAafoCKtuBm6ghv+Ij5W2DrDx0qE+ZdEl2c6Ko1mgJNF5ftX1iEWQQ4Ap7+3GlhjkOA==" | ||
727 | }, | ||
723 | "lcid": { | 728 | "lcid": { |
724 | "version": "2.0.0", | 729 | "version": "2.0.0", |
725 | "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", | 730 | "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", |
diff --git a/editors/code/package.json b/editors/code/package.json index 5c5be34db..fbf675d46 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -32,7 +32,8 @@ | |||
32 | }, | 32 | }, |
33 | "dependencies": { | 33 | "dependencies": { |
34 | "seedrandom": "^3.0.1", | 34 | "seedrandom": "^3.0.1", |
35 | "vscode-languageclient": "^5.3.0-next.4" | 35 | "vscode-languageclient": "^5.3.0-next.4", |
36 | "jsonc-parser": "^2.1.0" | ||
36 | }, | 37 | }, |
37 | "devDependencies": { | 38 | "devDependencies": { |
38 | "@types/glob": "^7.1.1", | 39 | "@types/glob": "^7.1.1", |
diff --git a/editors/code/src/scopes.ts b/editors/code/src/scopes.ts index 98099872c..8f288d761 100644 --- a/editors/code/src/scopes.ts +++ b/editors/code/src/scopes.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import * as fs from 'fs'; | 1 | import * as fs from 'fs'; |
2 | import * as jsonc from 'jsonc-parser'; | ||
2 | import * as path from 'path'; | 3 | import * as path from 'path'; |
3 | import * as vscode from 'vscode'; | 4 | import * as vscode from 'vscode'; |
4 | 5 | ||
@@ -140,7 +141,6 @@ function readFileText(filePath: string): string { | |||
140 | return fs.readFileSync(filePath, 'utf8'); | 141 | return fs.readFileSync(filePath, 'utf8'); |
141 | } | 142 | } |
142 | 143 | ||
143 | // Might need to replace with JSONC if a theme contains comments. | ||
144 | function parseJSON(content: string): any { | 144 | function parseJSON(content: string): any { |
145 | return JSON.parse(content); | 145 | return jsonc.parse(content); |
146 | } | 146 | } |