nx 23.0.0 → 23.0.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 (59) hide show
  1. package/README.md +1 -2
  2. package/dist/bin/init-local.js +1 -1
  3. package/dist/release/changelog-renderer/index.d.ts +1 -0
  4. package/dist/release/changelog-renderer/index.js +27 -12
  5. package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +1 -0
  6. package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +6 -1
  7. package/dist/src/command-line/init/init-v2.js +1 -1
  8. package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +3 -2
  9. package/dist/src/command-line/migrate/migrate.d.ts +2 -0
  10. package/dist/src/command-line/migrate/migrate.js +34 -7
  11. package/dist/src/command-line/migrate/resolve-package-version.js +3 -25
  12. package/dist/src/command-line/migrate/update-filters.js +2 -1
  13. package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.d.ts +1 -1
  14. package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +37 -20
  15. package/dist/src/command-line/release/version/resolve-current-version.js +4 -1
  16. package/dist/src/core/graph/main.js +1 -1
  17. package/dist/src/daemon/server/project-graph-incremental-recomputation.js +30 -11
  18. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  19. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  20. package/dist/src/plugins/js/lock-file/bun-parser.js +61 -38
  21. package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +1 -3
  22. package/dist/src/plugins/js/package-json/create-package-json.js +22 -1
  23. package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.js +1 -1
  24. package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +7 -0
  25. package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +26 -1
  26. package/dist/src/plugins/js/utils/register.d.ts +31 -10
  27. package/dist/src/plugins/js/utils/register.js +87 -18
  28. package/dist/src/plugins/package-json/create-nodes.js +5 -3
  29. package/dist/src/project-graph/operators.d.ts +0 -1
  30. package/dist/src/project-graph/operators.js +0 -44
  31. package/dist/src/project-graph/project-graph-builder.js +26 -10
  32. package/dist/src/project-graph/utils/project-configuration/target-defaults.js +23 -6
  33. package/dist/src/project-graph/utils/project-configuration-utils.js +28 -28
  34. package/dist/src/tasks-runner/batch/run-batch.js +3 -0
  35. package/dist/src/tasks-runner/cache.js +6 -0
  36. package/dist/src/tasks-runner/pseudo-terminal.d.ts +1 -0
  37. package/dist/src/tasks-runner/pseudo-terminal.js +18 -4
  38. package/dist/src/tasks-runner/run-command.js +24 -8
  39. package/dist/src/tasks-runner/utils.d.ts +1 -0
  40. package/dist/src/tasks-runner/utils.js +4 -0
  41. package/dist/src/utils/ab-testing.d.ts +9 -0
  42. package/dist/src/utils/ab-testing.js +18 -4
  43. package/dist/src/utils/catalog/index.d.ts +7 -0
  44. package/dist/src/utils/catalog/index.js +31 -0
  45. package/dist/src/utils/catalog/manager-utils.d.ts +9 -0
  46. package/dist/src/utils/catalog/manager-utils.js +215 -0
  47. package/dist/src/utils/catalog/pnpm-manager.js +4 -102
  48. package/dist/src/utils/catalog/yarn-manager.js +4 -102
  49. package/dist/src/utils/is-sandbox.js +2 -0
  50. package/dist/src/utils/min-release-age/behavior/pnpm.d.ts +6 -5
  51. package/dist/src/utils/min-release-age/behavior/pnpm.js +87 -339
  52. package/dist/src/utils/package-json.d.ts +1 -0
  53. package/dist/src/utils/package-manager.d.ts +6 -3
  54. package/dist/src/utils/package-manager.js +21 -7
  55. package/dist/src/utils/spinner.d.ts +13 -1
  56. package/dist/src/utils/spinner.js +20 -4
  57. package/dist/src/utils/terminal-link.d.ts +16 -0
  58. package/dist/src/utils/terminal-link.js +87 -0
  59. package/package.json +19 -15
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Wrap `text` in an OSC 8 hyperlink that points at `url`. Supported terminals
3
+ * render `text` as a clickable link to `url`; everywhere else `text` prints
4
+ * unchanged. This lets us keep tracking querystrings out of the visible output
5
+ * while still attaching them to the link target (CLOUD-4642).
6
+ */
7
+ export declare function terminalLink(text: string, url: string): string;
8
+ /**
9
+ * Exported for testing. VTE reports versions as a packed integer, e.g. "5402"
10
+ * means 0.54.2; everything else is dot-separated.
11
+ */
12
+ export declare function parseVersion(versionString?: string): {
13
+ major: number;
14
+ minor: number;
15
+ patch: number;
16
+ };
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ // Keep in sync with packages/create-nx-workspace/src/utils/terminal-link.ts.
3
+ // create-nx-workspace cannot depend on nx, so this generic OSC 8 helper is
4
+ // intentionally duplicated (same reasoning as output.ts / package-manager.ts).
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.terminalLink = terminalLink;
7
+ exports.parseVersion = parseVersion;
8
+ const OSC = '\u001B]';
9
+ const BEL = '\u0007';
10
+ const SEP = ';';
11
+ /**
12
+ * Wrap `text` in an OSC 8 hyperlink that points at `url`. Supported terminals
13
+ * render `text` as a clickable link to `url`; everywhere else `text` prints
14
+ * unchanged. This lets us keep tracking querystrings out of the visible output
15
+ * while still attaching them to the link target (CLOUD-4642).
16
+ */
17
+ function terminalLink(text, url) {
18
+ if (!supportsHyperlinks()) {
19
+ return text;
20
+ }
21
+ return [OSC, '8', SEP, SEP, url, BEL, text, OSC, '8', SEP, SEP, BEL].join('');
22
+ }
23
+ /**
24
+ * Best-effort detection of OSC 8 hyperlink support, adapted from the
25
+ * `supports-hyperlinks` package. Defaults to false when in doubt so we never
26
+ * print raw escape sequences to a terminal that can't render them.
27
+ */
28
+ function supportsHyperlinks() {
29
+ const env = process.env;
30
+ if (env.FORCE_HYPERLINK !== undefined) {
31
+ return !(env.FORCE_HYPERLINK.length > 0 && parseInt(env.FORCE_HYPERLINK, 10) === 0);
32
+ }
33
+ if (!process.stdout || !process.stdout.isTTY) {
34
+ return false;
35
+ }
36
+ if (process.platform === 'win32') {
37
+ // Only Windows Terminal advertises OSC 8 support reliably.
38
+ return Boolean(env.WT_SESSION);
39
+ }
40
+ if (env.CI || env.TEAMCITY_VERSION) {
41
+ return false;
42
+ }
43
+ if (env.TERM === 'dumb') {
44
+ return false;
45
+ }
46
+ if (env.TERM_PROGRAM) {
47
+ const version = parseVersion(env.TERM_PROGRAM_VERSION);
48
+ switch (env.TERM_PROGRAM) {
49
+ case 'iTerm.app':
50
+ return version.major === 3 ? version.minor >= 1 : version.major > 3;
51
+ case 'WezTerm':
52
+ return version.major >= 20200620;
53
+ case 'vscode':
54
+ return (version.major > 1 || (version.major === 1 && version.minor >= 72));
55
+ case 'ghostty':
56
+ return true;
57
+ }
58
+ }
59
+ if (env.VTE_VERSION) {
60
+ if (env.VTE_VERSION === '0.50.0') {
61
+ return false;
62
+ }
63
+ const version = parseVersion(env.VTE_VERSION);
64
+ return version.major > 0 || version.minor >= 50;
65
+ }
66
+ if (env.TERM === 'xterm-kitty') {
67
+ return true;
68
+ }
69
+ if (env.TERMINAL_EMULATOR === 'JetBrains-JediTerm') {
70
+ return true;
71
+ }
72
+ return false;
73
+ }
74
+ /**
75
+ * Exported for testing. VTE reports versions as a packed integer, e.g. "5402"
76
+ * means 0.54.2; everything else is dot-separated.
77
+ */
78
+ function parseVersion(versionString = '') {
79
+ if (/^\d{3,4}$/.test(versionString)) {
80
+ const m = /(\d{1,2})(\d{2})/.exec(versionString) ?? [];
81
+ return { major: 0, minor: parseInt(m[1], 10), patch: parseInt(m[2], 10) };
82
+ }
83
+ const [major = 0, minor = 0, patch = 0] = (versionString ?? '')
84
+ .split('.')
85
+ .map((n) => parseInt(n, 10) || 0);
86
+ return { major, minor, patch };
87
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "23.0.0",
3
+ "version": "23.0.2",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
@@ -55,12 +55,13 @@
55
55
  "@tybys/wasm-util": "0.9.0",
56
56
  "@yarnpkg/lockfile": "1.1.0",
57
57
  "@zkochan/js-yaml": "0.0.7",
58
+ "agent-base": "6.0.2",
58
59
  "ansi-colors": "4.1.3",
59
60
  "ansi-regex": "5.0.1",
60
61
  "ansi-styles": "4.3.0",
61
62
  "argparse": "2.0.1",
62
63
  "asynckit": "0.4.0",
63
- "axios": "1.16.0",
64
+ "axios": "1.16.1",
64
65
  "balanced-match": "4.0.3",
65
66
  "base64-js": "1.5.1",
66
67
  "bl": "4.1.0",
@@ -75,6 +76,7 @@
75
76
  "color-convert": "2.0.1",
76
77
  "color-name": "1.1.4",
77
78
  "combined-stream": "1.0.8",
79
+ "debug": "4.4.3",
78
80
  "defaults": "1.0.4",
79
81
  "define-lazy-prop": "2.0.0",
80
82
  "delayed-stream": "1.0.0",
@@ -94,7 +96,7 @@
94
96
  "figures": "3.2.0",
95
97
  "flat": "5.0.2",
96
98
  "follow-redirects": "1.16.0",
97
- "form-data": "4.0.5",
99
+ "form-data": "4.0.6",
98
100
  "fs-constants": "1.0.0",
99
101
  "function-bind": "1.1.2",
100
102
  "get-caller-file": "2.0.5",
@@ -104,7 +106,8 @@
104
106
  "has-flag": "4.0.0",
105
107
  "has-symbols": "1.1.0",
106
108
  "has-tostringtag": "1.0.2",
107
- "hasown": "2.0.2",
109
+ "hasown": "2.0.4",
110
+ "https-proxy-agent": "5.0.1",
108
111
  "ieee754": "1.2.1",
109
112
  "ignore": "7.0.5",
110
113
  "inherits": "2.0.4",
@@ -124,6 +127,7 @@
124
127
  "mimic-fn": "2.1.0",
125
128
  "minimatch": "10.2.5",
126
129
  "minimist": "1.2.8",
130
+ "ms": "2.1.3",
127
131
  "npm-run-path": "4.0.1",
128
132
  "once": "1.4.0",
129
133
  "onetime": "5.1.2",
@@ -146,7 +150,7 @@
146
150
  "strip-bom": "3.0.0",
147
151
  "supports-color": "7.2.0",
148
152
  "tar-stream": "2.2.0",
149
- "tmp": "0.2.6",
153
+ "tmp": "0.2.7",
150
154
  "tsconfig-paths": "4.2.0",
151
155
  "tslib": "2.8.1",
152
156
  "util-deprecate": "1.0.2",
@@ -172,16 +176,16 @@
172
176
  }
