@nx/eslint 0.0.0-pr-32978-0c22436 → 0.0.0-pr-32947-5dbf838

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": "0.0.0-pr-32978-0c22436",
3
+ "version": "0.0.0-pr-32947-5dbf838",
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": "0.0.0-pr-32978-0c22436",
39
- "@nx/js": "0.0.0-pr-32978-0c22436",
38
+ "@nx/devkit": "0.0.0-pr-32947-5dbf838",
39
+ "@nx/js": "0.0.0-pr-32947-5dbf838",
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": "0.0.0-pr-32978-0c22436"
45
+ "nx": "0.0.0-pr-32947-5dbf838"
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,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"}
1
+ {"version":3,"file":"version-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/eslint/src/utils/version-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAI/D,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,IAAI,GACV,MAAM,GAAG,IAAI,CA2Bf;AAED,wBAAgB,yBAAyB,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAEpE"}
@@ -13,25 +13,18 @@ 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
- 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
- }
16
+ const rootPackageJson = tree
17
+ ? (0, devkit_1.readJson)(tree, 'package.json')
18
+ : (0, devkit_1.readJsonFile)('package.json');
19
+ const pkgVersionInRootPackageJson = rootPackageJson.devDependencies?.[pkgName] ??
20
+ rootPackageJson.dependencies?.[pkgName];
26
21
  if (!pkgVersionInRootPackageJson) {
27
22
  // the package is not installed
28
23
  return null;
29
24
  }
30
25
  try {
31
26
  // try to parse and return the version
32
- return tree
33
- ? (0, semver_1.checkAndCleanWithSemver)(tree, pkgName, pkgVersionInRootPackageJson)
34
- : (0, semver_1.checkAndCleanWithSemver)(pkgName, pkgVersionInRootPackageJson);
27
+ return (0, semver_1.checkAndCleanWithSemver)(pkgName, pkgVersionInRootPackageJson);
35
28
  }
36
29
  catch { }
37
30
  // we could not resolve the version