nx 21.1.0-beta.0 → 21.1.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.
Files changed (28) hide show
  1. package/migrations.json +40 -0
  2. package/package.json +11 -14
  3. package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +3 -0
  4. package/src/command-line/init/implementation/utils.js +14 -0
  5. package/src/core/graph/main.js +1 -1
  6. package/src/daemon/client/client.js +1 -1
  7. package/src/migrations/update-17-0-0/move-cache-directory.d.ts +2 -0
  8. package/src/migrations/update-17-0-0/move-cache-directory.js +35 -0
  9. package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.d.ts +2 -0
  10. package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +72 -0
  11. package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.d.ts +2 -0
  12. package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +122 -0
  13. package/src/migrations/update-17-2-0/move-default-base.d.ts +5 -0
  14. package/src/migrations/update-17-2-0/move-default-base.js +21 -0
  15. package/src/migrations/update-17-3-0/nx-release-path.d.ts +3 -0
  16. package/src/migrations/update-17-3-0/nx-release-path.js +47 -0
  17. package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts +2 -0
  18. package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +11 -0
  19. package/src/migrations/update-21-1-0/add-gitignore-entry.d.ts +2 -0
  20. package/src/migrations/update-21-1-0/add-gitignore-entry.js +24 -0
  21. package/src/native/index.d.ts +1 -1
  22. package/src/native/index.js +8 -3
  23. package/src/native/nx.wasm32-wasi.wasm +0 -0
  24. package/src/plugins/js/project-graph/affected/lock-file-changes.d.ts +1 -0
  25. package/src/plugins/js/project-graph/affected/lock-file-changes.js +51 -11
  26. package/src/project-graph/file-utils.js +11 -0
  27. package/src/tasks-runner/run-command.js +1 -1
  28. package/src/tasks-runner/running-tasks/node-child-process.js +2 -2
package/migrations.json CHANGED
@@ -1,5 +1,40 @@
1
1
  {
2
2
  "generators": {
3
+ "17.0.0-move-cache-directory": {
4
+ "cli": "nx",
5
+ "version": "17.0.0-beta.1",
6
+ "description": "Updates the default cache directory to .nx/cache",
7
+ "implementation": "./src/migrations/update-17-0-0/move-cache-directory"
8
+ },
9
+ "17.0.0-use-minimal-config-for-tasks-runner-options": {
10
+ "cli": "nx",
11
+ "version": "17.0.0-beta.3",
12
+ "description": "Use minimal config for tasksRunnerOptions",
13
+ "implementation": "./src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options"
14
+ },
15
+ "rm-default-collection-npm-scope": {
16
+ "version": "17.0.0-rc.1",
17
+ "description": "Migration for v17.0.0-rc.1",
18
+ "implementation": "./src/migrations/update-17-0-0/rm-default-collection-npm-scope"
19
+ },
20
+ "17.3.0-update-nx-wrapper": {
21
+ "cli": "nx",
22
+ "version": "17.3.0-beta.6",
23
+ "description": "Updates the nx wrapper.",
24
+ "implementation": "./src/migrations/update-17-3-0/update-nxw"
25
+ },
26
+ "18.0.0-disable-adding-plugins-for-existing-workspaces": {
27
+ "cli": "nx",
28
+ "version": "18.0.0-beta.2",
29
+ "description": "Updates nx.json to disabled adding plugins when generating projects in an existing Nx workspace",
30
+ "implementation": "./src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces",
31
+ "x-repair-skip": true
32
+ },
33
+ "move-default-base-to-nx-json-root": {
34
+ "version": "18.1.0-beta.3",
35
+ "description": "Moves affected.defaultBase to defaultBase in `nx.json`",
36
+ "implementation": "./src/migrations/update-17-2-0/move-default-base"
37
+ },
3
38
  "19-2-0-move-graph-cache-directory": {
4
39
  "cli": "nx",
5
40
  "version": "19.2.0-beta.2",
@@ -48,6 +83,11 @@
48
83
  "version": "21.0.0-beta.11",
49
84
  "description": "Updates release changelog config based on the breaking changes in Nx v21",
50
85
  "implementation": "./src/migrations/update-21-0-0/release-changelog-config-changes"
86
+ },
87
+ "21-1-0-add-ignore-entries-for-nx-rule-files": {
88
+ "version": "21.1.0-beta.2",
89
+ "description": "Adds **/nx-rules.mdc and **/nx.instructions.md to .gitignore if not present",
90
+ "implementation": "./src/migrations/update-21-1-0/add-gitignore-entry"
51
91
  }
52
92
  }
53
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "21.1.0-beta.0",
3
+ "version": "21.1.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": {
@@ -83,16 +83,16 @@
83
83
  }
84
84
  },
