@tsslint/core 1.4.0 → 1.4.2
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/index.js +4 -1
- package/package.json +3 -3
- package/lib/build copy.d.ts +0 -1
- package/lib/build copy.js +0 -19
- package/lib/load.js +0 -43
- package/lib/logger.d.ts +0 -1
- package/lib/logger.js +0 -16
package/index.js
CHANGED
|
@@ -335,7 +335,10 @@ logger) {
|
|
|
335
335
|
};
|
|
336
336
|
function getSourceFile(fileName) {
|
|
337
337
|
if (languageServiceUsage) {
|
|
338
|
-
|
|
338
|
+
const sourceFile = ctx.languageService.getProgram().getSourceFile(fileName);
|
|
339
|
+
if (sourceFile) {
|
|
340
|
+
return sourceFile;
|
|
341
|
+
}
|
|
339
342
|
}
|
|
340
343
|
else {
|
|
341
344
|
const snapshot = ctx.languageServiceHost.getScriptSnapshot(fileName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsslint/core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"directory": "packages/core"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@tsslint/types": "1.4.
|
|
15
|
+
"@tsslint/types": "1.4.2",
|
|
16
16
|
"error-stack-parser": "^2.1.4",
|
|
17
17
|
"esbuild": ">=0.17.0",
|
|
18
18
|
"minimatch": "^10.0.1"
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"postinstall": "node scripts/cleanCache.js"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "4cdc9070fda83e226ab04fa90b99c2b8d748b315"
|
|
27
27
|
}
|
package/lib/build copy.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function buildConfig(configFilePath: string, createHash?: (path: string) => string, logger?: typeof import('@clack/prompts')): Promise<string>;
|
package/lib/build copy.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildConfig = buildConfig;
|
|
4
|
-
const watch_1 = require("./watch");
|
|
5
|
-
function buildConfig(configFilePath, createHash,
|
|
6
|
-
// @ts-expect-error
|
|
7
|
-
logger) {
|
|
8
|
-
return new Promise((resolve, reject) => {
|
|
9
|
-
(0, watch_1.watchConfig)(configFilePath, (config, result) => {
|
|
10
|
-
if (config) {
|
|
11
|
-
resolve(config);
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
reject(result);
|
|
15
|
-
}
|
|
16
|
-
}, false, createHash, logger);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=build%20copy.js.map
|
package/lib/load.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import type { Config } from '@tsslint/config';
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
// import url = require('url');
|
|
5
|
-
// // import ErrorStackParser = require('error-stack-parser');
|
|
6
|
-
// export async function loadConfig(outFile: string): Promise<Config | Config[]> {
|
|
7
|
-
// // try {
|
|
8
|
-
// return (await import(url.pathToFileURL(outFile).toString() + '?time=' + Date.now())).default;
|
|
9
|
-
// // } catch (e: any) {
|
|
10
|
-
// // if (e.stack) {
|
|
11
|
-
// // const stack = ErrorStackParser.parse(e)[0];
|
|
12
|
-
// // if (stack.fileName && stack.lineNumber !== undefined && stack.columnNumber !== undefined) {
|
|
13
|
-
// // let fileName = stack.fileName
|
|
14
|
-
// // .replace(/\\/g, '/')
|
|
15
|
-
// // .split('?time=')[0];
|
|
16
|
-
// // if (fileName.startsWith('file://')) {
|
|
17
|
-
// // fileName = fileName.substring('file://'.length);
|
|
18
|
-
// // }
|
|
19
|
-
// // result.errors.push({
|
|
20
|
-
// // id: 'config-import-error',
|
|
21
|
-
// // text: String(e),
|
|
22
|
-
// // location: {
|
|
23
|
-
// // file: fileName,
|
|
24
|
-
// // line: stack.lineNumber,
|
|
25
|
-
// // column: stack.columnNumber - 1,
|
|
26
|
-
// // lineText: '',
|
|
27
|
-
// // },
|
|
28
|
-
// // } as any);
|
|
29
|
-
// // } else {
|
|
30
|
-
// // result.errors.push({
|
|
31
|
-
// // id: 'config-import-error',
|
|
32
|
-
// // text: String(e),
|
|
33
|
-
// // } as any);
|
|
34
|
-
// // }
|
|
35
|
-
// // } else {
|
|
36
|
-
// // result.errors.push({
|
|
37
|
-
// // id: 'config-import-error',
|
|
38
|
-
// // text: String(e),
|
|
39
|
-
// // } as any);
|
|
40
|
-
// // }
|
|
41
|
-
// // }
|
|
42
|
-
// }
|
|
43
|
-
//# sourceMappingURL=load.js.map
|
package/lib/logger.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function startLoad(text: string): (endText: string) => void;
|
package/lib/logger.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.startLoad = startLoad;
|
|
4
|
-
const frames = ['-', '\\', '|', '/'];
|
|
5
|
-
function startLoad(text) {
|
|
6
|
-
const start = Date.now();
|
|
7
|
-
let i = 0;
|
|
8
|
-
const loadingInterval = setInterval(() => {
|
|
9
|
-
process.stdout.write(`\r${frames[i++ % frames.length]} ${text}...`);
|
|
10
|
-
}, 100);
|
|
11
|
-
return (endText) => {
|
|
12
|
-
clearInterval(loadingInterval);
|
|
13
|
-
process.stdout.write(`\r${endText} in ${Date.now() - start}ms\n`);
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=logger.js.map
|