@tsslint/core 1.1.5 → 1.1.6
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/lib/watch.js +5 -5
- package/package.json +3 -3
package/lib/watch.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.watchConfigFile = watchConfigFile;
|
|
|
4
4
|
const esbuild = require("esbuild");
|
|
5
5
|
const _path = require("path");
|
|
6
6
|
const fs = require("fs");
|
|
7
|
-
const
|
|
7
|
+
const url = require("url");
|
|
8
8
|
const ErrorStackParser = require("error-stack-parser");
|
|
9
9
|
async function watchConfigFile(configFilePath, onBuild, watch = true, createHash = btoa, logger = console) {
|
|
10
10
|
let start;
|
|
@@ -28,7 +28,7 @@ async function watchConfigFile(configFilePath, onBuild, watch = true, createHash
|
|
|
28
28
|
}
|
|
29
29
|
if (!result.errors.length) {
|
|
30
30
|
try {
|
|
31
|
-
config = (await import(
|
|
31
|
+
config = (await import(url.pathToFileURL(outFile).toString() + '?time=' + Date.now())).default;
|
|
32
32
|
}
|
|
33
33
|
catch (e) {
|
|
34
34
|
if (e.stack) {
|
|
@@ -97,8 +97,8 @@ async function watchConfigFile(configFilePath, onBuild, watch = true, createHash
|
|
|
97
97
|
fs.writeFileSync(cachePath, text, 'utf8');
|
|
98
98
|
}
|
|
99
99
|
return {
|
|
100
|
-
path:
|
|
101
|
-
external:
|
|
100
|
+
path: cachePath,
|
|
101
|
+
external: !isTsFile(cachePath),
|
|
102
102
|
};
|
|
103
103
|
});
|
|
104
104
|
build.onResolve({ filter: /.*/ }, ({ path, resolveDir }) => {
|
|
@@ -107,7 +107,7 @@ async function watchConfigFile(configFilePath, onBuild, watch = true, createHash
|
|
|
107
107
|
const maybeJsPath = require.resolve(path, { paths: [resolveDir] });
|
|
108
108
|
if (!isTsFile(maybeJsPath) && fs.existsSync(maybeJsPath)) {
|
|
109
109
|
return {
|
|
110
|
-
path:
|
|
110
|
+
path: url.pathToFileURL(maybeJsPath).toString(),
|
|
111
111
|
external: true,
|
|
112
112
|
};
|
|
113
113
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsslint/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"directory": "packages/core"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@tsslint/types": "1.1.
|
|
15
|
+
"@tsslint/types": "1.1.6",
|
|
16
16
|
"error-stack-parser": "^2.1.4",
|
|
17
17
|
"esbuild": ">=0.17.0",
|
|
18
18
|
"minimatch": "^10.0.1",
|
|
19
19
|
"source-map-support": "^0.5.21"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "040024b0c2a08ded87940935090b4aaaebd8c7c4"
|
|
22
22
|
}
|