@tsslint/core 1.1.2 → 1.1.4

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 CHANGED
@@ -63,7 +63,7 @@ function createLinter(ctx, config, withStack) {
63
63
  let debugInfo;
64
64
  if (debug) {
65
65
  debugInfo = {
66
- category: ts.DiagnosticCategory.Suggestion,
66
+ category: ts.DiagnosticCategory.Message,
67
67
  code: 'debug',
68
68
  messageText: '- Config: ' + ctx.configFile + '\n',
69
69
  file: ctx.languageService.getProgram().getSourceFile(fileName),
package/lib/watch.js CHANGED
@@ -26,8 +26,6 @@ async function watchConfigFile(configFilePath, onBuild, watch = true, createHash
26
26
  logger.log(`Built ${_path.relative(process.cwd(), configFilePath)} in ${t1}ms, loaded ${config ? 'successfully' : 'with errors'} in ${t2}ms`);
27
27
  onBuild(config, result);
28
28
  };
29
- const cacheDir = _path.resolve(outDir, 'http_resources');
30
- const cachePathToOriginalPath = new Map();
31
29
  const ctx = await esbuild.context({
32
30
  entryPoints: [configFilePath],
33
31
  bundle: true,
@@ -42,8 +40,7 @@ async function watchConfigFile(configFilePath, onBuild, watch = true, createHash
42
40
  start = Date.now();
43
41
  });
44
42
  build.onResolve({ filter: /^https?:\/\// }, async ({ path: url }) => {
45
- const cachePath = _path.join(cacheDir, createHash(_path.posix.dirname(url)), _path.posix.basename(url));
46
- cachePathToOriginalPath.set(cachePath, url);
43
+ const cachePath = _path.join(outDir, url.split('://')[0], ...url.split('://')[1].split('/'));
47
44
  if (!fs.existsSync(cachePath)) {
48
45
  console.time('Download ' + url);
49
46
  const response = await fetch(url);
@@ -61,10 +58,10 @@ async function watchConfigFile(configFilePath, onBuild, watch = true, createHash
61
58
  };
62
59
  });
63
60
  build.onResolve({ filter: /.*/ }, ({ path, resolveDir }) => {
64
- if (!path.endsWith('.ts')) {
61
+ if (!isTsFile(path)) {
65
62
  try {
66
63
  const maybeJsPath = require.resolve(path, { paths: [resolveDir] });
67
- if (maybeJsPath !== path && !maybeJsPath.endsWith('.ts')) {
64
+ if (!isTsFile(maybeJsPath) && fs.existsSync(maybeJsPath)) {
68
65
  return {
69
66
  path: url.pathToFileURL(maybeJsPath).toString(),
70
67
  external: true,
@@ -91,4 +88,7 @@ async function watchConfigFile(configFilePath, onBuild, watch = true, createHash
91
88
  }
92
89
  return ctx;
93
90
  }
91
+ function isTsFile(path) {
92
+ return path.endsWith('.ts') || path.endsWith('.tsx') || path.endsWith('.cts') || path.endsWith('.mts');
93
+ }
94
94
  //# sourceMappingURL=watch.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsslint/core",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
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.2",
15
+ "@tsslint/types": "1.1.4",
16
16
  "error-stack-parser": "^2.1.4",
17
- "esbuild": "^0.23.0",
17
+ "esbuild": ">=0.17.0",
18
18
  "minimatch": "^10.0.1",
19
19
  "source-map-support": "^0.5.21"
20
20
  },
21
- "gitHead": "6c266922e32c08743e088c94b560e6980f77255a"
21
+ "gitHead": "03d4e7480fc96c6322d436d34a4af73cb5bc25f2"
22
22
  }