@codingame/monaco-vscode-rollup-vsix-plugin 11.1.2 → 12.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -3
- package/rollup-vsix-plugin.d.ts +1597 -2
- package/rollup-vsix-plugin.js +265 -219
- package/vscode/src/vs/base/common/jsonSchema.d.ts +0 -90
- package/vscode/src/vs/platform/action/common/action.d.ts +0 -12
- package/vscode/src/vs/platform/environment/common/environment.d.ts +0 -8
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +0 -1494
- package/vscode-dts/vscode.proposed.activeComment.d.ts +0 -23
- package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +0 -49
- package/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts +0 -71
- package/vscode-dts/vscode.proposed.aiTextSearchProviderNew.d.ts +0 -40
- package/vscode-dts/vscode.proposed.attributableCoverage.d.ts +0 -46
- package/vscode-dts/vscode.proposed.authLearnMore.d.ts +0 -16
- package/vscode-dts/vscode.proposed.authSession.d.ts +0 -13
- package/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts +0 -47
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +0 -391
- package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +0 -119
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +0 -90
- package/vscode-dts/vscode.proposed.chatReferenceBinaryData.d.ts +0 -33
- package/vscode-dts/vscode.proposed.chatTab.d.ts +0 -17
- package/vscode-dts/vscode.proposed.chatVariableResolver.d.ts +0 -110
- package/vscode-dts/vscode.proposed.codeActionAI.d.ts +0 -16
- package/vscode-dts/vscode.proposed.codeActionRanges.d.ts +0 -15
- package/vscode-dts/vscode.proposed.codiconDecoration.d.ts +0 -48
- package/vscode-dts/vscode.proposed.commentReactor.d.ts +0 -13
- package/vscode-dts/vscode.proposed.commentReveal.d.ts +0 -45
- package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +0 -40
- package/vscode-dts/vscode.proposed.commentingRangeHint.d.ts +0 -16
- package/vscode-dts/vscode.proposed.commentsDraftState.d.ts +0 -18
- package/vscode-dts/vscode.proposed.contribAccessibilityHelpContent.d.ts +0 -15
- package/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts +0 -10
- package/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +0 -8
- package/vscode-dts/vscode.proposed.contribCommentsViewThreadMenus.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribDebugCreateConfiguration.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribDiffEditorGutterToolBarMenus.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribEditSessions.d.ts +0 -8
- package/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribIssueReporter.d.ts +0 -7
- package/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribMultiDiffEditorMenus.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribShareMenu.d.ts +0 -7
- package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemMenu.d.ts +0 -7
- package/vscode-dts/vscode.proposed.contribSourceControlHistoryTitleMenu.d.ts +0 -7
- package/vscode-dts/vscode.proposed.contribSourceControlInputBoxMenu.d.ts +0 -7
- package/vscode-dts/vscode.proposed.contribSourceControlTitleMenu.d.ts +0 -7
- package/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts +0 -8
- package/vscode-dts/vscode.proposed.contribViewContainerTitle.d.ts +0 -8
- package/vscode-dts/vscode.proposed.contribViewsRemote.d.ts +0 -6
- package/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts +0 -6
- package/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts +0 -51
- package/vscode-dts/vscode.proposed.customEditorMove.d.ts +0 -29
- package/vscode-dts/vscode.proposed.debugVisualization.d.ts +0 -170
- package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +0 -63
- package/vscode-dts/vscode.proposed.diffCommand.d.ts +0 -38
- package/vscode-dts/vscode.proposed.diffContentOptions.d.ts +0 -16
- package/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts +0 -13
- package/vscode-dts/vscode.proposed.documentPaste.d.ts +0 -297
- package/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts +0 -71
- package/vscode-dts/vscode.proposed.editorHoverVerbosityLevel.d.ts +0 -76
- package/vscode-dts/vscode.proposed.editorInsets.d.ts +0 -22
- package/vscode-dts/vscode.proposed.embeddings.d.ts +0 -33
- package/vscode-dts/vscode.proposed.extensionRuntime.d.ts +0 -24
- package/vscode-dts/vscode.proposed.extensionsAny.d.ts +0 -41
- package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +0 -163
- package/vscode-dts/vscode.proposed.fileComments.d.ts +0 -42
- package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +0 -73
- package/vscode-dts/vscode.proposed.fileSearchProviderNew.d.ts +0 -101
- package/vscode-dts/vscode.proposed.findFiles2.d.ts +0 -89
- package/vscode-dts/vscode.proposed.findFiles2New.d.ts +0 -105
- package/vscode-dts/vscode.proposed.findTextInFiles.d.ts +0 -104
- package/vscode-dts/vscode.proposed.findTextInFilesNew.d.ts +0 -164
- package/vscode-dts/vscode.proposed.fsChunks.d.ts +0 -16
- package/vscode-dts/vscode.proposed.idToken.d.ts +0 -16
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +0 -95
- package/vscode-dts/vscode.proposed.inlineEdit.d.ts +0 -88
- package/vscode-dts/vscode.proposed.interactive.d.ts +0 -11
- package/vscode-dts/vscode.proposed.interactiveWindow.d.ts +0 -25
- package/vscode-dts/vscode.proposed.ipc.d.ts +0 -37
- package/vscode-dts/vscode.proposed.languageModelSystem.d.ts +0 -17
- package/vscode-dts/vscode.proposed.languageStatusText.d.ts +0 -12
- package/vscode-dts/vscode.proposed.lmTools.d.ts +0 -9
- package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +0 -87
- package/vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts +0 -63
- package/vscode-dts/vscode.proposed.newSymbolNamesProvider.d.ts +0 -47
- package/vscode-dts/vscode.proposed.notebookCellExecution.d.ts +0 -44
- package/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts +0 -52
- package/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts +0 -17
- package/vscode-dts/vscode.proposed.notebookDeprecated.d.ts +0 -16
- package/vscode-dts/vscode.proposed.notebookExecution.d.ts +0 -39
- package/vscode-dts/vscode.proposed.notebookKernelSource.d.ts +0 -46
- package/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +0 -21
- package/vscode-dts/vscode.proposed.notebookMessaging.d.ts +0 -68
- package/vscode-dts/vscode.proposed.notebookMime.d.ts +0 -33
- package/vscode-dts/vscode.proposed.notebookReplDocument.d.ts +0 -33
- package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +0 -55
- package/vscode-dts/vscode.proposed.portsAttributes.d.ts +0 -100
- package/vscode-dts/vscode.proposed.profileContentHandlers.d.ts +0 -19
- package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +0 -17
- package/vscode-dts/vscode.proposed.quickInputButtonLocation.d.ts +0 -29
- package/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts +0 -16
- package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +0 -19
- package/vscode-dts/vscode.proposed.resolvers.d.ts +0 -475
- package/vscode-dts/vscode.proposed.scmActionButton.d.ts +0 -18
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +0 -88
- package/vscode-dts/vscode.proposed.scmMultiDiffEditor.d.ts +0 -34
- package/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts +0 -22
- package/vscode-dts/vscode.proposed.scmTextDocument.d.ts +0 -19
- package/vscode-dts/vscode.proposed.scmValidation.d.ts +0 -60
- package/vscode-dts/vscode.proposed.shareProvider.d.ts +0 -74
- package/vscode-dts/vscode.proposed.showLocal.d.ts +0 -19
- package/vscode-dts/vscode.proposed.speech.d.ts +0 -74
- package/vscode-dts/vscode.proposed.tabInputMultiDiff.d.ts +0 -22
- package/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts +0 -25
- package/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts +0 -16
- package/vscode-dts/vscode.proposed.telemetry.d.ts +0 -36
- package/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts +0 -32
- package/vscode-dts/vscode.proposed.terminalDimensions.d.ts +0 -39
- package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +0 -48
- package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +0 -87
- package/vscode-dts/vscode.proposed.terminalSelection.d.ts +0 -16
- package/vscode-dts/vscode.proposed.testObserver.d.ts +0 -199
- package/vscode-dts/vscode.proposed.testRelatedCode.d.ts +0 -36
- package/vscode-dts/vscode.proposed.textSearchCompleteNew.d.ts +0 -38
- package/vscode-dts/vscode.proposed.textSearchProvider.d.ts +0 -281
- package/vscode-dts/vscode.proposed.textSearchProviderNew.d.ts +0 -275
- package/vscode-dts/vscode.proposed.timeline.d.ts +0 -163
- package/vscode-dts/vscode.proposed.tokenInformation.d.ts +0 -26
- package/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts +0 -30
- package/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts +0 -28
- package/vscode-dts/vscode.proposed.treeViewReveal.d.ts +0 -13
- package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +0 -48
- package/vscode-dts/vscode.proposed.tunnels.d.ts +0 -64
- package/vscode-dts/vscode.proposed.workspaceTrust.d.ts +0 -30
package/rollup-vsix-plugin.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { createFilter } from '@rollup/pluginutils';
|
|
2
2
|
import * as yauzl from 'yauzl';
|
|
3
3
|
import { createFsFromVolume, Volume } from 'memfs';
|
|
4
|
+
import thenby from 'thenby';
|
|
5
|
+
import require$$0$2 from 'stream';
|
|
4
6
|
import * as path$1 from 'path';
|
|
5
7
|
import path__default from 'path';
|
|
6
8
|
import parseCssUrl from 'css-url-parser';
|
|
7
9
|
import * as mime from 'mime-types';
|
|
8
10
|
import require$$0 from 'os';
|
|
9
11
|
import require$$0$1 from 'util';
|
|
10
|
-
import require$$0$2 from 'stream';
|
|
11
12
|
import require$$0$4 from 'events';
|
|
12
13
|
import require$$0$3 from 'fs';
|
|
13
14
|
|
|
@@ -79,21 +80,21 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
79
80
|
const len = text.length;
|
|
80
81
|
let value = '';
|
|
81
82
|
let tokenOffset = 0;
|
|
82
|
-
let token =
|
|
83
|
-
let scanError =
|
|
83
|
+
let token = SyntaxKind.Unknown;
|
|
84
|
+
let scanError = ScanError.None;
|
|
84
85
|
function scanHexDigits(count) {
|
|
85
86
|
let digits = 0;
|
|
86
87
|
let hexValue = 0;
|
|
87
88
|
while (digits < count) {
|
|
88
89
|
const ch = text.charCodeAt(pos);
|
|
89
|
-
if (ch >=
|
|
90
|
-
hexValue = hexValue * 16 + ch -
|
|
90
|
+
if (ch >= CharacterCodes._0 && ch <= CharacterCodes._9) {
|
|
91
|
+
hexValue = hexValue * 16 + ch - CharacterCodes._0;
|
|
91
92
|
}
|
|
92
|
-
else if (ch >=
|
|
93
|
-
hexValue = hexValue * 16 + ch -
|
|
93
|
+
else if (ch >= CharacterCodes.A && ch <= CharacterCodes.F) {
|
|
94
|
+
hexValue = hexValue * 16 + ch - CharacterCodes.A + 10;
|
|
94
95
|
}
|
|
95
|
-
else if (ch >=
|
|
96
|
-
hexValue = hexValue * 16 + ch -
|
|
96
|
+
else if (ch >= CharacterCodes.a && ch <= CharacterCodes.f) {
|
|
97
|
+
hexValue = hexValue * 16 + ch - CharacterCodes.a + 10;
|
|
97
98
|
}
|
|
98
99
|
else {
|
|
99
100
|
break;
|
|
@@ -110,12 +111,12 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
110
111
|
pos = newPosition;
|
|
111
112
|
value = '';
|
|
112
113
|
tokenOffset = 0;
|
|
113
|
-
token =
|
|
114
|
-
scanError =
|
|
114
|
+
token = SyntaxKind.Unknown;
|
|
115
|
+
scanError = ScanError.None;
|
|
115
116
|
}
|
|
116
117
|
function scanNumber() {
|
|
117
118
|
const start = pos;
|
|
118
|
-
if (text.charCodeAt(pos) ===
|
|
119
|
+
if (text.charCodeAt(pos) === CharacterCodes._0) {
|
|
119
120
|
pos++;
|
|
120
121
|
}
|
|
121
122
|
else {
|
|
@@ -124,7 +125,7 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
124
125
|
pos++;
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
|
-
if (pos < text.length && text.charCodeAt(pos) ===
|
|
128
|
+
if (pos < text.length && text.charCodeAt(pos) === CharacterCodes.dot) {
|
|
128
129
|
pos++;
|
|
129
130
|
if (pos < text.length && isDigit(text.charCodeAt(pos))) {
|
|
130
131
|
pos++;
|
|
@@ -133,14 +134,14 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
else {
|
|
136
|
-
scanError =
|
|
137
|
+
scanError = ScanError.UnexpectedEndOfNumber;
|
|
137
138
|
return text.substring(start, pos);
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
141
|
let end = pos;
|
|
141
|
-
if (pos < text.length && (text.charCodeAt(pos) ===
|
|
142
|
+
if (pos < text.length && (text.charCodeAt(pos) === CharacterCodes.E || text.charCodeAt(pos) === CharacterCodes.e)) {
|
|
142
143
|
pos++;
|
|
143
|
-
if (pos < text.length && text.charCodeAt(pos) ===
|
|
144
|
+
if (pos < text.length && text.charCodeAt(pos) === CharacterCodes.plus || text.charCodeAt(pos) === CharacterCodes.minus) {
|
|
144
145
|
pos++;
|
|
145
146
|
}
|
|
146
147
|
if (pos < text.length && isDigit(text.charCodeAt(pos))) {
|
|
@@ -151,7 +152,7 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
151
152
|
end = pos;
|
|
152
153
|
}
|
|
153
154
|
else {
|
|
154
|
-
scanError =
|
|
155
|
+
scanError = ScanError.UnexpectedEndOfNumber;
|
|
155
156
|
}
|
|
156
157
|
}
|
|
157
158
|
return text.substring(start, end);
|
|
@@ -161,60 +162,60 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
161
162
|
while (true) {
|
|
162
163
|
if (pos >= len) {
|
|
163
164
|
result += text.substring(start, pos);
|
|
164
|
-
scanError =
|
|
165
|
+
scanError = ScanError.UnexpectedEndOfString;
|
|
165
166
|
break;
|
|
166
167
|
}
|
|
167
168
|
const ch = text.charCodeAt(pos);
|
|
168
|
-
if (ch ===
|
|
169
|
+
if (ch === CharacterCodes.doubleQuote) {
|
|
169
170
|
result += text.substring(start, pos);
|
|
170
171
|
pos++;
|
|
171
172
|
break;
|
|
172
173
|
}
|
|
173
|
-
if (ch ===
|
|
174
|
+
if (ch === CharacterCodes.backslash) {
|
|
174
175
|
result += text.substring(start, pos);
|
|
175
176
|
pos++;
|
|
176
177
|
if (pos >= len) {
|
|
177
|
-
scanError =
|
|
178
|
+
scanError = ScanError.UnexpectedEndOfString;
|
|
178
179
|
break;
|
|
179
180
|
}
|
|
180
181
|
const ch2 = text.charCodeAt(pos++);
|
|
181
182
|
switch (ch2) {
|
|
182
|
-
case
|
|
183
|
+
case CharacterCodes.doubleQuote:
|
|
183
184
|
result += '\"';
|
|
184
185
|
break;
|
|
185
|
-
case
|
|
186
|
+
case CharacterCodes.backslash:
|
|
186
187
|
result += '\\';
|
|
187
188
|
break;
|
|
188
|
-
case
|
|
189
|
+
case CharacterCodes.slash:
|
|
189
190
|
result += '/';
|
|
190
191
|
break;
|
|
191
|
-
case
|
|
192
|
+
case CharacterCodes.b:
|
|
192
193
|
result += '\b';
|
|
193
194
|
break;
|
|
194
|
-
case
|
|
195
|
+
case CharacterCodes.f:
|
|
195
196
|
result += '\f';
|
|
196
197
|
break;
|
|
197
|
-
case
|
|
198
|
+
case CharacterCodes.n:
|
|
198
199
|
result += '\n';
|
|
199
200
|
break;
|
|
200
|
-
case
|
|
201
|
+
case CharacterCodes.r:
|
|
201
202
|
result += '\r';
|
|
202
203
|
break;
|
|
203
|
-
case
|
|
204
|
+
case CharacterCodes.t:
|
|
204
205
|
result += '\t';
|
|
205
206
|
break;
|
|
206
|
-
case
|
|
207
|
+
case CharacterCodes.u: {
|
|
207
208
|
const ch3 = scanHexDigits(4);
|
|
208
209
|
if (ch3 >= 0) {
|
|
209
210
|
result += String.fromCharCode(ch3);
|
|
210
211
|
}
|
|
211
212
|
else {
|
|
212
|
-
scanError =
|
|
213
|
+
scanError = ScanError.InvalidUnicode;
|
|
213
214
|
}
|
|
214
215
|
break;
|
|
215
216
|
}
|
|
216
217
|
default:
|
|
217
|
-
scanError =
|
|
218
|
+
scanError = ScanError.InvalidEscapeCharacter;
|
|
218
219
|
}
|
|
219
220
|
start = pos;
|
|
220
221
|
continue;
|
|
@@ -222,11 +223,11 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
222
223
|
if (ch >= 0 && ch <= 0x1F) {
|
|
223
224
|
if (isLineBreak(ch)) {
|
|
224
225
|
result += text.substring(start, pos);
|
|
225
|
-
scanError =
|
|
226
|
+
scanError = ScanError.UnexpectedEndOfString;
|
|
226
227
|
break;
|
|
227
228
|
}
|
|
228
229
|
else {
|
|
229
|
-
scanError =
|
|
230
|
+
scanError = ScanError.InvalidCharacter;
|
|
230
231
|
// mark as error but continue with string
|
|
231
232
|
}
|
|
232
233
|
}
|
|
@@ -236,12 +237,12 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
236
237
|
}
|
|
237
238
|
function scanNext() {
|
|
238
239
|
value = '';
|
|
239
|
-
scanError =
|
|
240
|
+
scanError = ScanError.None;
|
|
240
241
|
tokenOffset = pos;
|
|
241
242
|
if (pos >= len) {
|
|
242
243
|
// at the end
|
|
243
244
|
tokenOffset = len;
|
|
244
|
-
return token =
|
|
245
|
+
return token = SyntaxKind.EOF;
|
|
245
246
|
}
|
|
246
247
|
let code = text.charCodeAt(pos);
|
|
247
248
|
// trivia: whitespace
|
|
@@ -251,48 +252,48 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
251
252
|
value += String.fromCharCode(code);
|
|
252
253
|
code = text.charCodeAt(pos);
|
|
253
254
|
} while (isWhitespace(code));
|
|
254
|
-
return token =
|
|
255
|
+
return token = SyntaxKind.Trivia;
|
|
255
256
|
}
|
|
256
257
|
// trivia: newlines
|
|
257
258
|
if (isLineBreak(code)) {
|
|
258
259
|
pos++;
|
|
259
260
|
value += String.fromCharCode(code);
|
|
260
|
-
if (code ===
|
|
261
|
+
if (code === CharacterCodes.carriageReturn && text.charCodeAt(pos) === CharacterCodes.lineFeed) {
|
|
261
262
|
pos++;
|
|
262
263
|
value += '\n';
|
|
263
264
|
}
|
|
264
|
-
return token =
|
|
265
|
+
return token = SyntaxKind.LineBreakTrivia;
|
|
265
266
|
}
|
|
266
267
|
switch (code) {
|
|
267
268
|
// tokens: []{}:,
|
|
268
|
-
case
|
|
269
|
+
case CharacterCodes.openBrace:
|
|
269
270
|
pos++;
|
|
270
|
-
return token =
|
|
271
|
-
case
|
|
271
|
+
return token = SyntaxKind.OpenBraceToken;
|
|
272
|
+
case CharacterCodes.closeBrace:
|
|
272
273
|
pos++;
|
|
273
|
-
return token =
|
|
274
|
-
case
|
|
274
|
+
return token = SyntaxKind.CloseBraceToken;
|
|
275
|
+
case CharacterCodes.openBracket:
|
|
275
276
|
pos++;
|
|
276
|
-
return token =
|
|
277
|
-
case
|
|
277
|
+
return token = SyntaxKind.OpenBracketToken;
|
|
278
|
+
case CharacterCodes.closeBracket:
|
|
278
279
|
pos++;
|
|
279
|
-
return token =
|
|
280
|
-
case
|
|
280
|
+
return token = SyntaxKind.CloseBracketToken;
|
|
281
|
+
case CharacterCodes.colon:
|
|
281
282
|
pos++;
|
|
282
|
-
return token =
|
|
283
|
-
case
|
|
283
|
+
return token = SyntaxKind.ColonToken;
|
|
284
|
+
case CharacterCodes.comma:
|
|
284
285
|
pos++;
|
|
285
|
-
return token =
|
|
286
|
+
return token = SyntaxKind.CommaToken;
|
|
286
287
|
// strings
|
|
287
|
-
case
|
|
288
|
+
case CharacterCodes.doubleQuote:
|
|
288
289
|
pos++;
|
|
289
290
|
value = scanString();
|
|
290
|
-
return token =
|
|
291
|
+
return token = SyntaxKind.StringLiteral;
|
|
291
292
|
// comments
|
|
292
|
-
case
|
|
293
|
+
case CharacterCodes.slash: {
|
|
293
294
|
const start = pos - 1;
|
|
294
295
|
// Single-line comment
|
|
295
|
-
if (text.charCodeAt(pos + 1) ===
|
|
296
|
+
if (text.charCodeAt(pos + 1) === CharacterCodes.slash) {
|
|
296
297
|
pos += 2;
|
|
297
298
|
while (pos < len) {
|
|
298
299
|
if (isLineBreak(text.charCodeAt(pos))) {
|
|
@@ -301,16 +302,16 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
301
302
|
pos++;
|
|
302
303
|
}
|
|
303
304
|
value = text.substring(start, pos);
|
|
304
|
-
return token =
|
|
305
|
+
return token = SyntaxKind.LineCommentTrivia;
|
|
305
306
|
}
|
|
306
307
|
// Multi-line comment
|
|
307
|
-
if (text.charCodeAt(pos + 1) ===
|
|
308
|
+
if (text.charCodeAt(pos + 1) === CharacterCodes.asterisk) {
|
|
308
309
|
pos += 2;
|
|
309
310
|
const safeLength = len - 1; // For lookahead.
|
|
310
311
|
let commentClosed = false;
|
|
311
312
|
while (pos < safeLength) {
|
|
312
313
|
const ch = text.charCodeAt(pos);
|
|
313
|
-
if (ch ===
|
|
314
|
+
if (ch === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) {
|
|
314
315
|
pos += 2;
|
|
315
316
|
commentClosed = true;
|
|
316
317
|
break;
|
|
@@ -319,38 +320,38 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
319
320
|
}
|
|
320
321
|
if (!commentClosed) {
|
|
321
322
|
pos++;
|
|
322
|
-
scanError =
|
|
323
|
+
scanError = ScanError.UnexpectedEndOfComment;
|
|
323
324
|
}
|
|
324
325
|
value = text.substring(start, pos);
|
|
325
|
-
return token =
|
|
326
|
+
return token = SyntaxKind.BlockCommentTrivia;
|
|
326
327
|
}
|
|
327
328
|
// just a single slash
|
|
328
329
|
value += String.fromCharCode(code);
|
|
329
330
|
pos++;
|
|
330
|
-
return token =
|
|
331
|
+
return token = SyntaxKind.Unknown;
|
|
331
332
|
}
|
|
332
333
|
// numbers
|
|
333
|
-
case
|
|
334
|
+
case CharacterCodes.minus:
|
|
334
335
|
value += String.fromCharCode(code);
|
|
335
336
|
pos++;
|
|
336
337
|
if (pos === len || !isDigit(text.charCodeAt(pos))) {
|
|
337
|
-
return token =
|
|
338
|
+
return token = SyntaxKind.Unknown;
|
|
338
339
|
}
|
|
339
340
|
// found a minus, followed by a number so
|
|
340
341
|
// we fall through to proceed with scanning
|
|
341
342
|
// numbers
|
|
342
|
-
case
|
|
343
|
-
case
|
|
344
|
-
case
|
|
345
|
-
case
|
|
346
|
-
case
|
|
347
|
-
case
|
|
348
|
-
case
|
|
349
|
-
case
|
|
350
|
-
case
|
|
351
|
-
case
|
|
343
|
+
case CharacterCodes._0:
|
|
344
|
+
case CharacterCodes._1:
|
|
345
|
+
case CharacterCodes._2:
|
|
346
|
+
case CharacterCodes._3:
|
|
347
|
+
case CharacterCodes._4:
|
|
348
|
+
case CharacterCodes._5:
|
|
349
|
+
case CharacterCodes._6:
|
|
350
|
+
case CharacterCodes._7:
|
|
351
|
+
case CharacterCodes._8:
|
|
352
|
+
case CharacterCodes._9:
|
|
352
353
|
value += scanNumber();
|
|
353
|
-
return token =
|
|
354
|
+
return token = SyntaxKind.NumericLiteral;
|
|
354
355
|
// literals and unknown symbols
|
|
355
356
|
default:
|
|
356
357
|
// is a literal? Read the full word.
|
|
@@ -362,16 +363,16 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
362
363
|
value = text.substring(tokenOffset, pos);
|
|
363
364
|
// keywords: true, false, null
|
|
364
365
|
switch (value) {
|
|
365
|
-
case 'true': return token =
|
|
366
|
-
case 'false': return token =
|
|
367
|
-
case 'null': return token =
|
|
366
|
+
case 'true': return token = SyntaxKind.TrueKeyword;
|
|
367
|
+
case 'false': return token = SyntaxKind.FalseKeyword;
|
|
368
|
+
case 'null': return token = SyntaxKind.NullKeyword;
|
|
368
369
|
}
|
|
369
|
-
return token =
|
|
370
|
+
return token = SyntaxKind.Unknown;
|
|
370
371
|
}
|
|
371
372
|
// some
|
|
372
373
|
value += String.fromCharCode(code);
|
|
373
374
|
pos++;
|
|
374
|
-
return token =
|
|
375
|
+
return token = SyntaxKind.Unknown;
|
|
375
376
|
}
|
|
376
377
|
}
|
|
377
378
|
function isUnknownContentCharacter(code) {
|
|
@@ -379,14 +380,14 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
379
380
|
return false;
|
|
380
381
|
}
|
|
381
382
|
switch (code) {
|
|
382
|
-
case
|
|
383
|
-
case
|
|
384
|
-
case
|
|
385
|
-
case
|
|
386
|
-
case
|
|
387
|
-
case
|
|
388
|
-
case
|
|
389
|
-
case
|
|
383
|
+
case CharacterCodes.closeBrace:
|
|
384
|
+
case CharacterCodes.closeBracket:
|
|
385
|
+
case CharacterCodes.openBrace:
|
|
386
|
+
case CharacterCodes.openBracket:
|
|
387
|
+
case CharacterCodes.doubleQuote:
|
|
388
|
+
case CharacterCodes.colon:
|
|
389
|
+
case CharacterCodes.comma:
|
|
390
|
+
case CharacterCodes.slash:
|
|
390
391
|
return false;
|
|
391
392
|
}
|
|
392
393
|
return true;
|
|
@@ -395,7 +396,7 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
395
396
|
let result;
|
|
396
397
|
do {
|
|
397
398
|
result = scanNext();
|
|
398
|
-
} while (result >=
|
|
399
|
+
} while (result >= SyntaxKind.LineCommentTrivia && result <= SyntaxKind.Trivia);
|
|
399
400
|
return result;
|
|
400
401
|
}
|
|
401
402
|
return {
|
|
@@ -410,15 +411,15 @@ function createScanner(text, ignoreTrivia = false) {
|
|
|
410
411
|
};
|
|
411
412
|
}
|
|
412
413
|
function isWhitespace(ch) {
|
|
413
|
-
return ch ===
|
|
414
|
-
ch ===
|
|
415
|
-
ch ===
|
|
414
|
+
return ch === CharacterCodes.space || ch === CharacterCodes.tab || ch === CharacterCodes.verticalTab || ch === CharacterCodes.formFeed ||
|
|
415
|
+
ch === CharacterCodes.nonBreakingSpace || ch === CharacterCodes.ogham || ch >= CharacterCodes.enQuad && ch <= CharacterCodes.zeroWidthSpace ||
|
|
416
|
+
ch === CharacterCodes.narrowNoBreakSpace || ch === CharacterCodes.mathematicalSpace || ch === CharacterCodes.ideographicSpace || ch === CharacterCodes.byteOrderMark;
|
|
416
417
|
}
|
|
417
418
|
function isLineBreak(ch) {
|
|
418
|
-
return ch ===
|
|
419
|
+
return ch === CharacterCodes.lineFeed || ch === CharacterCodes.carriageReturn || ch === CharacterCodes.lineSeparator || ch === CharacterCodes.paragraphSeparator;
|
|
419
420
|
}
|
|
420
421
|
function isDigit(ch) {
|
|
421
|
-
return ch >=
|
|
422
|
+
return ch >= CharacterCodes._0 && ch <= CharacterCodes._9;
|
|
422
423
|
}
|
|
423
424
|
var CharacterCodes;
|
|
424
425
|
(function (CharacterCodes) {
|
|
@@ -614,42 +615,42 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
|
614
615
|
while (true) {
|
|
615
616
|
const token = _scanner.scan();
|
|
616
617
|
switch (_scanner.getTokenError()) {
|
|
617
|
-
case
|
|
618
|
-
handleError(
|
|
618
|
+
case ScanError.InvalidUnicode:
|
|
619
|
+
handleError(ParseErrorCode.InvalidUnicode);
|
|
619
620
|
break;
|
|
620
|
-
case
|
|
621
|
-
handleError(
|
|
621
|
+
case ScanError.InvalidEscapeCharacter:
|
|
622
|
+
handleError(ParseErrorCode.InvalidEscapeCharacter);
|
|
622
623
|
break;
|
|
623
|
-
case
|
|
624
|
-
handleError(
|
|
624
|
+
case ScanError.UnexpectedEndOfNumber:
|
|
625
|
+
handleError(ParseErrorCode.UnexpectedEndOfNumber);
|
|
625
626
|
break;
|
|
626
|
-
case
|
|
627
|
+
case ScanError.UnexpectedEndOfComment:
|
|
627
628
|
if (!disallowComments) {
|
|
628
|
-
handleError(
|
|
629
|
+
handleError(ParseErrorCode.UnexpectedEndOfComment);
|
|
629
630
|
}
|
|
630
631
|
break;
|
|
631
|
-
case
|
|
632
|
-
handleError(
|
|
632
|
+
case ScanError.UnexpectedEndOfString:
|
|
633
|
+
handleError(ParseErrorCode.UnexpectedEndOfString);
|
|
633
634
|
break;
|
|
634
|
-
case
|
|
635
|
-
handleError(
|
|
635
|
+
case ScanError.InvalidCharacter:
|
|
636
|
+
handleError(ParseErrorCode.InvalidCharacter);
|
|
636
637
|
break;
|
|
637
638
|
}
|
|
638
639
|
switch (token) {
|
|
639
|
-
case
|
|
640
|
-
case
|
|
640
|
+
case SyntaxKind.LineCommentTrivia:
|
|
641
|
+
case SyntaxKind.BlockCommentTrivia:
|
|
641
642
|
if (disallowComments) {
|
|
642
|
-
handleError(
|
|
643
|
+
handleError(ParseErrorCode.InvalidCommentToken);
|
|
643
644
|
}
|
|
644
645
|
else {
|
|
645
646
|
onComment();
|
|
646
647
|
}
|
|
647
648
|
break;
|
|
648
|
-
case
|
|
649
|
-
handleError(
|
|
649
|
+
case SyntaxKind.Unknown:
|
|
650
|
+
handleError(ParseErrorCode.InvalidSymbol);
|
|
650
651
|
break;
|
|
651
|
-
case
|
|
652
|
-
case
|
|
652
|
+
case SyntaxKind.Trivia:
|
|
653
|
+
case SyntaxKind.LineBreakTrivia:
|
|
653
654
|
break;
|
|
654
655
|
default:
|
|
655
656
|
return token;
|
|
@@ -660,7 +661,7 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
|
660
661
|
onError(error);
|
|
661
662
|
if (skipUntilAfter.length + skipUntil.length > 0) {
|
|
662
663
|
let token = _scanner.getToken();
|
|
663
|
-
while (token !==
|
|
664
|
+
while (token !== SyntaxKind.EOF) {
|
|
664
665
|
if (skipUntilAfter.indexOf(token) !== -1) {
|
|
665
666
|
scanNext();
|
|
666
667
|
break;
|
|
@@ -685,28 +686,28 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
|
685
686
|
}
|
|
686
687
|
function parseLiteral() {
|
|
687
688
|
switch (_scanner.getToken()) {
|
|
688
|
-
case
|
|
689
|
+
case SyntaxKind.NumericLiteral: {
|
|
689
690
|
let value = 0;
|
|
690
691
|
try {
|
|
691
692
|
value = JSON.parse(_scanner.getTokenValue());
|
|
692
693
|
if (typeof value !== 'number') {
|
|
693
|
-
handleError(
|
|
694
|
+
handleError(ParseErrorCode.InvalidNumberFormat);
|
|
694
695
|
value = 0;
|
|
695
696
|
}
|
|
696
697
|
}
|
|
697
698
|
catch (e) {
|
|
698
|
-
handleError(
|
|
699
|
+
handleError(ParseErrorCode.InvalidNumberFormat);
|
|
699
700
|
}
|
|
700
701
|
onLiteralValue(value);
|
|
701
702
|
break;
|
|
702
703
|
}
|
|
703
|
-
case
|
|
704
|
+
case SyntaxKind.NullKeyword:
|
|
704
705
|
onLiteralValue(null);
|
|
705
706
|
break;
|
|
706
|
-
case
|
|
707
|
+
case SyntaxKind.TrueKeyword:
|
|
707
708
|
onLiteralValue(true);
|
|
708
709
|
break;
|
|
709
|
-
case
|
|
710
|
+
case SyntaxKind.FalseKeyword:
|
|
710
711
|
onLiteralValue(false);
|
|
711
712
|
break;
|
|
712
713
|
default:
|
|
@@ -716,20 +717,20 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
|
716
717
|
return true;
|
|
717
718
|
}
|
|
718
719
|
function parseProperty() {
|
|
719
|
-
if (_scanner.getToken() !==
|
|
720
|
-
handleError(
|
|
720
|
+
if (_scanner.getToken() !== SyntaxKind.StringLiteral) {
|
|
721
|
+
handleError(ParseErrorCode.PropertyNameExpected, [], [SyntaxKind.CloseBraceToken, SyntaxKind.CommaToken]);
|
|
721
722
|
return false;
|
|
722
723
|
}
|
|
723
724
|
parseString(false);
|
|
724
|
-
if (_scanner.getToken() ===
|
|
725
|
+
if (_scanner.getToken() === SyntaxKind.ColonToken) {
|
|
725
726
|
onSeparator(':');
|
|
726
727
|
scanNext(); // consume colon
|
|
727
728
|
if (!parseValue()) {
|
|
728
|
-
handleError(
|
|
729
|
+
handleError(ParseErrorCode.ValueExpected, [], [SyntaxKind.CloseBraceToken, SyntaxKind.CommaToken]);
|
|
729
730
|
}
|
|
730
731
|
}
|
|
731
732
|
else {
|
|
732
|
-
handleError(
|
|
733
|
+
handleError(ParseErrorCode.ColonExpected, [], [SyntaxKind.CloseBraceToken, SyntaxKind.CommaToken]);
|
|
733
734
|
}
|
|
734
735
|
return true;
|
|
735
736
|
}
|
|
@@ -737,28 +738,28 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
|
737
738
|
onObjectBegin();
|
|
738
739
|
scanNext(); // consume open brace
|
|
739
740
|
let needsComma = false;
|
|
740
|
-
while (_scanner.getToken() !==
|
|
741
|
-
if (_scanner.getToken() ===
|
|
741
|
+
while (_scanner.getToken() !== SyntaxKind.CloseBraceToken && _scanner.getToken() !== SyntaxKind.EOF) {
|
|
742
|
+
if (_scanner.getToken() === SyntaxKind.CommaToken) {
|
|
742
743
|
if (!needsComma) {
|
|
743
|
-
handleError(
|
|
744
|
+
handleError(ParseErrorCode.ValueExpected, [], []);
|
|
744
745
|
}
|
|
745
746
|
onSeparator(',');
|
|
746
747
|
scanNext(); // consume comma
|
|
747
|
-
if (_scanner.getToken() ===
|
|
748
|
+
if (_scanner.getToken() === SyntaxKind.CloseBraceToken && allowTrailingComma) {
|
|
748
749
|
break;
|
|
749
750
|
}
|
|
750
751
|
}
|
|
751
752
|
else if (needsComma) {
|
|
752
|
-
handleError(
|
|
753
|
+
handleError(ParseErrorCode.CommaExpected, [], []);
|
|
753
754
|
}
|
|
754
755
|
if (!parseProperty()) {
|
|
755
|
-
handleError(
|
|
756
|
+
handleError(ParseErrorCode.ValueExpected, [], [SyntaxKind.CloseBraceToken, SyntaxKind.CommaToken]);
|
|
756
757
|
}
|
|
757
758
|
needsComma = true;
|
|
758
759
|
}
|
|
759
760
|
onObjectEnd();
|
|
760
|
-
if (_scanner.getToken() !==
|
|
761
|
-
handleError(
|
|
761
|
+
if (_scanner.getToken() !== SyntaxKind.CloseBraceToken) {
|
|
762
|
+
handleError(ParseErrorCode.CloseBraceExpected, [SyntaxKind.CloseBraceToken], []);
|
|
762
763
|
}
|
|
763
764
|
else {
|
|
764
765
|
scanNext(); // consume close brace
|
|
@@ -769,28 +770,28 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
|
769
770
|
onArrayBegin();
|
|
770
771
|
scanNext(); // consume open bracket
|
|
771
772
|
let needsComma = false;
|
|
772
|
-
while (_scanner.getToken() !==
|
|
773
|
-
if (_scanner.getToken() ===
|
|
773
|
+
while (_scanner.getToken() !== SyntaxKind.CloseBracketToken && _scanner.getToken() !== SyntaxKind.EOF) {
|
|
774
|
+
if (_scanner.getToken() === SyntaxKind.CommaToken) {
|
|
774
775
|
if (!needsComma) {
|
|
775
|
-
handleError(
|
|
776
|
+
handleError(ParseErrorCode.ValueExpected, [], []);
|
|
776
777
|
}
|
|
777
778
|
onSeparator(',');
|
|
778
779
|
scanNext(); // consume comma
|
|
779
|
-
if (_scanner.getToken() ===
|
|
780
|
+
if (_scanner.getToken() === SyntaxKind.CloseBracketToken && allowTrailingComma) {
|
|
780
781
|
break;
|
|
781
782
|
}
|
|
782
783
|
}
|
|
783
784
|
else if (needsComma) {
|
|
784
|
-
handleError(
|
|
785
|
+
handleError(ParseErrorCode.CommaExpected, [], []);
|
|
785
786
|
}
|
|
786
787
|
if (!parseValue()) {
|
|
787
|
-
handleError(
|
|
788
|
+
handleError(ParseErrorCode.ValueExpected, [], [SyntaxKind.CloseBracketToken, SyntaxKind.CommaToken]);
|
|
788
789
|
}
|
|
789
790
|
needsComma = true;
|
|
790
791
|
}
|
|
791
792
|
onArrayEnd();
|
|
792
|
-
if (_scanner.getToken() !==
|
|
793
|
-
handleError(
|
|
793
|
+
if (_scanner.getToken() !== SyntaxKind.CloseBracketToken) {
|
|
794
|
+
handleError(ParseErrorCode.CloseBracketExpected, [SyntaxKind.CloseBracketToken], []);
|
|
794
795
|
}
|
|
795
796
|
else {
|
|
796
797
|
scanNext(); // consume close bracket
|
|
@@ -799,30 +800,30 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
|
799
800
|
}
|
|
800
801
|
function parseValue() {
|
|
801
802
|
switch (_scanner.getToken()) {
|
|
802
|
-
case
|
|
803
|
+
case SyntaxKind.OpenBracketToken:
|
|
803
804
|
return parseArray();
|
|
804
|
-
case
|
|
805
|
+
case SyntaxKind.OpenBraceToken:
|
|
805
806
|
return parseObject();
|
|
806
|
-
case
|
|
807
|
+
case SyntaxKind.StringLiteral:
|
|
807
808
|
return parseString(true);
|
|
808
809
|
default:
|
|
809
810
|
return parseLiteral();
|
|
810
811
|
}
|
|
811
812
|
}
|
|
812
813
|
scanNext();
|
|
813
|
-
if (_scanner.getToken() ===
|
|
814
|
+
if (_scanner.getToken() === SyntaxKind.EOF) {
|
|
814
815
|
if (options.allowEmptyContent) {
|
|
815
816
|
return true;
|
|
816
817
|
}
|
|
817
|
-
handleError(
|
|
818
|
+
handleError(ParseErrorCode.ValueExpected, [], []);
|
|
818
819
|
return false;
|
|
819
820
|
}
|
|
820
821
|
if (!parseValue()) {
|
|
821
|
-
handleError(
|
|
822
|
+
handleError(ParseErrorCode.ValueExpected, [], []);
|
|
822
823
|
return false;
|
|
823
824
|
}
|
|
824
|
-
if (_scanner.getToken() !==
|
|
825
|
-
handleError(
|
|
825
|
+
if (_scanner.getToken() !== SyntaxKind.EOF) {
|
|
826
|
+
handleError(ParseErrorCode.EndOfFileExpected, [], []);
|
|
826
827
|
}
|
|
827
828
|
return true;
|
|
828
829
|
}
|
|
@@ -863,7 +864,7 @@ function _format(message, args) {
|
|
|
863
864
|
if (typeof arg === 'string') {
|
|
864
865
|
result = arg;
|
|
865
866
|
}
|
|
866
|
-
else if (typeof arg === 'number' || typeof arg === 'boolean' || arg ===
|
|
867
|
+
else if (typeof arg === 'number' || typeof arg === 'boolean' || arg === undefined || arg === null) {
|
|
867
868
|
result = String(arg);
|
|
868
869
|
}
|
|
869
870
|
return result;
|
|
@@ -909,15 +910,15 @@ function lookupMessage(index, fallback) {
|
|
|
909
910
|
*/
|
|
910
911
|
function getParseErrorMessage(errorCode) {
|
|
911
912
|
switch (errorCode) {
|
|
912
|
-
case
|
|
913
|
-
case
|
|
914
|
-
case
|
|
915
|
-
case
|
|
916
|
-
case
|
|
917
|
-
case
|
|
918
|
-
case
|
|
919
|
-
case
|
|
920
|
-
case
|
|
913
|
+
case ParseErrorCode.InvalidSymbol: return localize('error.invalidSymbol', 'Invalid symbol');
|
|
914
|
+
case ParseErrorCode.InvalidNumberFormat: return localize('error.invalidNumberFormat', 'Invalid number format');
|
|
915
|
+
case ParseErrorCode.PropertyNameExpected: return localize('error.propertyNameExpected', 'Property name expected');
|
|
916
|
+
case ParseErrorCode.ValueExpected: return localize('error.valueExpected', 'Value expected');
|
|
917
|
+
case ParseErrorCode.ColonExpected: return localize('error.colonExpected', 'Colon expected');
|
|
918
|
+
case ParseErrorCode.CommaExpected: return localize('error.commaExpected', 'Comma expected');
|
|
919
|
+
case ParseErrorCode.CloseBraceExpected: return localize('error.closeBraceExpected', 'Closing brace expected');
|
|
920
|
+
case ParseErrorCode.CloseBracketExpected: return localize('error.closeBracketExpected', 'Closing bracket expected');
|
|
921
|
+
case ParseErrorCode.EndOfFileExpected: return localize('error.endOfFileExpected', 'End of file expected');
|
|
921
922
|
default:
|
|
922
923
|
return '';
|
|
923
924
|
}
|
|
@@ -937,7 +938,7 @@ function requireArray () {
|
|
|
937
938
|
if (hasRequiredArray) return array;
|
|
938
939
|
hasRequiredArray = 1;
|
|
939
940
|
Object.defineProperty(array, "__esModule", { value: true });
|
|
940
|
-
array.splitWhen = array.flatten =
|
|
941
|
+
array.splitWhen = array.flatten = undefined;
|
|
941
942
|
function flatten(items) {
|
|
942
943
|
return items.reduce((collection, item) => [].concat(collection, item), []);
|
|
943
944
|
}
|
|
@@ -968,7 +969,7 @@ function requireErrno () {
|
|
|
968
969
|
if (hasRequiredErrno) return errno;
|
|
969
970
|
hasRequiredErrno = 1;
|
|
970
971
|
Object.defineProperty(errno, "__esModule", { value: true });
|
|
971
|
-
errno.isEnoentCodeError =
|
|
972
|
+
errno.isEnoentCodeError = undefined;
|
|
972
973
|
function isEnoentCodeError(error) {
|
|
973
974
|
return error.code === 'ENOENT';
|
|
974
975
|
}
|
|
@@ -984,7 +985,7 @@ function requireFs$3 () {
|
|
|
984
985
|
if (hasRequiredFs$3) return fs$3;
|
|
985
986
|
hasRequiredFs$3 = 1;
|
|
986
987
|
Object.defineProperty(fs$3, "__esModule", { value: true });
|
|
987
|
-
fs$3.createDirentFromStats =
|
|
988
|
+
fs$3.createDirentFromStats = undefined;
|
|
988
989
|
class DirentFromStats {
|
|
989
990
|
constructor(name, stats) {
|
|
990
991
|
this.name = name;
|
|
@@ -1012,7 +1013,7 @@ function requirePath () {
|
|
|
1012
1013
|
if (hasRequiredPath) return path;
|
|
1013
1014
|
hasRequiredPath = 1;
|
|
1014
1015
|
Object.defineProperty(path, "__esModule", { value: true });
|
|
1015
|
-
path.convertPosixPathToPattern = path.convertWindowsPathToPattern = path.convertPathToPattern = path.escapePosixPath = path.escapeWindowsPath = path.escape = path.removeLeadingDotSegment = path.makeAbsolute = path.unixify =
|
|
1016
|
+
path.convertPosixPathToPattern = path.convertWindowsPathToPattern = path.convertPathToPattern = path.escapePosixPath = path.escapeWindowsPath = path.escape = path.removeLeadingDotSegment = path.makeAbsolute = path.unixify = undefined;
|
|
1016
1017
|
const os = require$$0;
|
|
1017
1018
|
const path$1 = path__default;
|
|
1018
1019
|
const IS_WINDOWS_PLATFORM = os.platform() === 'win32';
|
|
@@ -1540,7 +1541,7 @@ function requireToRegexRange () {
|
|
|
1540
1541
|
throw new TypeError('toRegexRange: expected the first argument to be a number');
|
|
1541
1542
|
}
|
|
1542
1543
|
|
|
1543
|
-
if (max ===
|
|
1544
|
+
if (max === undefined || min === max) {
|
|
1544
1545
|
return String(min);
|
|
1545
1546
|
}
|
|
1546
1547
|
|
|
@@ -1612,9 +1613,9 @@ function requireToRegexRange () {
|
|
|
1612
1613
|
};
|
|
1613
1614
|
|
|
1614
1615
|
function collatePatterns(neg, pos, options) {
|
|
1615
|
-
let onlyNegative = filterPatterns(neg, pos, '-', false)
|
|
1616
|
-
let onlyPositive = filterPatterns(pos, neg, '', false)
|
|
1617
|
-
let intersected = filterPatterns(neg, pos, '-?', true)
|
|
1616
|
+
let onlyNegative = filterPatterns(neg, pos, '-', false);
|
|
1617
|
+
let onlyPositive = filterPatterns(pos, neg, '', false);
|
|
1618
|
+
let intersected = filterPatterns(neg, pos, '-?', true);
|
|
1618
1619
|
let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
|
|
1619
1620
|
return subpatterns.join('|');
|
|
1620
1621
|
}
|
|
@@ -4383,7 +4384,7 @@ function requireParse () {
|
|
|
4383
4384
|
}
|
|
4384
4385
|
|
|
4385
4386
|
if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
|
|
4386
|
-
const end = rest[1] !==
|
|
4387
|
+
const end = rest[1] !== undefined ? '|$' : '';
|
|
4387
4388
|
|
|
4388
4389
|
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
|
4389
4390
|
prior.output = `(?:${prior.output}`;
|
|
@@ -5339,7 +5340,7 @@ function requireMicromatch () {
|
|
|
5339
5340
|
let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
|
|
5340
5341
|
|
|
5341
5342
|
if (match) {
|
|
5342
|
-
return match.slice(1).map(v => v ===
|
|
5343
|
+
return match.slice(1).map(v => v === undefined ? '' : v);
|
|
5343
5344
|
}
|
|
5344
5345
|
};
|
|
5345
5346
|
|
|
@@ -5451,7 +5452,7 @@ function requirePattern () {
|
|
|
5451
5452
|
if (hasRequiredPattern) return pattern;
|
|
5452
5453
|
hasRequiredPattern = 1;
|
|
5453
5454
|
Object.defineProperty(pattern, "__esModule", { value: true });
|
|
5454
|
-
pattern.removeDuplicateSlashes = pattern.matchAny = pattern.convertPatternsToRe = pattern.makeRe = pattern.getPatternParts = pattern.expandBraceExpansion = pattern.expandPatternsWithBraceExpansion = pattern.isAffectDepthOfReadingPattern = pattern.endsWithSlashGlobStar = pattern.hasGlobStar = pattern.getBaseDirectory = pattern.isPatternRelatedToParentDirectory = pattern.getPatternsOutsideCurrentDirectory = pattern.getPatternsInsideCurrentDirectory = pattern.getPositivePatterns = pattern.getNegativePatterns = pattern.isPositivePattern = pattern.isNegativePattern = pattern.convertToNegativePattern = pattern.convertToPositivePattern = pattern.isDynamicPattern = pattern.isStaticPattern =
|
|
5455
|
+
pattern.isAbsolute = pattern.partitionAbsoluteAndRelative = pattern.removeDuplicateSlashes = pattern.matchAny = pattern.convertPatternsToRe = pattern.makeRe = pattern.getPatternParts = pattern.expandBraceExpansion = pattern.expandPatternsWithBraceExpansion = pattern.isAffectDepthOfReadingPattern = pattern.endsWithSlashGlobStar = pattern.hasGlobStar = pattern.getBaseDirectory = pattern.isPatternRelatedToParentDirectory = pattern.getPatternsOutsideCurrentDirectory = pattern.getPatternsInsideCurrentDirectory = pattern.getPositivePatterns = pattern.getNegativePatterns = pattern.isPositivePattern = pattern.isNegativePattern = pattern.convertToNegativePattern = pattern.convertToPositivePattern = pattern.isDynamicPattern = pattern.isStaticPattern = undefined;
|
|
5455
5456
|
const path = path__default;
|
|
5456
5457
|
const globParent = requireGlobParent();
|
|
5457
5458
|
const micromatch = requireMicromatch();
|
|
@@ -5637,6 +5638,24 @@ function requirePattern () {
|
|
|
5637
5638
|
return pattern.replace(DOUBLE_SLASH_RE, '/');
|
|
5638
5639
|
}
|
|
5639
5640
|
pattern.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
5641
|
+
function partitionAbsoluteAndRelative(patterns) {
|
|
5642
|
+
const absolute = [];
|
|
5643
|
+
const relative = [];
|
|
5644
|
+
for (const pattern of patterns) {
|
|
5645
|
+
if (isAbsolute(pattern)) {
|
|
5646
|
+
absolute.push(pattern);
|
|
5647
|
+
}
|
|
5648
|
+
else {
|
|
5649
|
+
relative.push(pattern);
|
|
5650
|
+
}
|
|
5651
|
+
}
|
|
5652
|
+
return [absolute, relative];
|
|
5653
|
+
}
|
|
5654
|
+
pattern.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
5655
|
+
function isAbsolute(pattern) {
|
|
5656
|
+
return path.isAbsolute(pattern);
|
|
5657
|
+
}
|
|
5658
|
+
pattern.isAbsolute = isAbsolute;
|
|
5640
5659
|
return pattern;
|
|
5641
5660
|
}
|
|
5642
5661
|
|
|
@@ -5800,7 +5819,7 @@ function requireStream$3 () {
|
|
|
5800
5819
|
if (hasRequiredStream$3) return stream$3;
|
|
5801
5820
|
hasRequiredStream$3 = 1;
|
|
5802
5821
|
Object.defineProperty(stream$3, "__esModule", { value: true });
|
|
5803
|
-
stream$3.merge =
|
|
5822
|
+
stream$3.merge = undefined;
|
|
5804
5823
|
const merge2 = requireMerge2();
|
|
5805
5824
|
function merge(streams) {
|
|
5806
5825
|
const mergedStream = merge2(streams);
|
|
@@ -5826,7 +5845,7 @@ function requireString () {
|
|
|
5826
5845
|
if (hasRequiredString) return string;
|
|
5827
5846
|
hasRequiredString = 1;
|
|
5828
5847
|
Object.defineProperty(string, "__esModule", { value: true });
|
|
5829
|
-
string.isEmpty = string.isString =
|
|
5848
|
+
string.isEmpty = string.isString = undefined;
|
|
5830
5849
|
function isString(input) {
|
|
5831
5850
|
return typeof input === 'string';
|
|
5832
5851
|
}
|
|
@@ -5844,7 +5863,7 @@ function requireUtils$1 () {
|
|
|
5844
5863
|
if (hasRequiredUtils$1) return utils$3;
|
|
5845
5864
|
hasRequiredUtils$1 = 1;
|
|
5846
5865
|
Object.defineProperty(utils$3, "__esModule", { value: true });
|
|
5847
|
-
utils$3.string = utils$3.stream = utils$3.pattern = utils$3.path = utils$3.fs = utils$3.errno = utils$3.array =
|
|
5866
|
+
utils$3.string = utils$3.stream = utils$3.pattern = utils$3.path = utils$3.fs = utils$3.errno = utils$3.array = undefined;
|
|
5848
5867
|
const array = requireArray();
|
|
5849
5868
|
utils$3.array = array;
|
|
5850
5869
|
const errno = requireErrno();
|
|
@@ -5868,7 +5887,7 @@ function requireTasks () {
|
|
|
5868
5887
|
if (hasRequiredTasks) return tasks;
|
|
5869
5888
|
hasRequiredTasks = 1;
|
|
5870
5889
|
Object.defineProperty(tasks, "__esModule", { value: true });
|
|
5871
|
-
tasks.convertPatternGroupToTask = tasks.convertPatternGroupsToTasks = tasks.groupPatternsByBaseDirectory = tasks.getNegativePatternsAsPositive = tasks.getPositivePatterns = tasks.convertPatternsToTasks = tasks.generate =
|
|
5890
|
+
tasks.convertPatternGroupToTask = tasks.convertPatternGroupsToTasks = tasks.groupPatternsByBaseDirectory = tasks.getNegativePatternsAsPositive = tasks.getPositivePatterns = tasks.convertPatternsToTasks = tasks.generate = undefined;
|
|
5872
5891
|
const utils = requireUtils$1();
|
|
5873
5892
|
function generate(input, settings) {
|
|
5874
5893
|
const patterns = processPatterns(input, settings);
|
|
@@ -6003,7 +6022,7 @@ function requireAsync$5 () {
|
|
|
6003
6022
|
if (hasRequiredAsync$5) return async;
|
|
6004
6023
|
hasRequiredAsync$5 = 1;
|
|
6005
6024
|
Object.defineProperty(async, "__esModule", { value: true });
|
|
6006
|
-
async.read =
|
|
6025
|
+
async.read = undefined;
|
|
6007
6026
|
function read(path, settings, callback) {
|
|
6008
6027
|
settings.fs.lstat(path, (lstatError, lstat) => {
|
|
6009
6028
|
if (lstatError !== null) {
|
|
@@ -6048,7 +6067,7 @@ function requireSync$5 () {
|
|
|
6048
6067
|
if (hasRequiredSync$5) return sync$5;
|
|
6049
6068
|
hasRequiredSync$5 = 1;
|
|
6050
6069
|
Object.defineProperty(sync$5, "__esModule", { value: true });
|
|
6051
|
-
sync$5.read =
|
|
6070
|
+
sync$5.read = undefined;
|
|
6052
6071
|
function read(path, settings) {
|
|
6053
6072
|
const lstat = settings.fs.lstatSync(path);
|
|
6054
6073
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
@@ -6083,7 +6102,7 @@ function requireFs$2 () {
|
|
|
6083
6102
|
hasRequiredFs$2 = 1;
|
|
6084
6103
|
(function (exports) {
|
|
6085
6104
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6086
|
-
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER =
|
|
6105
|
+
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = undefined;
|
|
6087
6106
|
const fs = require$$0$3;
|
|
6088
6107
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
6089
6108
|
lstat: fs.lstat,
|
|
@@ -6118,7 +6137,7 @@ function requireSettings$3 () {
|
|
|
6118
6137
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
6119
6138
|
}
|
|
6120
6139
|
_getValue(option, value) {
|
|
6121
|
-
return option !== null && option !==
|
|
6140
|
+
return option !== null && option !== undefined ? option : value;
|
|
6122
6141
|
}
|
|
6123
6142
|
}
|
|
6124
6143
|
settings$3.default = Settings;
|
|
@@ -6131,7 +6150,7 @@ function requireOut$3 () {
|
|
|
6131
6150
|
if (hasRequiredOut$3) return out$1;
|
|
6132
6151
|
hasRequiredOut$3 = 1;
|
|
6133
6152
|
Object.defineProperty(out$1, "__esModule", { value: true });
|
|
6134
|
-
out$1.statSync = out$1.stat = out$1.Settings =
|
|
6153
|
+
out$1.statSync = out$1.stat = out$1.Settings = undefined;
|
|
6135
6154
|
const async = requireAsync$5();
|
|
6136
6155
|
const sync = requireSync$5();
|
|
6137
6156
|
const settings_1 = requireSettings$3();
|
|
@@ -6246,7 +6265,7 @@ function requireConstants () {
|
|
|
6246
6265
|
if (hasRequiredConstants) return constants;
|
|
6247
6266
|
hasRequiredConstants = 1;
|
|
6248
6267
|
Object.defineProperty(constants, "__esModule", { value: true });
|
|
6249
|
-
constants.IS_SUPPORT_READDIR_WITH_FILE_TYPES =
|
|
6268
|
+
constants.IS_SUPPORT_READDIR_WITH_FILE_TYPES = undefined;
|
|
6250
6269
|
const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
|
|
6251
6270
|
if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {
|
|
6252
6271
|
throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
|
|
@@ -6274,7 +6293,7 @@ function requireFs$1 () {
|
|
|
6274
6293
|
if (hasRequiredFs$1) return fs$1;
|
|
6275
6294
|
hasRequiredFs$1 = 1;
|
|
6276
6295
|
Object.defineProperty(fs$1, "__esModule", { value: true });
|
|
6277
|
-
fs$1.createDirentFromStats =
|
|
6296
|
+
fs$1.createDirentFromStats = undefined;
|
|
6278
6297
|
class DirentFromStats {
|
|
6279
6298
|
constructor(name, stats) {
|
|
6280
6299
|
this.name = name;
|
|
@@ -6300,7 +6319,7 @@ function requireUtils () {
|
|
|
6300
6319
|
if (hasRequiredUtils) return utils;
|
|
6301
6320
|
hasRequiredUtils = 1;
|
|
6302
6321
|
Object.defineProperty(utils, "__esModule", { value: true });
|
|
6303
|
-
utils.fs =
|
|
6322
|
+
utils.fs = undefined;
|
|
6304
6323
|
const fs = requireFs$1();
|
|
6305
6324
|
utils.fs = fs;
|
|
6306
6325
|
return utils;
|
|
@@ -6314,7 +6333,7 @@ function requireCommon$1 () {
|
|
|
6314
6333
|
if (hasRequiredCommon$1) return common$1;
|
|
6315
6334
|
hasRequiredCommon$1 = 1;
|
|
6316
6335
|
Object.defineProperty(common$1, "__esModule", { value: true });
|
|
6317
|
-
common$1.joinPathSegments =
|
|
6336
|
+
common$1.joinPathSegments = undefined;
|
|
6318
6337
|
function joinPathSegments(a, b, separator) {
|
|
6319
6338
|
/**
|
|
6320
6339
|
* The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
|
|
@@ -6334,7 +6353,7 @@ function requireAsync$4 () {
|
|
|
6334
6353
|
if (hasRequiredAsync$4) return async$1;
|
|
6335
6354
|
hasRequiredAsync$4 = 1;
|
|
6336
6355
|
Object.defineProperty(async$1, "__esModule", { value: true });
|
|
6337
|
-
async$1.readdir = async$1.readdirWithFileTypes = async$1.read =
|
|
6356
|
+
async$1.readdir = async$1.readdirWithFileTypes = async$1.read = undefined;
|
|
6338
6357
|
const fsStat = requireOut$3();
|
|
6339
6358
|
const rpl = requireRunParallel();
|
|
6340
6359
|
const constants_1 = requireConstants();
|
|
@@ -6447,7 +6466,7 @@ function requireSync$4 () {
|
|
|
6447
6466
|
if (hasRequiredSync$4) return sync$4;
|
|
6448
6467
|
hasRequiredSync$4 = 1;
|
|
6449
6468
|
Object.defineProperty(sync$4, "__esModule", { value: true });
|
|
6450
|
-
sync$4.readdir = sync$4.readdirWithFileTypes = sync$4.read =
|
|
6469
|
+
sync$4.readdir = sync$4.readdirWithFileTypes = sync$4.read = undefined;
|
|
6451
6470
|
const fsStat = requireOut$3();
|
|
6452
6471
|
const constants_1 = requireConstants();
|
|
6453
6472
|
const utils = requireUtils();
|
|
@@ -6513,7 +6532,7 @@ function requireFs () {
|
|
|
6513
6532
|
hasRequiredFs = 1;
|
|
6514
6533
|
(function (exports) {
|
|
6515
6534
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6516
|
-
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER =
|
|
6535
|
+
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = undefined;
|
|
6517
6536
|
const fs = require$$0$3;
|
|
6518
6537
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
6519
6538
|
lstat: fs.lstat,
|
|
@@ -6558,7 +6577,7 @@ function requireSettings$2 () {
|
|
|
6558
6577
|
});
|
|
6559
6578
|
}
|
|
6560
6579
|
_getValue(option, value) {
|
|
6561
|
-
return option !== null && option !==
|
|
6580
|
+
return option !== null && option !== undefined ? option : value;
|
|
6562
6581
|
}
|
|
6563
6582
|
}
|
|
6564
6583
|
settings$2.default = Settings;
|
|
@@ -6571,7 +6590,7 @@ function requireOut$2 () {
|
|
|
6571
6590
|
if (hasRequiredOut$2) return out$2;
|
|
6572
6591
|
hasRequiredOut$2 = 1;
|
|
6573
6592
|
Object.defineProperty(out$2, "__esModule", { value: true });
|
|
6574
|
-
out$2.Settings = out$2.scandirSync = out$2.scandir =
|
|
6593
|
+
out$2.Settings = out$2.scandirSync = out$2.scandir = undefined;
|
|
6575
6594
|
const async = requireAsync$4();
|
|
6576
6595
|
const sync = requireSync$4();
|
|
6577
6596
|
const settings_1 = requireSettings$2();
|
|
@@ -6935,19 +6954,19 @@ function requireQueue () {
|
|
|
6935
6954
|
}
|
|
6936
6955
|
|
|
6937
6956
|
function drained () {
|
|
6938
|
-
if (queue.idle()) {
|
|
6939
|
-
return new Promise(function (resolve) {
|
|
6940
|
-
resolve();
|
|
6941
|
-
})
|
|
6942
|
-
}
|
|
6943
|
-
|
|
6944
|
-
var previousDrain = queue.drain;
|
|
6945
|
-
|
|
6946
6957
|
var p = new Promise(function (resolve) {
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6958
|
+
process.nextTick(function () {
|
|
6959
|
+
if (queue.idle()) {
|
|
6960
|
+
resolve();
|
|
6961
|
+
} else {
|
|
6962
|
+
var previousDrain = queue.drain;
|
|
6963
|
+
queue.drain = function () {
|
|
6964
|
+
if (typeof previousDrain === 'function') previousDrain();
|
|
6965
|
+
resolve();
|
|
6966
|
+
queue.drain = previousDrain;
|
|
6967
|
+
};
|
|
6968
|
+
}
|
|
6969
|
+
});
|
|
6951
6970
|
});
|
|
6952
6971
|
|
|
6953
6972
|
return p
|
|
@@ -6967,7 +6986,7 @@ function requireCommon () {
|
|
|
6967
6986
|
if (hasRequiredCommon) return common;
|
|
6968
6987
|
hasRequiredCommon = 1;
|
|
6969
6988
|
Object.defineProperty(common, "__esModule", { value: true });
|
|
6970
|
-
common.joinPathSegments = common.replacePathSegmentSeparator = common.isAppliedFilter = common.isFatalError =
|
|
6989
|
+
common.joinPathSegments = common.replacePathSegmentSeparator = common.isAppliedFilter = common.isFatalError = undefined;
|
|
6971
6990
|
function isFatalError(settings, error) {
|
|
6972
6991
|
if (settings.errorFilter === null) {
|
|
6973
6992
|
return true;
|
|
@@ -7322,7 +7341,7 @@ function requireSettings$1 () {
|
|
|
7322
7341
|
});
|
|
7323
7342
|
}
|
|
7324
7343
|
_getValue(option, value) {
|
|
7325
|
-
return option !== null && option !==
|
|
7344
|
+
return option !== null && option !== undefined ? option : value;
|
|
7326
7345
|
}
|
|
7327
7346
|
}
|
|
7328
7347
|
settings$1.default = Settings;
|
|
@@ -7335,7 +7354,7 @@ function requireOut$1 () {
|
|
|
7335
7354
|
if (hasRequiredOut$1) return out$3;
|
|
7336
7355
|
hasRequiredOut$1 = 1;
|
|
7337
7356
|
Object.defineProperty(out$3, "__esModule", { value: true });
|
|
7338
|
-
out$3.Settings = out$3.walkStream = out$3.walkSync = out$3.walk =
|
|
7357
|
+
out$3.Settings = out$3.walkStream = out$3.walkSync = out$3.walk = undefined;
|
|
7339
7358
|
const async_1 = requireAsync$2();
|
|
7340
7359
|
const stream_1 = requireStream$2();
|
|
7341
7360
|
const sync_1 = requireSync$2();
|
|
@@ -7708,11 +7727,19 @@ function requireEntry$1 () {
|
|
|
7708
7727
|
this.index = new Map();
|
|
7709
7728
|
}
|
|
7710
7729
|
getFilter(positive, negative) {
|
|
7711
|
-
const
|
|
7712
|
-
const
|
|
7713
|
-
|
|
7730
|
+
const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative);
|
|
7731
|
+
const patterns = {
|
|
7732
|
+
positive: {
|
|
7733
|
+
all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
|
|
7734
|
+
},
|
|
7735
|
+
negative: {
|
|
7736
|
+
absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })),
|
|
7737
|
+
relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }))
|
|
7738
|
+
}
|
|
7739
|
+
};
|
|
7740
|
+
return (entry) => this._filter(entry, patterns);
|
|
7714
7741
|
}
|
|
7715
|
-
_filter(entry,
|
|
7742
|
+
_filter(entry, patterns) {
|
|
7716
7743
|
const filepath = utils.path.removeLeadingDotSegment(entry.path);
|
|
7717
7744
|
if (this._settings.unique && this._isDuplicateEntry(filepath)) {
|
|
7718
7745
|
return false;
|
|
@@ -7720,11 +7747,7 @@ function requireEntry$1 () {
|
|
|
7720
7747
|
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
|
|
7721
7748
|
return false;
|
|
7722
7749
|
}
|
|
7723
|
-
|
|
7724
|
-
return false;
|
|
7725
|
-
}
|
|
7726
|
-
const isDirectory = entry.dirent.isDirectory();
|
|
7727
|
-
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory);
|
|
7750
|
+
const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());
|
|
7728
7751
|
if (this._settings.unique && isMatched) {
|
|
7729
7752
|
this._createIndexRecord(filepath);
|
|
7730
7753
|
}
|
|
@@ -7742,14 +7765,32 @@ function requireEntry$1 () {
|
|
|
7742
7765
|
_onlyDirectoryFilter(entry) {
|
|
7743
7766
|
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
|
7744
7767
|
}
|
|
7745
|
-
|
|
7746
|
-
|
|
7768
|
+
_isMatchToPatternsSet(filepath, patterns, isDirectory) {
|
|
7769
|
+
const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory);
|
|
7770
|
+
if (!isMatched) {
|
|
7771
|
+
return false;
|
|
7772
|
+
}
|
|
7773
|
+
const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory);
|
|
7774
|
+
if (isMatchedByRelativeNegative) {
|
|
7775
|
+
return false;
|
|
7776
|
+
}
|
|
7777
|
+
const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory);
|
|
7778
|
+
if (isMatchedByAbsoluteNegative) {
|
|
7779
|
+
return false;
|
|
7780
|
+
}
|
|
7781
|
+
return true;
|
|
7782
|
+
}
|
|
7783
|
+
_isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) {
|
|
7784
|
+
if (patternsRe.length === 0) {
|
|
7747
7785
|
return false;
|
|
7748
7786
|
}
|
|
7749
|
-
const fullpath = utils.path.makeAbsolute(this._settings.cwd,
|
|
7750
|
-
return
|
|
7787
|
+
const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);
|
|
7788
|
+
return this._isMatchToPatterns(fullpath, patternsRe, isDirectory);
|
|
7751
7789
|
}
|
|
7752
7790
|
_isMatchToPatterns(filepath, patternsRe, isDirectory) {
|
|
7791
|
+
if (patternsRe.length === 0) {
|
|
7792
|
+
return false;
|
|
7793
|
+
}
|
|
7753
7794
|
// Trying to match files and directories by patterns.
|
|
7754
7795
|
const isMatched = utils.pattern.matchAny(filepath, patternsRe);
|
|
7755
7796
|
// A pattern with a trailling slash can be used for directory matching.
|
|
@@ -8041,7 +8082,7 @@ function requireSettings () {
|
|
|
8041
8082
|
hasRequiredSettings = 1;
|
|
8042
8083
|
(function (exports) {
|
|
8043
8084
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8044
|
-
exports.DEFAULT_FILE_SYSTEM_ADAPTER =
|
|
8085
|
+
exports.DEFAULT_FILE_SYSTEM_ADAPTER = undefined;
|
|
8045
8086
|
const fs = require$$0$3;
|
|
8046
8087
|
const os = require$$0;
|
|
8047
8088
|
/**
|
|
@@ -8191,7 +8232,7 @@ function requireOut () {
|
|
|
8191
8232
|
}
|
|
8192
8233
|
win32.convertPathToPattern = convertPathToPattern;
|
|
8193
8234
|
})(FastGlob.win32 || (FastGlob.win32 = {}));
|
|
8194
|
-
})(FastGlob
|
|
8235
|
+
})(FastGlob);
|
|
8195
8236
|
function getWorks(source, _Provider, options) {
|
|
8196
8237
|
const patterns = [].concat(source);
|
|
8197
8238
|
const settings = new settings_1.default(options);
|
|
@@ -8212,6 +8253,8 @@ function requireOut () {
|
|
|
8212
8253
|
|
|
8213
8254
|
var outExports = requireOut();
|
|
8214
8255
|
|
|
8256
|
+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
8257
|
+
/// <reference path="./types/css-url-parser.d.ts" />
|
|
8215
8258
|
const plainTextExtensions = ['.d.ts'];
|
|
8216
8259
|
function lookupMime(path) {
|
|
8217
8260
|
if (plainTextExtensions.some((e) => path.endsWith(e))) {
|
|
@@ -8387,7 +8430,7 @@ async function extractResources(resourcePath, fs, cwd) {
|
|
|
8387
8430
|
await fs.promises.access(path$1.join(cwd, assetPath));
|
|
8388
8431
|
resources.push(assetPath);
|
|
8389
8432
|
}
|
|
8390
|
-
catch
|
|
8433
|
+
catch {
|
|
8391
8434
|
// ignore, the file doesn't exist
|
|
8392
8435
|
// It happens for the markdown-math extension without consequences
|
|
8393
8436
|
}
|
|
@@ -8404,6 +8447,7 @@ function parseJson(path, text) {
|
|
|
8404
8447
|
return result;
|
|
8405
8448
|
}
|
|
8406
8449
|
|
|
8450
|
+
const { firstBy } = thenby;
|
|
8407
8451
|
function read(stream) {
|
|
8408
8452
|
const bufs = [];
|
|
8409
8453
|
return new Promise((resolve) => {
|
|
@@ -8491,7 +8535,9 @@ function plugin({ include = '**/*.vsix', exclude, transformManifest = (manifest)
|
|
|
8491
8535
|
mimeType: resource.mimeType,
|
|
8492
8536
|
size: resource.size
|
|
8493
8537
|
}));
|
|
8494
|
-
})))
|
|
8538
|
+
})))
|
|
8539
|
+
.flat()
|
|
8540
|
+
.sort(firstBy('pathInExtension'));
|
|
8495
8541
|
return `
|
|
8496
8542
|
import { registerExtension } from 'vscode/extensions'
|
|
8497
8543
|
|