nx 16.8.0-beta.1 → 16.8.0-beta.2

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",
3
- "version": "16.8.0-beta.1",
3
+ "version": "16.8.0-beta.2",
4
4
  "private": false,
5
5
  "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "homepage": "https://nx.dev",
34
34
  "dependencies": {
35
- "@nrwl/tao": "16.8.0-beta.1",
35
+ "@nrwl/tao": "16.8.0-beta.2",
36
36
  "@parcel/watcher": "2.0.4",
37
37
  "@yarnpkg/lockfile": "^1.1.0",
38
38
  "@yarnpkg/parsers": "3.0.0-rc.46",
@@ -81,16 +81,16 @@
81
81
  }
82
82
  },
83
83
  "optionalDependencies": {
84
- "@nx/nx-darwin-arm64": "16.8.0-beta.1",
85
- "@nx/nx-darwin-x64": "16.8.0-beta.1",
86
- "@nx/nx-freebsd-x64": "16.8.0-beta.1",
87
- "@nx/nx-linux-arm-gnueabihf": "16.8.0-beta.1",
88
- "@nx/nx-linux-arm64-gnu": "16.8.0-beta.1",
89
- "@nx/nx-linux-arm64-musl": "16.8.0-beta.1",
90
- "@nx/nx-linux-x64-gnu": "16.8.0-beta.1",
91
- "@nx/nx-linux-x64-musl": "16.8.0-beta.1",
92
- "@nx/nx-win32-arm64-msvc": "16.8.0-beta.1",
93
- "@nx/nx-win32-x64-msvc": "16.8.0-beta.1"
84
+ "@nx/nx-darwin-arm64": "16.8.0-beta.2",
85
+ "@nx/nx-darwin-x64": "16.8.0-beta.2",
86
+ "@nx/nx-freebsd-x64": "16.8.0-beta.2",
87
+ "@nx/nx-linux-arm-gnueabihf": "16.8.0-beta.2",
88
+ "@nx/nx-linux-arm64-gnu": "16.8.0-beta.2",
89
+ "@nx/nx-linux-arm64-musl": "16.8.0-beta.2",
90
+ "@nx/nx-linux-x64-gnu": "16.8.0-beta.2",
91
+ "@nx/nx-linux-x64-musl": "16.8.0-beta.2",
92
+ "@nx/nx-win32-arm64-msvc": "16.8.0-beta.2",
93
+ "@nx/nx-win32-x64-msvc": "16.8.0-beta.2"
94
94
  },
95
95
  "nx-migrations": {
96
96
  "migrations": "./migrations.json",
@@ -177,5 +177,5 @@
177
177
  },
178
178
  "main": "./bin/nx.js",
179
179
  "type": "commonjs",
180
- "gitHead": "231a998e004c13e559c171ba6c164a9127886153"
180
+ "gitHead": "9bcc04742f9e1516d8c1ddbfb1907770c347876f"
181
181
  }
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const child_process_1 = require("child_process");
6
6
  const path = require("path");
7
7
  const command_line_utils_1 = require("../../utils/command-line-utils");
8
+ const ignore_1 = require("../../utils/ignore");
8
9
  const fileutils_1 = require("../../utils/fileutils");
9
10
  const file_utils_1 = require("../../project-graph/file-utils");
10
11
  const prettier = require("prettier");
