nx 22.2.2 → 22.2.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",
3
- "version": "22.2.2",
3
+ "version": "22.2.4",
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": "22.2.2",
87
- "@nx/nx-darwin-x64": "22.2.2",
88
- "@nx/nx-freebsd-x64": "22.2.2",
89
- "@nx/nx-linux-arm-gnueabihf": "22.2.2",
90
- "@nx/nx-linux-arm64-gnu": "22.2.2",
91
- "@nx/nx-linux-arm64-musl": "22.2.2",
92
- "@nx/nx-linux-x64-gnu": "22.2.2",
93
- "@nx/nx-linux-x64-musl": "22.2.2",
94
- "@nx/nx-win32-arm64-msvc": "22.2.2",
95
- "@nx/nx-win32-x64-msvc": "22.2.2"
86
+ "@nx/nx-darwin-arm64": "22.2.4",
87
+ "@nx/nx-darwin-x64": "22.2.4",
88
+ "@nx/nx-freebsd-x64": "22.2.4",
89
+ "@nx/nx-linux-arm-gnueabihf": "22.2.4",
90
+ "@nx/nx-linux-arm64-gnu": "22.2.4",
91
+ "@nx/nx-linux-arm64-musl": "22.2.4",
92
+ "@nx/nx-linux-x64-gnu": "22.2.4",
93
+ "@nx/nx-linux-x64-musl": "22.2.4",
94
+ "@nx/nx-win32-arm64-msvc": "22.2.4",
95
+ "@nx/nx-win32-x64-msvc": "22.2.4"
96
96
  },
97
97
  "nx-migrations": {
98
98
  "migrations": "./migrations.json",
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/format/format.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2B/B,wBAAsB,MAAM,CAC1B,OAAO,EAAE,OAAO,GAAG,OAAO,EAC1B,IAAI,EAAE,KAAK,CAAC,SAAS,GACpB,OAAO,CAAC,IAAI,CAAC,CA8Df"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/format/format.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2B/B,wBAAsB,MAAM,CAC1B,OAAO,EAAE,OAAO,GAAG,OAAO,EAC1B,IAAI,EAAE,KAAK,CAAC,SAAS,GACpB,OAAO,CAAC,IAAI,CAAC,CA8Df"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.format = format;
4
4
  const node_child_process_1 = require("node:child_process");
5
5
  const path = require("node:path");
6
+ const semver_1 = require("semver");
6
7
  const file_utils_1 = require("../../project-graph/file-utils");
7
8
  const command_line_utils_1 = require("../../utils/command-line-utils");
8
9
  const fileutils_1 = require("../../utils/fileutils");
@@ -146,12 +147,15 @@ function write(patterns) {
146
147
  return result;
147
148
  }, [[], []]);
148
149
  const prettierPath = getPrettierPath();
