typescript-eslint 8.39.1-alpha.1 → 8.39.1-alpha.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTSConfigRootDirFromStack.d.ts","sourceRoot":"","sources":["../src/getTSConfigRootDirFromStack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getTSConfigRootDirFromStack.d.ts","sourceRoot":"","sources":["../src/getTSConfigRootDirFromStack.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,GAAG,SAAS,CAsChE"}
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getTSConfigRootDirFromStack = getTSConfigRootDirFromStack;
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const node_url_1 = require("node:url");
|
|
8
9
|
/**
|
|
9
10
|
* Infers the `tsconfigRootDir` from the current call stack, using the V8 API.
|
|
10
11
|
*
|
|
@@ -27,10 +28,16 @@ function getTSConfigRootDirFromStack() {
|
|
|
27
28
|
return rv;
|
|
28
29
|
}
|
|
29
30
|
for (const callSite of getStack()) {
|
|
30
|
-
const
|
|
31
|
-
if (!
|
|
31
|
+
const stackFrameFilePathOrUrl = callSite.getFileName();
|
|
32
|
+
if (!stackFrameFilePathOrUrl) {
|
|
32
33
|
continue;
|
|
33
34
|
}
|
|
35
|
+
// ESM seem to return a file URL, so we'll convert it to a file path.
|
|
36
|
+
// AFAICT this isn't documented in the v8 API docs, but it seems to be the case.
|
|
37
|
+
// See https://github.com/typescript-eslint/typescript-eslint/issues/11429
|
|
38
|
+
const stackFrameFilePath = stackFrameFilePathOrUrl.startsWith('file://')
|
|
39
|
+
? (0, node_url_1.fileURLToPath)(stackFrameFilePathOrUrl)
|
|
40
|
+
: stackFrameFilePathOrUrl;
|
|
34
41
|
const parsedPath = node_path_1.default.parse(stackFrameFilePath);
|
|
35
42
|
if (/^eslint\.config\.(c|m)?(j|t)s$/.test(parsedPath.base)) {
|
|
36
43
|
return parsedPath.dir;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typescript-eslint",
|
|
3
|
-
"version": "8.39.1-alpha.
|
|
3
|
+
"version": "8.39.1-alpha.3",
|
|
4
4
|
"description": "Tooling which enables you to use TypeScript with ESLint",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"typecheck": "yarn run -BT nx typecheck"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "8.39.1-alpha.
|
|
54
|
-
"@typescript-eslint/parser": "8.39.1-alpha.
|
|
55
|
-
"@typescript-eslint/typescript-estree": "8.39.1-alpha.
|
|
56
|
-
"@typescript-eslint/utils": "8.39.1-alpha.
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "8.39.1-alpha.3",
|
|
54
|
+
"@typescript-eslint/parser": "8.39.1-alpha.3",
|
|
55
|
+
"@typescript-eslint/typescript-estree": "8.39.1-alpha.3",
|
|
56
|
+
"@typescript-eslint/utils": "8.39.1-alpha.3"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"eslint": "^8.57.0 || ^9.0.0",
|