@nx/js 20.0.0-beta.7 → 20.0.0-beta.8

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/js",
3
- "version": "20.0.0-beta.7",
3
+ "version": "20.0.0-beta.8",
4
4
  "private": false,
5
5
  "description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ",
6
6
  "repository": {
@@ -39,8 +39,8 @@
39
39
  "@babel/preset-env": "^7.23.2",
40
40
  "@babel/preset-typescript": "^7.22.5",
41
41
  "@babel/runtime": "^7.22.6",
42
- "@nx/devkit": "20.0.0-beta.7",
43
- "@nx/workspace": "20.0.0-beta.7",
42
+ "@nx/devkit": "20.0.0-beta.8",
43
+ "@nx/workspace": "20.0.0-beta.8",
44
44
  "@zkochan/js-yaml": "0.0.7",
45
45
  "babel-plugin-const-enum": "^1.0.1",
46
46
  "babel-plugin-macros": "^2.8.0",
@@ -49,7 +49,8 @@ Valid values are: ${version_1.validReleaseVersionPrefixes
49
49
  const updateDependentsBump = 'patch';
50
50
  // Sort the projects topologically if update dependents is enabled
51
51
  // TODO: maybe move this sorting to the command level?
52
- const projects = updateDependents === 'never'
52
+ const projects = updateDependents === 'never' ||
53
+ options.releaseGroup.projectsRelationship !== 'independent'
53
54
  ? options.projects
54
55
  : (0, sort_projects_topologically_1.sortProjectsTopologically)(options.projectGraph, options.projects);
55
56
  const projectToDependencyBumps = new Map();
@@ -270,6 +271,7 @@ To fix this you will either need to add a package.json file at that location, or
270
271
  specifier = await (0, resolve_semver_specifier_1.resolveSemverSpecifierFromConventionalCommits)(previousVersionRef, options.projectGraph, affectedProjects, options.conventionalCommitsConfig);
271
272
  if (!specifier) {
272
273
  if (updateDependents !== 'never' &&
274
+ options.releaseGroup.projectsRelationship === 'independent' &&
273
275
  projectToDependencyBumps.has(projectName)) {
274
276
  // No applicable changes to the project directly by the user, but one or more dependencies have been bumped and updateDependents is enabled
275
277
  specifier = updateDependentsBump;
@@ -352,6 +354,7 @@ To fix this you will either need to add a package.json file at that location, or
352
354
  }
353
355
  if (!specifier) {
354
356
  if (updateDependents !== 'never' &&
357
+ options.releaseGroup.projectsRelationship === 'independent' &&
355
358
  projectToDependencyBumps.has(projectName)) {
356
359
  // No applicable changes to the project directly by the user, but one or more dependencies have been bumped and updateDependents is enabled
357
360
  specifier = updateDependentsBump;
@@ -395,7 +398,8 @@ To fix this you will either need to add a package.json file at that location, or
395
398
  .filter((localPackageDependency) => {
396
399
  return localPackageDependency.target === project.name;
397
400
  });
398
- const includeTransitiveDependents = updateDependents !== 'never';
401
+ const includeTransitiveDependents = updateDependents !== 'never' &&
402
+ options.releaseGroup.projectsRelationship === 'independent';
399
403
  const transitiveLocalPackageDependents = [];
400
404
  if (includeTransitiveDependents) {
401
405
  for (const directDependent of allDependentProjects) {
@@ -435,7 +439,8 @@ To fix this you will either need to add a package.json file at that location, or
435
439
  }
436
440
  }
437
441
  // If not always updating dependents (when they don't already appear in the batch itself), print a warning to the user about what is being skipped and how to change it
438
- if (updateDependents === 'never') {
442
+ if (updateDependents === 'never' ||
443
+ options.releaseGroup.projectsRelationship !== 'independent') {
439
444
  if (dependentProjectsOutsideCurrentBatch.length > 0) {
440
445
  let logMsg = `⚠️ Warning, the following packages depend on "${project.name}"`;
441
446
  const reason = options.specifierSource === 'version-plans'
@@ -463,7 +468,8 @@ To fix this you will either need to add a package.json file at that location, or
463
468
  versionData[projectName] = {
464
469
  currentVersion,
465
470
  newVersion: null, // will stay as null in the final result in the case that no changes are detected
466
- dependentProjects: updateDependents === 'auto'
471
+ dependentProjects: updateDependents === 'auto' &&
472
+ options.releaseGroup.projectsRelationship === 'independent'
467
473
  ? allDependentProjects
468
474
  : dependentProjectsInCurrentBatch,
469
475
  };
@@ -483,7 +489,8 @@ To fix this you will either need to add a package.json file at that location, or
483
489
  });
484
490
  logger.buffer(`✍️ New version ${newVersion} written to ${packageJsonPath}`);
485
491
  if (allDependentProjects.length > 0) {
486
- const totalProjectsToUpdate = updateDependents === 'auto'
492
+ const totalProjectsToUpdate = updateDependents === 'auto' &&
493
+ options.releaseGroup.projectsRelationship === 'independent'
487
494
  ? allDependentProjects.length +
488
495
  transitiveLocalPackageDependents.length -
489
496
  // There are two entries per circular dep
@@ -568,7 +575,8 @@ To fix this you will either need to add a package.json file at that location, or
568
575
  forceVersionBump: false,
569
576
  });
570
577
  }
571
- if (updateDependents === 'auto') {
578
+ if (updateDependents === 'auto' &&
579
+ options.releaseGroup.projectsRelationship === 'independent') {
572
580
  for (const dependentProject of dependentProjectsOutsideCurrentBatch) {
573
581
  if (options.specifierSource === 'version-plans' &&
574
582
  !projectToDependencyBumps.has(dependentProject.source)) {