@tsslint/core 1.3.0 → 1.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsslint/core",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
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.3.0",
15
+ "@tsslint/types": "1.3.1",
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": "3dcc9b0ee6ff8ba8902749edca1892edb5e072d4"
21
+ "gitHead": "ddc73232699ecd7b4e4bfe5c9b511254c5926986"
22
22
  }
package/lib/cache.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import type { ProjectContext } from '@tsslint/types';
2
- export declare function loadCache(configFilePath: string, createHash?: (path: string) => string): ProjectContext['cache'];
3
- export declare function saveCache(configFilePath: string, cache: ProjectContext['cache'], createHash?: (path: string) => string): void;
4
- export declare function getDotTsslintPath(configFilePath: string): string;
package/lib/cache.js DELETED
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loadCache = loadCache;
4
- exports.saveCache = saveCache;
5
- exports.getDotTsslintPath = getDotTsslintPath;
6
- const path = require("path");
7
- const fs = require("fs");
8
- function loadCache(configFilePath, createHash = btoa) {
9
- const outDir = getDotTsslintPath(configFilePath);
10
- const cacheFileName = createHash(path.relative(outDir, configFilePath)) + '.cache.json';
11
- const cacheFilePath = path.join(outDir, cacheFileName);
12
- const cacheFileStat = fs.statSync(cacheFilePath);
13
- const configFileStat = fs.statSync(configFilePath);
14
- if (cacheFileStat.isFile() && cacheFileStat.mtimeMs > configFileStat.mtimeMs) {
15
- try {
16
- return require(cacheFilePath);
17
- }
18
- catch {
19
- return {};
20
- }
21
- }
22
- return {};
23
- }
24
- function saveCache(configFilePath, cache, createHash = btoa) {
25
- const outDir = getDotTsslintPath(configFilePath);
26
- const cacheFileName = createHash(path.relative(outDir, configFilePath)) + '.cache.json';
27
- const cacheFilePath = path.join(outDir, cacheFileName);
28
- fs.writeFileSync(cacheFilePath, JSON.stringify(cache));
29
- }
30
- function getDotTsslintPath(configFilePath) {
31
- return path.resolve(configFilePath, '..', 'node_modules', '.tsslint');
32
- }
33
- //# sourceMappingURL=cache.js.map