@nx/eslint 21.6.1-beta.3 → 21.6.1-beta.4

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": "21.6.1-beta.3",
3
+ "version": "21.6.1-beta.4",
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": "21.6.1-beta.3",
39
- "@nx/js": "21.6.1-beta.3",
38
+ "@nx/devkit": "21.6.1-beta.4",
39
+ "@nx/js": "21.6.1-beta.4",
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": "21.6.1-beta.3"
45
+ "nx": "21.6.1-beta.4"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "@zkochan/js-yaml": {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/eslint/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAKX,aAAa,EAMd,MAAM,YAAY,CAAC;AAuBpB,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAkOD,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAgE5D,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,mBAAmB,CAQxD,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/eslint/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAKX,aAAa,EAOd,MAAM,YAAY,CAAC;AAwBpB,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAiOD,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,mBAAmB,CA8D5D,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,mBAAmB,CAQxD,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createNodes = exports.createNodesV2 = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
6
+ const js_1 = require("@nx/js");
6
7
  const node_fs_1 = require("node:fs");
7
8
  const posix_1 = require("node:path/posix");
8
9
  const file_hasher_1 = require("nx/src/hasher/file-hasher");
@@ -71,12 +72,11 @@ const internalCreateNodes = async (configFilePath, options, context, projectsCac
71
72
  // exclude nested eslint roots and nested project roots
72
73
  [...nestedEslintRootPatterns, ...nestedProjectRootPatterns]);
73
74
  const parentConfigs = context.configFiles.filter((eslintConfig) => isSubDir(childProjectRoot, (0, posix_1.dirname)(eslintConfig)));
74
- const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(childProjectRoot, {
75
- ...options,
76
- // change this to bust the cache when making changes that would yield
77
- // different results for the same hash
78
- bust: 1,
79
- }, context, [...parentConfigs, (0, posix_1.join)(childProjectRoot, '.eslintignore')]);
75
+ const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(childProjectRoot, options, context, [
76
+ ...parentConfigs,
77
+ (0, posix_1.join)(childProjectRoot, '.eslintignore'),
78
+ (0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot)),
79
+ ]);
80
80
  if (projectsCache[hash]) {
81
81
  // We can reuse the projects in the cache.
82
82
  Object.assign(projects, projectsCache[hash]);
@@ -167,14 +167,10 @@ exports.createNodesV2 = [
167
167
  const targetsCache = readTargetsCache(cachePath);
168
168
  const { eslintConfigFiles, projectRoots, projectRootsByEslintRoots } = splitConfigFiles(configFiles);
169
169
  const lintableFilesPerProjectRoot = await collectLintableFilesByProjectRoot(projectRoots, options, context);
170
- const hashes = await (0, calculate_hash_for_create_nodes_1.calculateHashesForCreateNodes)(projectRoots, {
171
- ...options,
172
- // change this to bust the cache when making changes that would yield
173
- // different results for the same hash
174
- bust: 1,
175
- }, context, projectRoots.map((root) => {
170
+ const lockFilePattern = (0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
171
+ const hashes = await (0, calculate_hash_for_create_nodes_1.calculateHashesForCreateNodes)(projectRoots, options, context, projectRoots.map((root) => {
176
172
  const parentConfigs = eslintConfigFiles.filter((eslintConfig) => isSubDir(root, (0, posix_1.dirname)(eslintConfig)));
177
- return [...parentConfigs, (0, posix_1.join)(root, '.eslintignore')];
173
+ return [...parentConfigs, (0, posix_1.join)(root, '.eslintignore'), lockFilePattern];
178
174
  }));
179
175
  const hashByRoot = new Map(projectRoots.map((r, i) => [r, hashes[i]]));
180
176
  try {