@tsslint/core 1.1.2 → 1.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/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
@@ -61,10 +61,10 @@ async function watchConfigFile(configFilePath, onBuild, watch = true, createHash
61
61
  };
62
62
  });
63
63
  build.onResolve({ filter: /.*/ }, ({ path, resolveDir }) => {
64
- if (!path.endsWith('.ts')) {
64
+ if (!isTsFile(path)) {
65
65
  try {
66
66
  const maybeJsPath = require.resolve(path, { paths: [resolveDir] });
67
- if (maybeJsPath !== path && !maybeJsPath.endsWith('.ts')) {
67
+ if (!isTsFile(maybeJsPath) && fs.existsSync(maybeJsPath)) {
68
68
  return {
69
69
  path: url.pathToFileURL(maybeJsPath).toString(),
70
70
  external: true,
@@ -91,4 +91,7 @@ async function watchConfigFile(configFilePath, onBuild, watch = true, createHash
91
91
  }
92
92
  return ctx;
93
93
  }
94
+ function isTsFile(path) {
95
+ return path.endsWith('.ts') || path.endsWith('.tsx') || path.endsWith('.cts') || path.endsWith('.mts');
96
+ }
94
97
  //# 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.3",
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.3",
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": "2711b634ed851fe9b1dcaad2cf7d7cf1b42871b2"
22
22
  }