149
- (0, node_child_process_1.execSync)(`node "${prettierPath}" --write --list-different ${regularPatterns.join(' ')}`, {
150
+ const listDifferentArg = shouldUseListDifferent()
151
+ ? '--list-different '
152
+ : '';
153
+ (0, node_child_process_1.execSync)(`node "${prettierPath}" --write ${listDifferentArg}${regularPatterns.join(' ')}`, {
150
154
  stdio: [0, 1, 2],
151
155
  windowsHide: false,
152
156
  });
153
157
  if (swcrcPatterns.length > 0) {
154
- (0, node_child_process_1.execSync)(`node "${prettierPath}" --write --list-different ${swcrcPatterns.join(' ')} --parser json`, {
158
+ (0, node_child_process_1.execSync)(`node "${prettierPath}" --write ${listDifferentArg}${swcrcPatterns.join(' ')} --parser json`, {
155
159
  stdio: [0, 1, 2],
156
160
  windowsHide: false,
157
161
  });
@@ -201,3 +205,17 @@ function getPrettierPath() {
201
205
  prettierPath = require.resolve(path.join('prettier', bin));
202
206
  return prettierPath;
203
207
  }
208
+ let useListDifferent;
209
+ /**
210
+ * Determines if --list-different should be used with --write.
211
+ * Prettier 4+ and 3.6.x with experimental CLI don't support combining these flags.
212
+ */
213
+ function shouldUseListDifferent() {
214
+ if (useListDifferent !== undefined) {
215
+ return useListDifferent;
216
+ }
217
+ const prettierMajor = (0, semver_1.major)(require('prettier').version);
218
+ const isExperimentalCli = process.env.PRETTIER_EXPERIMENTAL_CLI === '1';
219
+ useListDifferent = prettierMajor < 4 && !isExperimentalCli;
220
+ return useListDifferent;
221
+ }
@@ -613,6 +613,7 @@ async function generateChangelogForWorkspace({ tree, args, nxReleaseConfig, work
613
613
  const releaseVersion = new shared_1.ReleaseVersion({
614
614
  version: workspaceChangelogVersion,
615
615
  releaseTagPattern: nxReleaseConfig.releaseTag.pattern,
616
+ releaseGroupName: Object.keys(nxReleaseConfig.groups)[0],
616
617
  });
617
618
  if (interpolatedTreePath) {
618
619
  const prefix = dryRun ? 'Previewing' : 'Generating';
@@ -719,6 +720,7 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
719
720
  : projectsVersionData[project.name].newVersion,
720
721
  releaseTagPattern: releaseGroup.releaseTag.pattern,
721
722
  projectName: project.name,
723
+ releaseGroupName: releaseGroup.name,
722
724
  });
723
725
  if (interpolatedTreePath) {
724
726
  const prefix = dryRun ? 'Previewing' : 'Generating';
@@ -34,10 +34,12 @@ export declare class ReleaseVersion {
34
34
  isPrerelease: boolean;
35
35
  constructor({ version, // short form version string with no prefixes or patterns, e.g. 1.0.0
36
36
  releaseTagPattern, // full pattern to interpolate, e.g. "v{version}" or "{projectName}@{version}"
37
- projectName, }: {
37
+ projectName, // optional project name to interpolate into the releaseTagPattern
38
+ releaseGroupName, }: {
38
39
  version: string;
39
40
  releaseTagPattern: string;
40
41
  projectName?: string;
42
+ releaseGroupName?: string;
41
43
  });
42
44
  }
43
45
  export declare function commitChanges({ changedFiles, deletedFiles, isDryRun, isVerbose, gitCommitMessages, gitCommitArgs, }: {
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/shared.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAW7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EACL,SAAS,EAIV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,iBAAiB,EAAE;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,oBAAoB,EAAE,MAAM,CAAC;QAC7B,cAAc,EAAE,MAAM,CAAC;KACxB,EAAE,CAAC;CACL;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQrD;AAED,qBAAa,cAAc;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;gBAEV,EACV,OAAO,EAAE,qEAAqE;IAC9E,iBAAiB,EAAE,8EAA8E;IACjG,WAAW,GACZ,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CAUF;AAED,wBAAsB,aAAa,CAAC,EAClC,YA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AC;IAAC,qBAAqB,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC,CAAC,CA6C5E"}
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/shared.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAW7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EACL,SAAS,EAIV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,iBAAiB,EAAE;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,oBAAoB,EAAE,MAAM,CAAC;QAC7B,cAAc,EAAE,MAAM,CAAC;KACxB,EAAE,CAAC;CACL;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQrD;AAED,qBAAa,cAAc;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;gBAEV,EACV,OAAO,EAAE,qEAAqE;IAC9E,iBAAiB,EAAE,8EAA8E;IACjG,WAAW,EAAE,kEAAkE;IAC/E,gBAAgB,GACjB,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,WAAW,CAAC,EAAE,M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AE,EAClB,eAAe,EAAE,eAAe,GAElC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,qBAAqB,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC,CAAC,CA6C5E"}
@@ -31,6 +31,7 @@ class ReleaseVersion {
31
31
  constructor({ version, // short form version string with no prefixes or patterns, e.g. 1.0.0
32
32
  releaseTagPattern, // full pattern to interpolate, e.g. "v{version}" or "{projectName}@{version}"
33
33
  projectName, // optional project name to interpolate into the releaseTagPattern
34
+ releaseGroupName, // optional release group name to interpolate into the releaseTagPattern
34
35
  }) {
35
36
  this.rawVersion = version;
36
37
  this.gitTag = (0, utils_1.interpolate)(releaseTagPattern, {
@@ -38,6 +39,7 @@ class ReleaseVersion {
38
39
  projectName: projectName
39
40
  ? (0, git_1.sanitizeProjectNameForGitTag)(projectName)
40
41
  : projectName,
42
+ releaseGroupName,
41
43
  });
42
44
  this.isPrerelease = isPrerelease(version);
43
45
  }
@@ -79,6 +81,7 @@ function createCommitMessageValues(releaseGroups, releaseGroupToFilteredProjects
79
81
  const releaseVersion = new ReleaseVersion({
80
82
  version: projectVersionData.newVersion,
81
83
  releaseTagPattern: releaseGroup.releaseTag.pattern,
84
+ releaseGroupName: releaseGroup.name,
82
85
  });
83
86
  commitMessageValues[0] = (0, utils_1.interpolate)(commitMessageValues[0], {
84
87
  version: releaseVersion.rawVersion,
@@ -101,6 +104,7 @@ function createCommitMessageValues(releaseGroups, releaseGroupToFilteredProjects
101
104
  version: projectVersionData.newVersion,
102
105
  releaseTagPattern: releaseGroup.releaseTag.pattern,
103
106
  projectName: releaseGroupProjectNames[0],
107
+ releaseGroupName: releaseGroup.name,
104
108
  });
105
109
  commitMessageValues[0] = (0, utils_1.interpolate)(commitMessageValues[0], {
106
110
  version: releaseVersion.rawVersion,
@@ -132,6 +136,7 @@ function createCommitMessageValues(releaseGroups, releaseGroupToFilteredProjects
132
136
  version: projectVersionData.newVersion,
133
137
  releaseTagPattern: releaseGroup.releaseTag.pattern,
134
138
  projectName: project,
139
+ releaseGroupName: releaseGroup.name,
135
140
  });
136
141
  commitMessageValues.push(`- project: ${project} ${releaseVersion.rawVersion}`);
137
142
  }
@@ -144,6 +149,7 @@ function createCommitMessageValues(releaseGroups, releaseGroupToFilteredProjects
144
149
  const releaseVersion = new ReleaseVersion({
145
150
  version: projectVersionData.newVersion,
146
151
  releaseTagPattern: releaseGroup.releaseTag.pattern,
152
+ releaseGroupName: releaseGroup.name,
147
153
  });
148
154
  commitMessageValues.push(`- release-group: ${releaseGroup.name} ${releaseVersion.rawVersion}`);
149
155
  }
@@ -187,12 +193,14 @@ function createGitTagValues(releaseGroups, releaseGroupToFilteredProjects, versi
187
193
  tags.push((0, utils_1.interpolate)(releaseGroup.releaseTag.pattern, {
188
194
  version: projectVersionData.dockerVersion,
189
195
  projectName: (0, git_1.sanitizeProjectNameForGitTag)(project),
196
+ releaseGroupName: releaseGroup.name,
190
197
  }));
191
198
  }
192
199
  if (projectVersionData.newVersion) {
193
200
  tags.push((0, utils_1.interpolate)(releaseGroup.releaseTag.pattern, {
194
201
  version: projectVersionData.newVersion,
195
202
  projectName: (0, git_1.sanitizeProjectNameForGitTag)(project),
203
+ releaseGroupName: releaseGroup.name,
196
204
  }));
197
205
  }
198
206
  }
@@ -203,6 +211,7 @@ function createGitTagValues(releaseGroups, releaseGroupToFilteredProjects, versi
203
211
  ? projectVersionData.dockerVersion
204
212
  : projectVersionData.newVersion,
205
213
  projectName: (0, git_1.sanitizeProjectNameForGitTag)(project),
214
+ releaseGroupName: releaseGroup.name,
206
215
  }));
207
216
  }
208
217
  }
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"pnpm-parser.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/plugins/js/lock-file/pnpm-parser.ts"],"names":[],"mappings":"AAYA,OAAO,EAGL,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,yBAAyB,EAE1B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAEL,YAAY,EACZ,wBAAwB,EACzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAuB3E,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB;IACD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IAChD,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,CAAC,CAAC,CAAC;CACpD,CASA;AAED,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,yBAAyB,EAC9B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,CAAC,CAAC,+BAUnD;AAiXD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,YAAY,EACnB,mBAAmB,EAAE,MAAM,EAC3B,WAAW,EAAE,qBAAqB,EAClC,aAAa,EAAE,MAAM,GACpB,MAAM,CAuCR"}
1
+ {"version":3,"file":"pnpm-parser.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/plugins/js/lock-file/pnpm-parser.ts"],"names":[],"mappings":"AAYA,OAAO,EAGL,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,yBAAyB,EAE1B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAEL,YAAY,EACZ,wBAAwB,EACzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAuB3E,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB;IACD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IAChD,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,CAAC,CAAC,CAAC;CACpD,CASA;AAED,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,yBAAyB,EAC9B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,CAAC,CAAC,+BAUnD;AAmXD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,YAAY,EACnB,mBAAmB,EAAE,MAAM,EAC3B,WAAW,EAAE,qBAAqB,EAClC,aAAa,EAAE,MAAM,GACpB,MAAM,CAuCR"}
@@ -271,12 +271,14 @@ function getHoistedVersion(packageName, isV5, hoistedKeysByPackage) {
271
271
  }
272
272
  function getDependencies(data, keyMap, isV5, ctx) {
273
273
  const results = [];
274
- Object.entries(data.packages).forEach(([key, snapshot]) => {
274
+ Object.keys(data.packages).forEach((key) => {
275
+ const snapshot = data.packages[key];
275
276
  const nodes = keyMap.get(key);
276
277
  nodes.forEach((node) => {
277
278
  [snapshot.dependencies, snapshot.optionalDependencies].forEach((section) => {
278
279
  if (section) {
279
- Object.entries(section).forEach(([name, versionRange]) => {
280
+ Object.keys(section).forEach((name) => {
281
+ const versionRange = section[name];
280
282
  const version = parseBaseVersion(findVersion(versionRange, name, isV5), isV5);
281
283
  const target = ctx.externalNodes[`npm:${name}@${version}`] ||
282
284
  ctx.externalNodes[`npm:${name}`];
@@ -97,9 +97,9 @@ function addNodesAndDependencies(graph, packageJsonDeps, workspacePackages, buil
97
97
  }
98
98
  else if (workspacePackages.has(name)) {
99
99
  // Workspace Node
100
- const node = graph.nodes[name];
101
- if (node) {
102
- traverseWorkspaceNode(graph, builder, node);
100
+ const workspaceNode = workspacePackages.get(name);
101
+ if (workspaceNode) {
102
+ traverseWorkspaceNode(graph, builder, workspaceNode);
103
103
  }
104
104
  }
105
105
  });
@@ -1 +1 @@
1
- {"version":3,"file":"build-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/plugins/js/project-graph/build-dependencies/build-dependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAK5F,wBAAgB,yBAAyB,CACvC,cAAc,EAAE;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,EACD,GAAG,EAAE,yBAAyB,GAC7B,yBAAyB,EAAE,CAgD7B"}
1
+ {"version":3,"file":"build-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/plugins/js/project-graph/build-dependencies/build-dependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAK5F,wBAAgB,yBAAyB,CACvC,cAAc,EAAE;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,EACD,GAAG,EAAE,yBAAyB,GAC7B,yBAAyB,EAAE,CA8C7B"}
@@ -11,14 +11,14 @@ function buildExplicitDependencies(jsPluginConfig, ctx) {
11
11
  // TODO: TargetProjectLocator is a public API, so we can't change the shape of it
12
12
  // We should eventually let it accept Record<string, ProjectConfiguration> s.t. we
13
13
  // don't have to reshape the CreateDependenciesContext here.
14
- const nodes = Object.fromEntries(Object.entries(ctx.projects).map(([key, config]) => [
15
- key,
16
- {
14
+ const nodes = {};
15
+ Object.keys(ctx.projects).forEach((key) => {
16
+ nodes[key] = {
17
17
  name: key,
18
18
  type: null,
19
- data: config,
20
- },
21
- ]));
19
+ data: ctx.projects[key],
20
+ };
21
+ });
22
22
  const targetProjectLocator = new target_project_locator_1.TargetProjectLocator(nodes, ctx.externalNodes);
23
23
  if (jsPluginConfig.analyzeSourceFiles === undefined ||
24
24
  jsPluginConfig.analyzeSourceFiles === true) {
@@ -1 +1 @@
1
- {"version":3,"file":"explicit-package-json-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,iDAAiD,CAAC;AAIzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,wBAAgB,oCAAoC,CAClD,GAAG,EAAE,yBAAyB,EAC9B,oBAAoB,EAAE,oBAAoB,GACzC,yBAAyB,EAAE,CAkB7B"}
1
+ {"version":3,"file":"explicit-package-json-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,iDAAiD,CAAC;AAGzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,wBAAgB,oCAAoC,CAClD,GAAG,EAAE,yBAAyB,EAC9B,oBAAoB,EAAE,oBAAoB,GACzC,yBAAyB,EAAE,CAe7B"}
@@ -5,25 +5,33 @@ const project_graph_1 = require("../../../../config/project-graph");
5
5
  const file_utils_1 = require("../../../../project-graph/file-utils");
6
6
  const project_graph_builder_1 = require("../../../../project-graph/project-graph-builder");
7
7
  const json_1 = require("../../../../utils/json");
8
- const path_1 = require("../../../../utils/path");
9
8
  function buildExplicitPackageJsonDependencies(ctx, targetProjectLocator) {
10
9
  const res = [];
11
- // Build Set of valid package.json paths once for O(1) lookup
12
- // instead of O(n) find() per file
13
- const projectPackageJsonPaths = new Set(Object.values(ctx.projects).map((project) => (0, path_1.joinPathFragments)(project.root, 'package.json')));
14
- for (const source in ctx.filesToProcess.projectFileMap) {
15
- for (const f of Object.values(ctx.filesToProcess.projectFileMap[source])) {
16
- if (projectPackageJsonPaths.has(f.file)) {
10
+ const roots = {};
11
+ Object.values(ctx.projects).forEach((project) => {
12
+ roots[project.root] = true;
13
+ });
14
+ Object.keys(ctx.filesToProcess.projectFileMap).forEach((source) => {
15
+ Object.values(ctx.filesToProcess.projectFileMap[source]).forEach((f) => {
16
+ if (isPackageJsonAtProjectRoot(roots, f.file)) {
17
17
  processPackageJson(source, f.file, ctx, targetProjectLocator, res);
18
18
  }
19
- }
20
- }
19
+ });
20
+ });
21
21
  return res;
22
22
  }
23
+ function isPackageJsonAtProjectRoot(roots, fileName) {
24
+ if (!fileName.endsWith('package.json')) {
25
+ return false;
26
+ }
27
+ const filePath = fileName.slice(0, -13);
28
+ return !!roots[filePath];
29
+ }
23
30
  function processPackageJson(sourceProject, packageJsonPath, ctx, targetProjectLocator, collectedDeps) {
24
31
  try {
25
32
  const deps = readDeps((0, json_1.parseJson)((0, file_utils_1.defaultFileRead)(packageJsonPath)));
26
- for (const [packageName, packageVersion] of Object.entries(deps)) {
33
+ Object.keys(deps).forEach((packageName) => {
34
+ const packageVersion = deps[packageName];
27
35
  const localProject = targetProjectLocator.findDependencyInWorkspaceProjects(packageJsonPath, packageName, packageVersion);
28
36
  if (localProject) {
29
37
  // package.json refers to another project in the monorepo
@@ -35,11 +43,11 @@ function processPackageJson(sourceProject, packageJsonPath, ctx, targetProjectLo
35
43
  };
36
44
  (0, project_graph_builder_1.validateDependency)(dependency, ctx);
37
45
  collectedDeps.push(dependency);
38
- continue;
46
+ return;
39
47
  }
40
48
  const externalNodeName = targetProjectLocator.findNpmProjectFromImport(packageName, packageJsonPath);
41
49
  if (!externalNodeName) {
42
- continue;
50
+ return;
43
51
  }
44
52
  const dependency = {
45
53
  source: sourceProject,
@@ -49,7 +57,7 @@ function processPackageJson(sourceProject, packageJsonPath, ctx, targetProjectLo
49
57
  };
50
58
  (0, project_graph_builder_1.validateDependency)(dependency, ctx);
51
59
  collectedDeps.push(dependency);
52
- }
60
+ });
53
61
  }
54
62
  catch (e) {
55
63
  if (process.env.NX_VERBOSE_LOGGING === 'true') {
@@ -70,9 +78,9 @@ function readDeps(packageJson) {
70
78
  'dependencies',
71
79
  ];
72
80
  for (const type of depType) {
73
- for (const [depName, depVersion] of Object.entries(packageJson[type] || {})) {
74
- deps[depName] = depVersion;
75
- }
81
+ Object.keys(packageJson[type] || {}).forEach((depName) => {
82
+ deps[depName] = packageJson[type][depName];
83
+ });
76
84
  }
77
85
  return deps;
78
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/plugins/js/utils/register.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA+ClD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,IAAI,CAAC;AACpE;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,OAAE;AA6CxE,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE,eAAe,GAC/B,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAUjC;AAED,wBAAgB,mBAAmB,CACjC,eAAe,EAAE,eAAe,EAChC,aAAa,CAAC,EAAE,eAAe,EAC/B,YAAY,CAAC,EAAE,OAAO,GACrB,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAwBjC;AAiFD,wBAAgB,aAAa,CAC3B,eAAe,EAAE,eAAe,EAChC,WAAW,CAAC,EAAE,OAAO,SALc,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAiFnE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,eAAe,EAChC,WAAW,CAAC,EAAE,OAAO,GACpB,MAAM,IAAI,CAUZ;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,KAAA,GAAG,MAAM,IAAI,CAuB9D;AA+ED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CxE"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/plugins/js/utils/register.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA+ClD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,IAAI,CAAC;AACpE;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,OAAE;AA6CxE,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE,eAAe,GAC/B,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAajC;AAED,wBAAgB,mBAAmB,CACjC,eAAe,EAAE,eAAe,EAChC,aAAa,CAAC,EAAE,eAAe,EAC/B,YAAY,CAAC,EAAE,OAAO,GACrB,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAwBjC;AAiFD,wBAAgB,aAAa,CAC3B,eAAe,EAAE,eAAe,EAChC,WAAW,CAAC,EAAE,OAAO,SALc,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAiFnE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,eAAe,EAChC,WAAW,CAAC,EAAE,OAAO,GACpB,MAAM,IAAI,CAUZ;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,KAAA,GAAG,MAAM,IAAI,CAuB9D;AA+ED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CxE"}
@@ -88,7 +88,10 @@ function getSwcTranspiler(compilerOptions) {
88
88
  // These are requires to prevent it from registering when it shouldn't
89
89
  const register = require('@swc-node/register/register')
90
90
  .register;
91
- const cleanupFn = register(compilerOptions);
91
+ const cleanupFn = register({
92
+ ...compilerOptions,
93
+ baseUrl: compilerOptions.baseUrl ?? './',
94
+ });
92
95
  return typeof cleanupFn === 'function' ? cleanupFn : () => { };
93
96
  }
94
97
  function getTsNodeTranspiler(compilerOptions, tsNodeOptions, preferTsNode) {
@@ -1 +1 @@
1
- {"version":3,"file":"tui-summary-life-cycle.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/life-cycles/tui-summary-life-cycle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAa/C,wBAAgB,8BAA8B,CAAC,EAC7C,YAAY,EACZ,KAAK,EACL,SAAS,EACT,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,0BAA0B,GAC3B,EAAE;IACD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,IAAI,EAAE,CAAC;IACxB,0BAA0B,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;CACnD;eAqekC,SAAS;;EAC3C"}
1
+ {"version":3,"file":"tui-summary-life-cycle.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/life-cycles/tui-summary-life-cycle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAa/C,wBAAgB,8BAA8B,CAAC,EAC7C,YAAY,EACZ,KAAK,EACL,SAAS,EACT,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,0BAA0B,GAC3B,EAAE;IACD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,IAAI,EAAE,CAAC;IACxB,0BAA0B,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;CACnD;eAyekC,SAAS;;EAC3C"}
@@ -42,8 +42,10 @@ function getTuiTerminalSummaryLifeCycle({ projectNames, tasks, taskGraph, args,
42
42
  lifeCycle.printTaskTerminalOutput = (task, taskStatus, output) => {
43
43
  tasksToTaskStatus[task.id] = taskStatus;
44
44
  // Store the complete output for display in the summary
45
- // This is called with the full output for cached and executed tasks
46
- if (output) {
45
+ // This is called with the full output for cached tasks. For non-cached tasks,
46
+ // the output doesn't include the portion of the output that prints the command that was being ran.
47
+ if (output &&
48
+ !['failure', 'success'].includes(taskStatus)) {
47
49
  tasksToTerminalOutputs[task.id] = output;
48
50
  }
49
51
  };
@@ -51,7 +51,7 @@ async function getTerminalOutputLifeCycle(initiatingProject, initiatingTasks, pr
51
51
  delete overridesWithoutHidden['__overrides_unparsed__'];
52
52
  const isRunOne = initiatingProject != null;
53
53
  if (tasks.length === 1) {
54
- process.env.NX_TUI = 'false';
54
+ process.env.NX_TUI ??= 'false';
55
55
  }
56
56
  if ((0, is_tui_enabled_1.isTuiEnabled)()) {
57
57
  const interceptedNxCloudLogs = [];