85
85
  "optionalDependencies": {
86
- "@nx/nx-darwin-arm64": "21.1.0-beta.0",
87
- "@nx/nx-darwin-x64": "21.1.0-beta.0",
88
- "@nx/nx-freebsd-x64": "21.1.0-beta.0",
89
- "@nx/nx-linux-arm-gnueabihf": "21.1.0-beta.0",
90
- "@nx/nx-linux-arm64-gnu": "21.1.0-beta.0",
91
- "@nx/nx-linux-arm64-musl": "21.1.0-beta.0",
92
- "@nx/nx-linux-x64-gnu": "21.1.0-beta.0",
93
- "@nx/nx-linux-x64-musl": "21.1.0-beta.0",
94
- "@nx/nx-win32-arm64-msvc": "21.1.0-beta.0",
95
- "@nx/nx-win32-x64-msvc": "21.1.0-beta.0"
86
+ "@nx/nx-darwin-arm64": "21.1.0-beta.2",
87
+ "@nx/nx-darwin-x64": "21.1.0-beta.2",
88
+ "@nx/nx-freebsd-x64": "21.1.0-beta.2",
89
+ "@nx/nx-linux-arm-gnueabihf": "21.1.0-beta.2",
90
+ "@nx/nx-linux-arm64-gnu": "21.1.0-beta.2",
91
+ "@nx/nx-linux-arm64-musl": "21.1.0-beta.2",
92
+ "@nx/nx-linux-x64-gnu": "21.1.0-beta.2",
93
+ "@nx/nx-linux-x64-musl": "21.1.0-beta.2",
94
+ "@nx/nx-win32-arm64-msvc": "21.1.0-beta.2",
95
+ "@nx/nx-win32-x64-msvc": "21.1.0-beta.2"
96
96
  },
97
97
  "nx-migrations": {
98
98
  "migrations": "./migrations.json",
@@ -165,9 +165,6 @@
165
165
  "x86_64-unknown-freebsd"
166
166
  ]
167
167
  },
168
- "engines": {
169
- "node": "^20.19.0 || ^22.12.0"
170
- },
171
168
  "types": "./bin/nx.d.ts",
172
169
  "main": "./bin/nx.js",
173
170
  "type": "commonjs",
@@ -59,6 +59,9 @@ function generateDotNxSetup(version) {
59
59
  const changes = host.listChanges();
60
60
  (0, tree_1.printChanges)(changes);
61
61
  (0, tree_1.flushChanges)(host.root, changes);
62
+ // Ensure that the dot-nx installation is available.
63
+ // This is needed when using a global nx with dot-nx, otherwise running any nx command using global command will fail due to missing modules.
64
+ (0, child_process_1.execSync)('./nx --version', { stdio: 'ignore' });
62
65
  }
63
66
  function normalizeVersionForNxJson(pkg, version) {
64
67
  if (!(0, semver_1.valid)(version)) {
@@ -188,6 +188,20 @@ function updateGitIgnore(root) {
188
188
  }
189
189
  lines.push('.nx/workspace-data');
190
190
  }
191
+ if (!contents.includes('.cursor/rules/nx-rules.mdc')) {
192
+ if (!sepIncluded) {
193
+ lines.push('\n');
194
+ sepIncluded = true;
195
+ }
196
+ lines.push('.cursor/rules/nx-rules.mdc');
197
+ }
198
+ if (!contents.includes('.github/instructions/nx.instructions.md')) {
199
+ if (!sepIncluded) {
200
+ lines.push('\n');
201
+ sepIncluded = true;
202
+ }
203
+ lines.push('.github/instructions/nx.instructions.md');
204
+ }
191
205
  (0, fs_1.writeFileSync)(ignorePath, lines.join('\n'), 'utf-8');
192
206
  }
193
207
  catch { }