@nx/eslint 22.0.0-beta.5 → 22.0.0-beta.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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/eslint",
|
3
|
-
"version": "22.0.0-beta.
|
3
|
+
"version": "22.0.0-beta.6",
|
4
4
|
"private": false,
|
5
5
|
"description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.",
|
6
6
|
"repository": {
|
@@ -35,14 +35,14 @@
|
|
35
35
|
"eslint": "^8.0.0 || ^9.0.0"
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
|
-
"@nx/devkit": "22.0.0-beta.
|
39
|
-
"@nx/js": "22.0.0-beta.
|
38
|
+
"@nx/devkit": "22.0.0-beta.6",
|
39
|
+
"@nx/js": "22.0.0-beta.6",
|
40
40
|
"semver": "^7.5.3",
|
41
41
|
"tslib": "^2.3.0",
|
42
42
|
"typescript": "~5.9.2"
|
43
43
|
},
|
44
44
|
"devDependencies": {
|
45
|
-
"nx": "22.0.0-beta.
|
45
|
+
"nx": "22.0.0-beta.6"
|
46
46
|
},
|
47
47
|
"peerDependenciesMeta": {
|
48
48
|
"@zkochan/js-yaml": {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/eslint/src/utils/version-utils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"version-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/eslint/src/utils/version-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAIpB,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,IAAI,GACV,MAAM,GAAG,IAAI,CAmCf;AAED,wBAAgB,yBAAyB,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAEpE"}
|
@@ -13,18 +13,25 @@ function getInstalledPackageVersion(pkgName, tree) {
|
|
13
13
|
catch { }
|
14
14
|
// the package is not installed on disk, it could be in the package.json
|
15
15
|
// but waiting to be installed
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
let pkgVersionInRootPackageJson;
|
17
|
+
if (tree) {
|
18
|
+
pkgVersionInRootPackageJson = (0, devkit_1.getDependencyVersionFromPackageJson)(tree, pkgName);
|
19
|
+
}
|
20
|
+
else {
|
21
|
+
const rootPackageJson = (0, devkit_1.readJsonFile)('package.json');
|
22
|
+
pkgVersionInRootPackageJson =
|
23
|
+
rootPackageJson.devDependencies?.[pkgName] ??
|
24
|
+
rootPackageJson.dependencies?.[pkgName];
|
25
|
+
}
|
21
26
|
if (!pkgVersionInRootPackageJson) {
|
22
27
|
// the package is not installed
|
23
28
|
return null;
|
24
29
|
}
|
25
30
|
try {
|
26
31
|
// try to parse and return the version
|
27
|
-
return
|
32
|
+
return tree
|
33
|
+
? (0, semver_1.checkAndCleanWithSemver)(tree, pkgName, pkgVersionInRootPackageJson)
|
34
|
+
: (0, semver_1.checkAndCleanWithSemver)(pkgName, pkgVersionInRootPackageJson);
|
28
35
|
}
|
29
36
|
catch { }
|
30
37
|
// we could not resolve the version
|