173
177
  },
174
178
  "optionalDependencies": {
175
- "@nx/nx-darwin-arm64": "23.0.0",
176
- "@nx/nx-darwin-x64": "23.0.0",
177
- "@nx/nx-freebsd-x64": "23.0.0",
178
- "@nx/nx-linux-arm-gnueabihf": "23.0.0",
179
- "@nx/nx-linux-arm64-gnu": "23.0.0",
180
- "@nx/nx-linux-arm64-musl": "23.0.0",
181
- "@nx/nx-linux-x64-gnu": "23.0.0",
182
- "@nx/nx-linux-x64-musl": "23.0.0",
183
- "@nx/nx-win32-arm64-msvc": "23.0.0",
184
- "@nx/nx-win32-x64-msvc": "23.0.0"
179
+ "@nx/nx-darwin-arm64": "23.0.2",
180
+ "@nx/nx-darwin-x64": "23.0.2",
181
+ "@nx/nx-freebsd-x64": "23.0.2",
182
+ "@nx/nx-linux-arm-gnueabihf": "23.0.2",
183
+ "@nx/nx-linux-arm64-gnu": "23.0.2",
184
+ "@nx/nx-linux-arm64-musl": "23.0.2",
185
+ "@nx/nx-linux-x64-gnu": "23.0.2",
186
+ "@nx/nx-linux-x64-musl": "23.0.2",
187
+ "@nx/nx-win32-arm64-msvc": "23.0.2",
188
+ "@nx/nx-win32-x64-msvc": "23.0.2"
185
189
  },
186
190
  "nx-migrations": {
187
191
  "migrations": "./migrations.json",