@@ -16,7 +17,6 @@ const affected_project_graph_1 = require("../../project-graph/affected/affected-
16
17
  const configuration_1 = require("../../config/configuration");
17
18
  const chunkify_1 = require("../../utils/chunkify");
18
19
  const all_file_data_1 = require("../../utils/all-file-data");
19
- const semver_1 = require("semver");
20
20
  const PRETTIER_PATH = getPrettierPath();
21
21
  function format(command, args) {
22
22
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
@@ -64,9 +64,11 @@ function getPatterns(args) {
64
64
  // which allows it to be considered for calculating "patterns"
65
65
  .concat('.swcrc');
66
66
  const patterns = p.files.filter((f) => (0, fileutils_1.fileExists)(f) && supportedExtensions.includes(path.extname(f)));
67
+ // exclude patterns in .nxignore or .gitignore
68
+ const nonIgnoredPatterns = (0, ignore_1.getIgnoreObject)().filter(patterns);
67
69
  return args.libsAndApps
68
- ? yield getPatternsFromApps(patterns, yield (0, all_file_data_1.allFileData)(), graph)
69
- : patterns;
70
+ ? yield getPatternsFromApps(nonIgnoredPatterns, yield (0, all_file_data_1.allFileData)(), graph)
71
+ : nonIgnoredPatterns;
70
72
  }
71
73
  catch (_a) {
72
74
  return allFilesPattern;
@@ -146,9 +148,6 @@ function sortTsConfig() {
146
148
  }
147
149
  }
148
150
  function getPrettierPath() {
149
- const prettierVersion = (0, package_json_1.readModulePackageJson)('prettier').packageJson.version;
150
- if ((0, semver_1.gte)(prettierVersion, '3.0.0')) {
151
- return require.resolve('prettier/bin/prettier.cjs');
152
- }
153
- return require.resolve('prettier/bin-prettier');
151
+ const { bin } = (0, package_json_1.readModulePackageJson)('prettier').packageJson;
152
+ return require.resolve(path.join('prettier', bin));
154
153
  }
@@ -148,7 +148,8 @@ function projectHasKarmaConfig(project) {
148
148
  return (0, fileutils_1.fileExists)((0, path_1.join)(project.root, 'karma.conf.js'));
149
149
  }
150
150
  function projectHasEslintConfig(project) {
151
- return (0, fileutils_1.fileExists)((0, path_1.join)(project.root, '.eslintrc.json'));
151
+ return ((0, fileutils_1.fileExists)((0, path_1.join)(project.root, '.eslintrc.json')) ||
152
+ (0, fileutils_1.fileExists)((0, path_1.join)(project.root, 'eslint.config.js')));
152
153
  }
153
154
  function replaceNgWithNxInPackageJsonScripts(repoRoot) {
154
155
  var _a;
@@ -23,16 +23,12 @@ const processProjectGraph = (graph, context) => tslib_1.__awaiter(void 0, void 0
23
23
  let parsedLockFile;
24
24
  if (lockFileNeedsReprocessing(lockHash)) {
25
25
  parsedLockFile = (0, lock_file_1.parseLockFile)();
26
- if (parsedLockFile) {
27
- writeLastProcessedLockfileHash(lockHash, parsedLockFile);
28
- }
26
+ writeLastProcessedLockfileHash(lockHash, parsedLockFile);
29
27
  }
30
28
  else {
31
29
  parsedLockFile = readParsedLockFile();
32
30
  }
33
- if (parsedLockFile) {
34
- builder.mergeProjectGraph(parsedLockFile);
35
- }
31
+ builder.mergeProjectGraph(parsedLockFile);
36
32
  }
37
33
  }
38
34
  perf_hooks_1.performance.mark('build typescript dependencies - start');
@@ -287,8 +287,7 @@ function mapSnapshots(dependencies, nodes, packageJson, isBerry) {
287
287
  if (isBerry && key.includes('@patch:') && key.includes('#')) {
288
288
  normalizedKey = key
289
289
  .slice(0, key.indexOf('#'))
290
- .replace(`@patch:${packageName}@`, '@npm:')
291
- .replace(/:.*$/u, ':' + snapshotKey.version);
290
+ .replace(`@patch:${packageName}@`, '@npm:');
292
291
  }
293
292
  if (!existingKeys.get(packageName) ||
294
293
  !existingKeys.get(packageName).has(normalizedKey)) {
@@ -49,7 +49,7 @@ export interface PackageJson {
49
49
  }>;
50
50
  resolutions?: Record<string, string>;
51
51
  overrides?: PackageOverride;
52
- bin?: Record<string, string>;
52
+ bin?: Record<string, string> | string;
53
53
  workspaces?: string[] | {
54
54
  packages: string[];
55
55
  };