@sprucelabs/spruce-cli 18.1.1 → 18.1.3
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/CHANGELOG.md +8 -0
- package/build/features/conversation/actions/TestAction.js.map +1 -1
- package/build/features/skill/SkillFeature.js +0 -1
- package/build/features/skill/SkillFeature.js.map +1 -1
- package/build/features/test/TestFeature.js.map +1 -1
- package/node_modules/@typescript-eslint/parser/README.md +2 -0
- package/node_modules/@typescript-eslint/parser/package.json +5 -5
- package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +1 -1
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +1 -1
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/package.json +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts +3 -6
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts +4 -6
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createWatchProgram.d.ts +4 -7
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +5 -4
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/createParseSettings.d.ts +4 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/index.d.ts +102 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/inferSingleRun.d.ts +15 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/warnAboutTSVersion.d.ts +3 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +0 -26
- package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js +8 -8
- package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts +3 -6
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js +13 -15
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js +7 -7
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts +4 -6
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +51 -38
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js +4 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.d.ts +4 -7
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.js +21 -22
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +5 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js +7 -7
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js +4 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts +4 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +145 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts +102 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js +3 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts +15 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js +53 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts +3 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +68 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts +0 -26
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js +32 -388
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -5
- package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
- package/package.json +32 -32
- package/src/features/skill/SkillFeature.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSourceFile.d.ts","sourceRoot":"","sources":["../../src/create-program/createSourceFile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"createSourceFile.d.ts","sourceRoot":"","sources":["../../src/create-program/createSourceFile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKtD,iBAAS,gBAAgB,CAAC,aAAa,EAAE,aAAa,GAAG,EAAE,CAAC,UAAU,CAcrE;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js
CHANGED
|
@@ -31,10 +31,10 @@ const debug_1 = __importDefault(require("debug"));
|
|
|
31
31
|
const ts = __importStar(require("typescript"));
|
|
32
32
|
const getScriptKind_1 = require("./getScriptKind");
|
|
33
33
|
const log = (0, debug_1.default)('typescript-eslint:typescript-estree:createSourceFile');
|
|
34
|
-
function createSourceFile(
|
|
35
|
-
log('Getting AST without type information in %s mode for: %s',
|
|
36
|
-
return ts.createSourceFile(
|
|
37
|
-
/* setParentNodes */ true, (0, getScriptKind_1.getScriptKind)(
|
|
34
|
+
function createSourceFile(parseSettings) {
|
|
35
|
+
log('Getting AST without type information in %s mode for: %s', parseSettings.jsx ? 'TSX' : 'TS', parseSettings.filePath);
|
|
36
|
+
return ts.createSourceFile(parseSettings.filePath, parseSettings.code, ts.ScriptTarget.Latest,
|
|
37
|
+
/* setParentNodes */ true, (0, getScriptKind_1.getScriptKind)(parseSettings.filePath, parseSettings.jsx));
|
|
38
38
|
}
|
|
39
39
|
exports.createSourceFile = createSourceFile;
|
|
40
40
|
//# sourceMappingURL=createSourceFile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSourceFile.js","sourceRoot":"","sources":["../../src/create-program/createSourceFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+CAAiC;AAGjC,mDAAgD;AAEhD,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,sDAAsD,CAAC,CAAC;AAE1E,SAAS,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"createSourceFile.js","sourceRoot":"","sources":["../../src/create-program/createSourceFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+CAAiC;AAGjC,mDAAgD;AAEhD,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,sDAAsD,CAAC,CAAC;AAE1E,SAAS,gBAAgB,CAAC,aAA4B;IACpD,GAAG,CACD,yDAAyD,EACzD,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAChC,aAAa,CAAC,QAAQ,CACvB,CAAC;IAEF,OAAO,EAAE,CAAC,gBAAgB,CACxB,aAAa,CAAC,QAAQ,EACtB,aAAa,CAAC,IAAI,EAClB,EAAE,CAAC,YAAY,CAAC,MAAM;IACtB,oBAAoB,CAAC,IAAI,EACzB,IAAA,6BAAa,EAAC,aAAa,CAAC,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,CACzD,CAAC;AACJ,CAAC;AAEQ,4CAAgB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ts from 'typescript';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ParseSettings } from '../parseSettings';
|
|
3
3
|
/**
|
|
4
4
|
* Clear all of the parser caches.
|
|
5
5
|
* This should only be used in testing to ensure the parser is clean between tests.
|
|
@@ -7,13 +7,10 @@ import type { Extra } from '../parser-options';
|
|
|
7
7
|
declare function clearWatchCaches(): void;
|
|
8
8
|
/**
|
|
9
9
|
* Calculate project environments using options provided by consumer and paths from config
|
|
10
|
-
* @param
|
|
11
|
-
* @param filePathIn The path of the file being parsed
|
|
12
|
-
* @param extra.tsconfigRootDir The root directory for relative tsconfig paths
|
|
13
|
-
* @param extra.projects Provided tsconfig paths
|
|
10
|
+
* @param parseSettings Internal settings for parsing the file
|
|
14
11
|
* @returns The programs corresponding to the supplied tsconfig paths
|
|
15
12
|
*/
|
|
16
|
-
declare function getProgramsForProjects(
|
|
17
|
-
declare function createWatchProgram(tsconfigPath: string,
|
|
13
|
+
declare function getProgramsForProjects(parseSettings: ParseSettings): ts.Program[];
|
|
14
|
+
declare function createWatchProgram(tsconfigPath: string, parseSettings: ParseSettings): ts.WatchOfConfigFile<ts.BuilderProgram>;
|
|
18
15
|
export { clearWatchCaches, createWatchProgram, getProgramsForProjects };
|
|
19
16
|
//# sourceMappingURL=createWatchProgram.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWatchProgram.d.ts","sourceRoot":"","sources":["../../src/create-program/createWatchProgram.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"createWatchProgram.d.ts","sourceRoot":"","sources":["../../src/create-program/createWatchProgram.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA6CtD;;;GAGG;AACH,iBAAS,gBAAgB,IAAI,IAAI,CAOhC;AA0ED;;;;GAIG;AACH,iBAAS,sBAAsB,CAAC,aAAa,EAAE,aAAa,GAAG,EAAE,CAAC,OAAO,EAAE,CA6G1E;AAMD,iBAAS,kBAAkB,CACzB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,aAAa,GAC3B,EAAE,CAAC,iBAAiB,CAAC,EAAE,CAAC,cAAc,CAAC,CAuIzC;AAmJD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,CAAC"}
|
package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.js
CHANGED
|
@@ -111,8 +111,8 @@ function createHash(content) {
|
|
|
111
111
|
}
|
|
112
112
|
return content;
|
|
113
113
|
}
|
|
114
|
-
function updateCachedFileList(tsconfigPath, program,
|
|
115
|
-
const fileList =
|
|
114
|
+
function updateCachedFileList(tsconfigPath, program, parseSettings) {
|
|
115
|
+
const fileList = parseSettings.EXPERIMENTAL_useSourceOfProjectReferenceRedirect
|
|
116
116
|
? new Set(program.getSourceFiles().map(sf => (0, shared_1.getCanonicalFileName)(sf.fileName)))
|
|
117
117
|
: new Set(program.getRootFileNames().map(f => (0, shared_1.getCanonicalFileName)(f)));
|
|
118
118
|
programFileListCache.set(tsconfigPath, fileList);
|
|
@@ -120,21 +120,18 @@ function updateCachedFileList(tsconfigPath, program, extra) {
|
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
* Calculate project environments using options provided by consumer and paths from config
|
|
123
|
-
* @param
|
|
124
|
-
* @param filePathIn The path of the file being parsed
|
|
125
|
-
* @param extra.tsconfigRootDir The root directory for relative tsconfig paths
|
|
126
|
-
* @param extra.projects Provided tsconfig paths
|
|
123
|
+
* @param parseSettings Internal settings for parsing the file
|
|
127
124
|
* @returns The programs corresponding to the supplied tsconfig paths
|
|
128
125
|
*/
|
|
129
|
-
function getProgramsForProjects(
|
|
130
|
-
const filePath = (0, shared_1.getCanonicalFileName)(
|
|
126
|
+
function getProgramsForProjects(parseSettings) {
|
|
127
|
+
const filePath = (0, shared_1.getCanonicalFileName)(parseSettings.filePath);
|
|
131
128
|
const results = [];
|
|
132
129
|
// preserve reference to code and file being linted
|
|
133
|
-
currentLintOperationState.code = code;
|
|
130
|
+
currentLintOperationState.code = parseSettings.code;
|
|
134
131
|
currentLintOperationState.filePath = filePath;
|
|
135
132
|
// Update file version if necessary
|
|
136
133
|
const fileWatchCallbacks = fileWatchCallbackTrackingMap.get(filePath);
|
|
137
|
-
const codeHash = createHash(code);
|
|
134
|
+
const codeHash = createHash(parseSettings.code);
|
|
138
135
|
if (parsedFilesSeenHash.get(filePath) !== codeHash &&
|
|
139
136
|
fileWatchCallbacks &&
|
|
140
137
|
fileWatchCallbacks.size > 0) {
|
|
@@ -149,7 +146,7 @@ function getProgramsForProjects(code, filePathIn, extra) {
|
|
|
149
146
|
let updatedProgram = null;
|
|
150
147
|
if (!fileList) {
|
|
151
148
|
updatedProgram = existingWatch.getProgram().getProgram();
|
|
152
|
-
fileList = updateCachedFileList(tsconfigPath, updatedProgram,
|
|
149
|
+
fileList = updateCachedFileList(tsconfigPath, updatedProgram, parseSettings);
|
|
153
150
|
}
|
|
154
151
|
if (fileList.has(filePath)) {
|
|
155
152
|
log('Found existing program for file. %s', filePath);
|
|
@@ -166,7 +163,7 @@ function getProgramsForProjects(code, filePathIn, extra) {
|
|
|
166
163
|
* - the required program hasn't been created yet, or
|
|
167
164
|
* - the file is new/renamed, and the program hasn't been updated.
|
|
168
165
|
*/
|
|
169
|
-
for (const tsconfigPath of
|
|
166
|
+
for (const tsconfigPath of parseSettings.projects) {
|
|
170
167
|
const existingWatch = knownWatchProgramMap.get(tsconfigPath);
|
|
171
168
|
if (existingWatch) {
|
|
172
169
|
const updatedProgram = maybeInvalidateProgram(existingWatch, filePath, tsconfigPath);
|
|
@@ -176,7 +173,7 @@ function getProgramsForProjects(code, filePathIn, extra) {
|
|
|
176
173
|
// sets parent pointers in source files
|
|
177
174
|
updatedProgram.getTypeChecker();
|
|
178
175
|
// cache and check the file list
|
|
179
|
-
const fileList = updateCachedFileList(tsconfigPath, updatedProgram,
|
|
176
|
+
const fileList = updateCachedFileList(tsconfigPath, updatedProgram, parseSettings);
|
|
180
177
|
if (fileList.has(filePath)) {
|
|
181
178
|
log('Found updated program for file. %s', filePath);
|
|
182
179
|
// we can return early because we know this program contains the file
|
|
@@ -185,13 +182,13 @@ function getProgramsForProjects(code, filePathIn, extra) {
|
|
|
185
182
|
results.push(updatedProgram);
|
|
186
183
|
continue;
|
|
187
184
|
}
|
|
188
|
-
const programWatch = createWatchProgram(tsconfigPath,
|
|
185
|
+
const programWatch = createWatchProgram(tsconfigPath, parseSettings);
|
|
189
186
|
knownWatchProgramMap.set(tsconfigPath, programWatch);
|
|
190
187
|
const program = programWatch.getProgram().getProgram();
|
|
191
188
|
// sets parent pointers in source files
|
|
192
189
|
program.getTypeChecker();
|
|
193
190
|
// cache and check the file list
|
|
194
|
-
const fileList = updateCachedFileList(tsconfigPath, program,
|
|
191
|
+
const fileList = updateCachedFileList(tsconfigPath, program, parseSettings);
|
|
195
192
|
if (fileList.has(filePath)) {
|
|
196
193
|
log('Found program for file. %s', filePath);
|
|
197
194
|
// we can return early because we know this program contains the file
|
|
@@ -205,13 +202,13 @@ exports.getProgramsForProjects = getProgramsForProjects;
|
|
|
205
202
|
const isRunningNoTimeoutFix = semver_1.default.satisfies(ts.version, '>=3.9.0-beta', {
|
|
206
203
|
includePrerelease: true,
|
|
207
204
|
});
|
|
208
|
-
function createWatchProgram(tsconfigPath,
|
|
205
|
+
function createWatchProgram(tsconfigPath, parseSettings) {
|
|
209
206
|
log('Creating watch program for %s.', tsconfigPath);
|
|
210
207
|
// create compiler host
|
|
211
|
-
const watchCompilerHost = ts.createWatchCompilerHost(tsconfigPath, (0, shared_1.createDefaultCompilerOptionsFromExtra)(
|
|
208
|
+
const watchCompilerHost = ts.createWatchCompilerHost(tsconfigPath, (0, shared_1.createDefaultCompilerOptionsFromExtra)(parseSettings), ts.sys, ts.createAbstractBuilder, diagnosticReporter,
|
|
212
209
|
/*reportWatchStatus*/ () => { });
|
|
213
|
-
if (
|
|
214
|
-
watchCompilerHost.resolveModuleNames = (0, shared_1.getModuleResolver)(
|
|
210
|
+
if (parseSettings.moduleResolver) {
|
|
211
|
+
watchCompilerHost.resolveModuleNames = (0, shared_1.getModuleResolver)(parseSettings.moduleResolver).resolveModuleNames;
|
|
215
212
|
}
|
|
216
213
|
// ensure readFile reads the code being linted instead of the copy on disk
|
|
217
214
|
const oldReadFile = watchCompilerHost.readFile;
|
|
@@ -253,11 +250,13 @@ function createWatchProgram(tsconfigPath, extra) {
|
|
|
253
250
|
const oldOnDirectoryStructureHostCreate = watchCompilerHost.onCachedDirectoryStructureHostCreate;
|
|
254
251
|
watchCompilerHost.onCachedDirectoryStructureHostCreate = (host) => {
|
|
255
252
|
const oldReadDirectory = host.readDirectory;
|
|
256
|
-
host.readDirectory = (path, extensions, exclude, include, depth) => oldReadDirectory(path, !extensions
|
|
253
|
+
host.readDirectory = (path, extensions, exclude, include, depth) => oldReadDirectory(path, !extensions
|
|
254
|
+
? undefined
|
|
255
|
+
: extensions.concat(parseSettings.extraFileExtensions), exclude, include, depth);
|
|
257
256
|
oldOnDirectoryStructureHostCreate(host);
|
|
258
257
|
};
|
|
259
258
|
// This works only on 3.9
|
|
260
|
-
watchCompilerHost.extraFileExtensions =
|
|
259
|
+
watchCompilerHost.extraFileExtensions = parseSettings.extraFileExtensions.map(extension => ({
|
|
261
260
|
extension,
|
|
262
261
|
isMixedContent: true,
|
|
263
262
|
scriptKind: ts.ScriptKind.Deferred,
|
|
@@ -267,7 +266,7 @@ function createWatchProgram(tsconfigPath, extra) {
|
|
|
267
266
|
* TODO: this needs refinement and development, but we're allowing users to opt-in to this for now for testing and feedback.
|
|
268
267
|
* See https://github.com/typescript-eslint/typescript-eslint/issues/2094
|
|
269
268
|
*/
|
|
270
|
-
watchCompilerHost.useSourceOfProjectReferenceRedirect = () =>
|
|
269
|
+
watchCompilerHost.useSourceOfProjectReferenceRedirect = () => parseSettings.EXPERIMENTAL_useSourceOfProjectReferenceRedirect;
|
|
271
270
|
// Since we don't want to asynchronously update program we want to disable timeout methods
|
|
272
271
|
// So any changes in the program will be delayed and updated when getProgram is called on watch
|
|
273
272
|
let callback;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWatchProgram.js","sourceRoot":"","sources":["../../src/create-program/createWatchProgram.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4CAAoB;AACpB,oDAA4B;AAC5B,+CAAiC;AAIjC,qCAKkB;AAGlB,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,wDAAwD,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAGjC,CAAC;AAEJ;;;GAGG;AACH,MAAM,4BAA4B,GAAG,IAAI,GAAG,EAGzC,CAAC;AACJ,MAAM,8BAA8B,GAAG,IAAI,GAAG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,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,YAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IACrE,IAAI,CAAC,WAAW,EAAE;QAChB,sGAAsG;QACtG,OAAO,IAAI,CAAC;KACb;IAED,MAAM,kBAAkB,GAAG,4BAA4B,CAAC,GAAG,CACzD,IAAA,6BAAoB,EAAC,WAAW,CAAC,CAClC,CAAC;IACF,IAAI,CAAC,kBAAkB,EAAE;QACvB,qCAAqC;QACrC,GAAG,CAAC,kDAAkD,EAAE,WAAW,CAAC,CAAC;QACrE,OAAO,cAAc,CAAC;KACvB;IAED,GAAG,CAAC,6BAA6B,EAAE,WAAW,CAAC,CAAC;IAChD,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAC9B,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,oBAAoB,CAAC,OAAO,CAAC,CACjD,CAAC;IAEF,2EAA2E;IAC3E,oBAAoB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAE1C,cAAc,GAAG,aAAa,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE,CAAC;IACzD,UAAU,GAAG,cAAc,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACpD,IAAI,UAAU,EAAE;QACd,OAAO,cAAc,CAAC;KACvB;IAED,GAAG,CACD,uGAAuG,EACvG,QAAQ,CACT,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
1
|
+
{"version":3,"file":"createWatchProgram.js","sourceRoot":"","sources":["../../src/create-program/createWatchProgram.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4CAAoB;AACpB,oDAA4B;AAC5B,+CAAiC;AAIjC,qCAKkB;AAGlB,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,wDAAwD,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,oBAAoB,GAAG,IAAI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;IACH,GAAG,CACD,0FAA0F,EAC1F,QAAQ,CACT,CAAC;IAEF,MAAM,aAAa,GAAG,cAAc,CAAC,gBAAgB,EAAE,CAAC;IACxD,6FAA6F;IAC7F,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,YAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IACrE,IAAI,CAAC,WAAW,EAAE;QAChB,sGAAsG;QACtG,OAAO,IAAI,CAAC;KACb;IAED,MAAM,kBAAkB,GAAG,4BAA4B,CAAC,GAAG,CACzD,IAAA,6BAAoB,EAAC,WAAW,CAAC,CAClC,CAAC;IACF,IAAI,CAAC,kBAAkB,EAAE;QACvB,qCAAqC;QACrC,GAAG,CAAC,kDAAkD,EAAE,WAAW,CAAC,CAAC;QACrE,OAAO,cAAc,CAAC;KACvB;IAED,GAAG,CAAC,6BAA6B,EAAE,WAAW,CAAC,CAAC;IAChD,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAC9B,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,oBAAoB,CAAC,OAAO,CAAC,CACjD,CAAC;IAEF,2EAA2E;IAC3E,oBAAoB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAE1C,cAAc,GAAG,aAAa,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE,CAAC;IACzD,UAAU,GAAG,cAAc,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACpD,IAAI,UAAU,EAAE;QACd,OAAO,cAAc,CAAC;KACvB;IAED,GAAG,CACD,uGAAuG,EACvG,QAAQ,CACT,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Program } from 'typescript';
|
|
2
2
|
import * as ts from 'typescript';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ModuleResolver } from '../parser-options';
|
|
4
|
+
import type { ParseSettings } from '../parseSettings';
|
|
4
5
|
interface ASTAndProgram {
|
|
5
6
|
ast: ts.SourceFile;
|
|
6
7
|
program: ts.Program;
|
|
@@ -9,14 +10,14 @@ interface ASTAndProgram {
|
|
|
9
10
|
* Compiler options required to avoid critical functionality issues
|
|
10
11
|
*/
|
|
11
12
|
declare const CORE_COMPILER_OPTIONS: ts.CompilerOptions;
|
|
12
|
-
declare function createDefaultCompilerOptionsFromExtra(
|
|
13
|
+
declare function createDefaultCompilerOptionsFromExtra(parseSettings: ParseSettings): ts.CompilerOptions;
|
|
13
14
|
declare type CanonicalPath = string & {
|
|
14
15
|
__brand: unknown;
|
|
15
16
|
};
|
|
16
17
|
declare function getCanonicalFileName(filePath: string): CanonicalPath;
|
|
17
|
-
declare function ensureAbsolutePath(p: string,
|
|
18
|
+
declare function ensureAbsolutePath(p: string, tsconfigRootDir: string): string;
|
|
18
19
|
declare function canonicalDirname(p: CanonicalPath): CanonicalPath;
|
|
19
|
-
declare function getAstFromProgram(currentProgram: Program,
|
|
20
|
+
declare function getAstFromProgram(currentProgram: Program, parseSettings: ParseSettings): ASTAndProgram | undefined;
|
|
20
21
|
declare function getModuleResolver(moduleResolverPath: string): ModuleResolver;
|
|
21
22
|
export { ASTAndProgram, CORE_COMPILER_OPTIONS, canonicalDirname, CanonicalPath, createDefaultCompilerOptionsFromExtra, ensureAbsolutePath, getCanonicalFileName, getAstFromProgram, getModuleResolver, };
|
|
22
23
|
//# sourceMappingURL=shared.d.ts.map
|
package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/create-program/shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/create-program/shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,UAAU,aAAa;IACrB,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC;IACnB,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,QAAA,MAAM,qBAAqB,EAAE,EAAE,CAAC,eAQ/B,CAAC;AAYF,iBAAS,qCAAqC,CAC5C,aAAa,EAAE,aAAa,GAC3B,EAAE,CAAC,eAAe,CASpB;AAGD,aAAK,aAAa,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AASnD,iBAAS,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,CAM7D;AAED,iBAAS,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAItE;AAED,iBAAS,gBAAgB,CAAC,CAAC,EAAE,aAAa,GAAG,aAAa,CAEzD;AAmBD,iBAAS,iBAAiB,CACxB,cAAc,EAAE,OAAO,EACvB,aAAa,EAAE,aAAa,GAC3B,aAAa,GAAG,SAAS,CAW3B;AAED,iBAAS,iBAAiB,CAAC,kBAAkB,EAAE,MAAM,GAAG,cAAc,CAerE;AAED,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,qCAAqC,EACrC,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,GAClB,CAAC"}
|
|
@@ -45,8 +45,8 @@ exports.CORE_COMPILER_OPTIONS = CORE_COMPILER_OPTIONS;
|
|
|
45
45
|
* Default compiler options for program generation
|
|
46
46
|
*/
|
|
47
47
|
const DEFAULT_COMPILER_OPTIONS = Object.assign(Object.assign({}, CORE_COMPILER_OPTIONS), { allowNonTsExtensions: true, allowJs: true, checkJs: true });
|
|
48
|
-
function createDefaultCompilerOptionsFromExtra(
|
|
49
|
-
if (
|
|
48
|
+
function createDefaultCompilerOptionsFromExtra(parseSettings) {
|
|
49
|
+
if (parseSettings.debugLevel.has('typescript')) {
|
|
50
50
|
return Object.assign(Object.assign({}, DEFAULT_COMPILER_OPTIONS), { extendedDiagnostics: true });
|
|
51
51
|
}
|
|
52
52
|
return DEFAULT_COMPILER_OPTIONS;
|
|
@@ -65,10 +65,10 @@ function getCanonicalFileName(filePath) {
|
|
|
65
65
|
return correctPathCasing(normalized);
|
|
66
66
|
}
|
|
67
67
|
exports.getCanonicalFileName = getCanonicalFileName;
|
|
68
|
-
function ensureAbsolutePath(p,
|
|
68
|
+
function ensureAbsolutePath(p, tsconfigRootDir) {
|
|
69
69
|
return path_1.default.isAbsolute(p)
|
|
70
70
|
? p
|
|
71
|
-
: path_1.default.join(
|
|
71
|
+
: path_1.default.join(tsconfigRootDir || process.cwd(), p);
|
|
72
72
|
}
|
|
73
73
|
exports.ensureAbsolutePath = ensureAbsolutePath;
|
|
74
74
|
function canonicalDirname(p) {
|
|
@@ -87,10 +87,10 @@ function getExtension(fileName) {
|
|
|
87
87
|
}
|
|
88
88
|
return ((_a = DEFINITION_EXTENSIONS.find(definitionExt => fileName.endsWith(definitionExt))) !== null && _a !== void 0 ? _a : path_1.default.extname(fileName));
|
|
89
89
|
}
|
|
90
|
-
function getAstFromProgram(currentProgram,
|
|
91
|
-
const ast = currentProgram.getSourceFile(
|
|
90
|
+
function getAstFromProgram(currentProgram, parseSettings) {
|
|
91
|
+
const ast = currentProgram.getSourceFile(parseSettings.filePath);
|
|
92
92
|
// working around https://github.com/typescript-eslint/typescript-eslint/issues/1573
|
|
93
|
-
const expectedExt = getExtension(
|
|
93
|
+
const expectedExt = getExtension(parseSettings.filePath);
|
|
94
94
|
const returnedExt = getExtension(ast === null || ast === void 0 ? void 0 : ast.fileName);
|
|
95
95
|
if (expectedExt !== returnedExt) {
|
|
96
96
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/create-program/shared.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AAExB,+CAAiC;
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/create-program/shared.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AAExB,+CAAiC;AAUjC;;GAEG;AACH,MAAM,qBAAqB,GAAuB;IAChD,MAAM,EAAE,IAAI;IAEZ;;OAEG;IACH,cAAc,EAAE,IAAI;IACpB,kBAAkB,EAAE,IAAI;CACzB,CAAC;AAyGA,sDAAqB;AAvGvB;;GAEG;AACH,MAAM,wBAAwB,mCACzB,qBAAqB,KACxB,oBAAoB,EAAE,IAAI,EAC1B,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,GACd,CAAC;AAEF,SAAS,qCAAqC,CAC5C,aAA4B;IAE5B,IAAI,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;QAC9C,uCACK,wBAAwB,KAC3B,mBAAmB,EAAE,IAAI,IACzB;KACH;IAED,OAAO,wBAAwB,CAAC;AAClC,CAAC;AAqFC,sFAAqC;AAhFvC,8EAA8E;AAC9E,MAAM,yBAAyB,GAC7B,EAAE,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC;AACjE,MAAM,iBAAiB,GAAG,yBAAyB;IACjD,CAAC,CAAC,CAAC,QAAgB,EAAU,EAAE,CAAC,QAAQ;IACxC,CAAC,CAAC,CAAC,QAAgB,EAAU,EAAE,CAAC,QAAQ,CAAC,WA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C,aAAa,CAAC,QAAQ,CAAC,CAAC;IAEjE,oFAAoF;IACpF,MAAM,WAAW,GAAG,YAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzD,MAAM,WAAW,GAAG,YAAY,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,CAAC,CAAC;IAChD,IAAI,WAAW,KAAK,WAAW,EAAE;QAC/B,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,GAAG,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;AACjD,CAAC;AA2BC,8CAAiB;AAzBnB,SAAS,iBAAiB,CAAC,kBAA0B;IACnD,IAAI,cAA8B,CAAC;IAEnC,IAAI;QACF,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAmB,CAAC;KAChE;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,UAAU,GAAG;YACjB,2DAA2D;YAC3D,2FAA2F;SAC5F,CAAC;QAEF,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;KACxC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAWC,8CAAiB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as ts from 'typescript';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ParseSettings } from '../parseSettings';
|
|
3
3
|
import type { ASTAndProgram } from './shared';
|
|
4
|
-
declare function useProvidedPrograms(programInstances: Iterable<ts.Program>,
|
|
4
|
+
declare function useProvidedPrograms(programInstances: Iterable<ts.Program>, parseSettings: ParseSettings): ASTAndProgram | undefined;
|
|
5
5
|
/**
|
|
6
6
|
* Utility offered by parser to help consumers construct their own program instance.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProvidedPrograms.d.ts","sourceRoot":"","sources":["../../src/create-program/useProvidedPrograms.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"useProvidedPrograms.d.ts","sourceRoot":"","sources":["../../src/create-program/useProvidedPrograms.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAK9C,iBAAS,mBAAmB,CAC1B,gBAAgB,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,EACtC,aAAa,EAAE,aAAa,GAC3B,aAAa,GAAG,SAAS,CA+B3B;AAED;;;;;GAKG;AACH,iBAAS,2BAA2B,CAClC,UAAU,EAAE,MAAM,EAClB,gBAAgB,CAAC,EAAE,MAAM,GACxB,EAAE,CAAC,OAAO,CA4BZ;AAUD,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,CAAC"}
|
package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js
CHANGED
|
@@ -33,18 +33,18 @@ const path = __importStar(require("path"));
|
|
|
33
33
|
const ts = __importStar(require("typescript"));
|
|
34
34
|
const shared_1 = require("./shared");
|
|
35
35
|
const log = (0, debug_1.default)('typescript-eslint:typescript-estree:useProvidedProgram');
|
|
36
|
-
function useProvidedPrograms(programInstances,
|
|
37
|
-
log('Retrieving ast for %s from provided program instance(s)',
|
|
36
|
+
function useProvidedPrograms(programInstances, parseSettings) {
|
|
37
|
+
log('Retrieving ast for %s from provided program instance(s)', parseSettings.filePath);
|
|
38
38
|
let astAndProgram;
|
|
39
39
|
for (const programInstance of programInstances) {
|
|
40
|
-
astAndProgram = (0, shared_1.getAstFromProgram)(programInstance,
|
|
40
|
+
astAndProgram = (0, shared_1.getAstFromProgram)(programInstance, parseSettings);
|
|
41
41
|
// Stop at the first applicable program instance
|
|
42
42
|
if (astAndProgram) {
|
|
43
43
|
break;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
if (!astAndProgram) {
|
|
47
|
-
const relativeFilePath = path.relative(
|
|
47
|
+
const relativeFilePath = path.relative(parseSettings.tsconfigRootDir || process.cwd(), parseSettings.filePath);
|
|
48
48
|
const errorLines = [
|
|
49
49
|
'"parserOptions.programs" has been provided for @typescript-eslint/parser.',
|
|
50
50
|
`The file was not found in any of the provided program instance(s): ${relativeFilePath}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProvidedPrograms.js","sourceRoot":"","sources":["../../src/create-program/useProvidedPrograms.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,uCAAyB;AACzB,2CAA6B;AAC7B,+CAAiC;AAIjC,qCAAoE;AAEpE,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,wDAAwD,CAAC,CAAC;AAE5E,SAAS,mBAAmB,CAC1B,gBAAsC,EACtC,
|
|
1
|
+
{"version":3,"file":"useProvidedPrograms.js","sourceRoot":"","sources":["../../src/create-program/useProvidedPrograms.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,uCAAyB;AACzB,2CAA6B;AAC7B,+CAAiC;AAIjC,qCAAoE;AAEpE,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,wDAAwD,CAAC,CAAC;AAE5E,SAAS,mBAAmB,CAC1B,gBAAsC,EACtC,aAA4B;IAE5B,GAAG,CACD,yDAAyD,EACzD,aAAa,CAAC,QAAQ,CACvB,CAAC;IAEF,IAAI,aAAwC,CAAC;IAC7C,KAAK,MAAM,eAAe,IAAI,gBAAgB,EAAE;QAC9C,aAAa,GAAG,IAAA,0BAAiB,EAAC,eAAe,EAAE,aAAa,CAAC,CAAC;QAClE,gDAAgD;QAChD,IAAI,aAAa,EAAE;YACjB,MAAM;SACP;KACF;IAED,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,gBAAgB,GAAG,IA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,MAAM,CAAC,MAAM,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;KACnD;IACD,MAAM,IAAI,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACzD,OAAO,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC;AAU6B,kEAA2B;AARzD,SAAS,iBAAiB,CAAC,WAA4B;IACrD,OAAO,EAAE,CAAC,iBAAiB,CAAC,WAAW,EAAE;QACvC,oBAAoB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5B,mBAAmB,EAAE,OAAO,CAAC,GAAG;QAChC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI;KACvB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TSESTreeOptions } from '../parser-options';
|
|
2
|
+
import type { MutableParseSettings } from './index';
|
|
3
|
+
export declare function createParseSettings(code: string, options?: Partial<TSESTreeOptions>): MutableParseSettings;
|
|
4
|
+
//# sourceMappingURL=createParseSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createParseSettings.d.ts","sourceRoot":"","sources":["../../src/parseSettings/createParseSettings.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAQpD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,OAAO,CAAC,eAAe,CAAM,GACrC,oBAAoB,CAqGtB"}
|
package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createParseSettings = void 0;
|
|
7
|
+
const debug_1 = __importDefault(require("debug"));
|
|
8
|
+
const globby_1 = require("globby");
|
|
9
|
+
const is_glob_1 = __importDefault(require("is-glob"));
|
|
10
|
+
const shared_1 = require("../create-program/shared");
|
|
11
|
+
const inferSingleRun_1 = require("./inferSingleRun");
|
|
12
|
+
const warnAboutTSVersion_1 = require("./warnAboutTSVersion");
|
|
13
|
+
const log = (0, debug_1.default)('typescript-eslint:typescript-estree:parser:parseSettings:createParseSettings');
|
|
14
|
+
function createParseSettings(code, options = {}) {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const tsconfigRootDir = typeof options.tsconfigRootDir === 'string'
|
|
17
|
+
? options.tsconfigRootDir
|
|
18
|
+
: process.cwd();
|
|
19
|
+
const parseSettings = {
|
|
20
|
+
code: enforceString(code),
|
|
21
|
+
comment: options.comment === true,
|
|
22
|
+
comments: [],
|
|
23
|
+
createDefaultProgram: options.createDefaultProgram === true,
|
|
24
|
+
debugLevel: options.debugLevel === true
|
|
25
|
+
? new Set(['typescript-eslint'])
|
|
26
|
+
: Array.isArray(options.debugLevel)
|
|
27
|
+
? new Set(options.debugLevel)
|
|
28
|
+
: new Set(),
|
|
29
|
+
errorOnTypeScriptSyntacticAndSemanticIssues: false,
|
|
30
|
+
errorOnUnknownASTType: options.errorOnUnknownASTType === true,
|
|
31
|
+
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: options.EXPERIMENTAL_useSourceOfProjectReferenceRedirect === true,
|
|
32
|
+
extraFileExtensions: Array.isArray(options.extraFileExtensions) &&
|
|
33
|
+
options.extraFileExtensions.every(ext => typeof ext === 'string')
|
|
34
|
+
? options.extraFileExtensions
|
|
35
|
+
: [],
|
|
36
|
+
filePath: (0, shared_1.ensureAbsolutePath)(typeof options.filePath === 'string' && options.filePath !== '<input>'
|
|
37
|
+
? options.filePath
|
|
38
|
+
: getFileName(options.jsx), tsconfigRootDir),
|
|
39
|
+
jsx: options.jsx === true,
|
|
40
|
+
loc: options.loc === true,
|
|
41
|
+
log: typeof options.loggerFn === 'function'
|
|
42
|
+
? options.loggerFn
|
|
43
|
+
: options.loggerFn === false
|
|
44
|
+
? () => { }
|
|
45
|
+
: console.log,
|
|
46
|
+
moduleResolver: (_a = options.moduleResolver) !== null && _a !== void 0 ? _a : '',
|
|
47
|
+
preserveNodeMaps: options.preserveNodeMaps !== false,
|
|
48
|
+
programs: Array.isArray(options.programs) ? options.programs : null,
|
|
49
|
+
projects: [],
|
|
50
|
+
range: options.range === true,
|
|
51
|
+
singleRun: (0, inferSingleRun_1.inferSingleRun)(options),
|
|
52
|
+
tokens: options.tokens === true ? [] : null,
|
|
53
|
+
tsconfigRootDir,
|
|
54
|
+
};
|
|
55
|
+
// debug doesn't support multiple `enable` calls, so have to do it all at once
|
|
56
|
+
if (parseSettings.debugLevel.size > 0) {
|
|
57
|
+
const namespaces = [];
|
|
58
|
+
if (parseSettings.debugLevel.has('typescript-eslint')) {
|
|
59
|
+
namespaces.push('typescript-eslint:*');
|
|
60
|
+
}
|
|
61
|
+
if (parseSettings.debugLevel.has('eslint') ||
|
|
62
|
+
// make sure we don't turn off the eslint debug if it was enabled via --debug
|
|
63
|
+
debug_1.default.enabled('eslint:*,-eslint:code-path')) {
|
|
64
|
+
// https://github.com/eslint/eslint/blob/9dfc8501fb1956c90dc11e6377b4cb38a6bea65d/bin/eslint.js#L25
|
|
65
|
+
namespaces.push('eslint:*,-eslint:code-path');
|
|
66
|
+
}
|
|
67
|
+
debug_1.default.enable(namespaces.join(','));
|
|
68
|
+
}
|
|
69
|
+
if (Array.isArray(options.programs)) {
|
|
70
|
+
if (!options.programs.length) {
|
|
71
|
+
throw new Error(`You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.`);
|
|
72
|
+
}
|
|
73
|
+
log('parserOptions.programs was provided, so parserOptions.project will be ignored.');
|
|
74
|
+
}
|
|
75
|
+
// Providing a program overrides project resolution
|
|
76
|
+
if (!parseSettings.programs) {
|
|
77
|
+
const projectFolderIgnoreList = ((_b = options.projectFolderIgnoreList) !== null && _b !== void 0 ? _b : ['**/node_modules/**'])
|
|
78
|
+
.reduce((acc, folder) => {
|
|
79
|
+
if (typeof folder === 'string') {
|
|
80
|
+
acc.push(folder);
|
|
81
|
+
}
|
|
82
|
+
return acc;
|
|
83
|
+
}, [])
|
|
84
|
+
// prefix with a ! for not match glob
|
|
85
|
+
.map(folder => (folder.startsWith('!') ? folder : `!${folder}`));
|
|
86
|
+
parseSettings.projects = prepareAndTransformProjects(tsconfigRootDir, options.project, projectFolderIgnoreList);
|
|
87
|
+
}
|
|
88
|
+
(0, warnAboutTSVersion_1.warnAboutTSVersion)(parseSettings);
|
|
89
|
+
return parseSettings;
|
|
90
|
+
}
|
|
91
|
+
exports.createParseSettings = createParseSettings;
|
|
92
|
+
/**
|
|
93
|
+
* Ensures source code is a string.
|
|
94
|
+
*/
|
|
95
|
+
function enforceString(code) {
|
|
96
|
+
if (typeof code !== 'string') {
|
|
97
|
+
return String(code);
|
|
98
|
+
}
|
|
99
|
+
return code;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Compute the filename based on the parser options.
|
|
103
|
+
*
|
|
104
|
+
* Even if jsx option is set in typescript compiler, filename still has to
|
|
105
|
+
* contain .tsx file extension.
|
|
106
|
+
*
|
|
107
|
+
* @param options Parser options
|
|
108
|
+
*/
|
|
109
|
+
function getFileName(jsx) {
|
|
110
|
+
return jsx ? 'estree.tsx' : 'estree.ts';
|
|
111
|
+
}
|
|
112
|
+
function getTsconfigPath(tsconfigPath, tsconfigRootDir) {
|
|
113
|
+
return (0, shared_1.getCanonicalFileName)((0, shared_1.ensureAbsolutePath)(tsconfigPath, tsconfigRootDir));
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Normalizes, sanitizes, resolves and filters the provided project paths
|
|
117
|
+
*/
|
|
118
|
+
function prepareAndTransformProjects(tsconfigRootDir, projectsInput, ignoreListInput) {
|
|
119
|
+
const sanitizedProjects = [];
|
|
120
|
+
// Normalize and sanitize the project paths
|
|
121
|
+
if (typeof projectsInput === 'string') {
|
|
122
|
+
sanitizedProjects.push(projectsInput);
|
|
123
|
+
}
|
|
124
|
+
else if (Array.isArray(projectsInput)) {
|
|
125
|
+
for (const project of projectsInput) {
|
|
126
|
+
if (typeof project === 'string') {
|
|
127
|
+
sanitizedProjects.push(project);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (sanitizedProjects.length === 0) {
|
|
132
|
+
return [];
|
|
133
|
+
}
|
|
134
|
+
// Transform glob patterns into paths
|
|
135
|
+
const nonGlobProjects = sanitizedProjects.filter(project => !(0, is_glob_1.default)(project));
|
|
136
|
+
const globProjects = sanitizedProjects.filter(project => (0, is_glob_1.default)(project));
|
|
137
|
+
const uniqueCanonicalProjectPaths = new Set(nonGlobProjects
|
|
138
|
+
.concat((0, globby_1.sync)([...globProjects, ...ignoreListInput], {
|
|
139
|
+
cwd: tsconfigRootDir,
|
|
140
|
+
}))
|
|
141
|
+
.map(project => getTsconfigPath(project, tsconfigRootDir)));
|
|
142
|
+
log('parserOptions.project (excluding ignored) matched projects: %s', uniqueCanonicalProjectPaths);
|
|
143
|
+
return Array.from(uniqueCanonicalProjectPaths);
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=createParseSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createParseSettings.js","sourceRoot":"","sources":["../../src/parseSettings/createParseSettings.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,mCAA0C;AAC1C,sDAA6B;AAG7B,qDAGkC;AAGlC,qDAAkD;AAClD,6D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