@unisphere/nx 4.12.6 → 4.13.0

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.
@@ -0,0 +1,94 @@
1
+ diff --git a/node_modules/@changesets/cli/dist/changesets-cli.cjs.js b/node_modules/@changesets/cli/dist/changesets-cli.cjs.js
2
+ index 53fc925..ca3c8ad 100644
3
+ --- a/node_modules/@changesets/cli/dist/changesets-cli.cjs.js
4
+ +++ b/node_modules/@changesets/cli/dist/changesets-cli.cjs.js
5
+ @@ -272,9 +272,19 @@ async function getPackagesToRelease(changedPackages, allPackages) {
6
+ });
7
+ }
8
+ if (allPackages.length > 1) {
9
+ + // Exclude local packages and local applications entirely — they live under
10
+ + // packages/local or applications/local (or use the @local/ scope), are
11
+ + // bundled into the runtimes at build time, and must never be shown for
12
+ + // selection or get their own version bump.
13
+ + const pkgDirByName = new Map(allPackages.map(p => [p.packageJson.name, (p.dir || '').replace(/\\/g, '/')]));
14
+ + const isLocalPackage = pkgName => {
15
+ + const dir = pkgDirByName.get(pkgName) || '';
16
+ + return pkgName.startsWith('@local/') || dir.includes('/packages/local/') || dir.includes('/applications/local/');
17
+ + };
18
+ + changedPackages = changedPackages.filter(name => !isLocalPackage(name));
19
+ const unchangedPackagesNames = allPackages.map(({
20
+ packageJson
21
+ - }) => packageJson.name).filter(name => !changedPackages.includes(name));
22
+ + }) => packageJson.name).filter(name => !changedPackages.includes(name) && !isLocalPackage(name));
23
+ const defaultChoiceList = [{
24
+ name: "changed packages",
25
+ choices: changedPackages
26
+ @@ -310,9 +320,10 @@ async function createChangeset(changedPackages, allPackages) {
27
+ const packagesToRelease = await getPackagesToRelease(changedPackages, allPackages);
28
+ let pkgJsonsByName = getPkgJsonsByName(allPackages);
29
+ let pkgsLeftToGetBumpTypeFor = new Set(packagesToRelease);
30
+ - let pkgsThatShouldBeMajorBumped = (await askCheckboxPlus(bold(`Which packages should have a ${red("major")} bump?`), [{
31
+ + let nonRuntimePackages = packagesToRelease.filter(pkgName => !pkgName.includes('unisphere-runtime-'));
32
+ + let pkgsThatShouldBeMajorBumped = nonRuntimePackages.length > 0 ? (await askCheckboxPlus(bold(`Which packages should have a ${red("major")} bump?`), [{
33
+ name: "all packages",
34
+ - choices: packagesToRelease.map(pkgName => {
35
+ + choices: nonRuntimePackages.map(pkgName => {
36
+ return {
37
+ name: pkgName,
38
+ message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
39
+ @@ -325,7 +336,7 @@ async function createChangeset(changedPackages, allPackages) {
40
+ return x.filter(x => x !== "all packages").map(x => cyan(x)).join(", ");
41
+ }
42
+ return x;
43
+ - })).filter(x => x !== "all packages");
44
+ + })).filter(x => x !== "all packages") : [];
45
+ for (const pkgName of pkgsThatShouldBeMajorBumped) {
46
+ // for packages that are under v1, we want to make sure major releases are intended,
47
+ // as some repo-wide sweeping changes have mistakenly release first majors
48
+ diff --git a/node_modules/@changesets/cli/dist/changesets-cli.esm.js b/node_modules/@changesets/cli/dist/changesets-cli.esm.js
49
+ index 6c363c0..f18a637 100644
50
+ --- a/node_modules/@changesets/cli/dist/changesets-cli.esm.js
51
+ +++ b/node_modules/@changesets/cli/dist/changesets-cli.esm.js
52
+ @@ -234,9 +234,19 @@ async function getPackagesToRelease(changedPackages, allPackages) {
53
+ });
54
+ }
55
+ if (allPackages.length > 1) {
56
+ + // Exclude local packages and local applications entirely — they live under
57
+ + // packages/local or applications/local (or use the @local/ scope), are
58
+ + // bundled into the runtimes at build time, and must never be shown for
59
+ + // selection or get their own version bump.
60
+ + const pkgDirByName = new Map(allPackages.map(p => [p.packageJson.name, (p.dir || '').replace(/\\/g, '/')]));
61
+ + const isLocalPackage = pkgName => {
62
+ + const dir = pkgDirByName.get(pkgName) || '';
63
+ + return pkgName.startsWith('@local/') || dir.includes('/packages/local/') || dir.includes('/applications/local/');
64
+ + };
65
+ + changedPackages = changedPackages.filter(name => !isLocalPackage(name));
66
+ const unchangedPackagesNames = allPackages.map(({
67
+ packageJson
68
+ - }) => packageJson.name).filter(name => !changedPackages.includes(name));
69
+ + }) => packageJson.name).filter(name => !changedPackages.includes(name) && !isLocalPackage(name));
70
+ const defaultChoiceList = [{
71
+ name: "changed packages",
72
+ choices: changedPackages
73
+ @@ -272,9 +282,10 @@ async function createChangeset(changedPackages, allPackages) {
74
+ const packagesToRelease = await getPackagesToRelease(changedPackages, allPackages);
75
+ let pkgJsonsByName = getPkgJsonsByName(allPackages);
76
+ let pkgsLeftToGetBumpTypeFor = new Set(packagesToRelease);
77
+ - let pkgsThatShouldBeMajorBumped = (await askCheckboxPlus(bold(`Which packages should have a ${red("major")} bump?`), [{
78
+ + let nonRuntimePackages = packagesToRelease.filter(pkgName => !pkgName.includes('unisphere-runtime-'));
79
+ + let pkgsThatShouldBeMajorBumped = nonRuntimePackages.length > 0 ? (await askCheckboxPlus(bold(`Which packages should have a ${red("major")} bump?`), [{
80
+ name: "all packages",
81
+ - choices: packagesToRelease.map(pkgName => {
82
+ + choices: nonRuntimePackages.map(pkgName => {
83
+ return {
84
+ name: pkgName,
85
+ message: formatPkgNameAndVersion(pkgName, pkgJsonsByName.get(pkgName).version)
86
+ @@ -287,7 +298,7 @@ async function createChangeset(changedPackages, allPackages) {
87
+ return x.filter(x => x !== "all packages").map(x => cyan(x)).join(", ");
88
+ }
89
+ return x;
90
+ - })).filter(x => x !== "all packages");
91
+ + })).filter(x => x !== "all packages") : [];
92
+ for (const pkgName of pkgsThatShouldBeMajorBumped) {
93
+ // for packages that are under v1, we want to make sure major releases are intended,
94
+ // as some repo-wide sweeping changes have mistakenly release first majors
@@ -0,0 +1,18 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * Migration: Update @changesets/cli patch to also exclude local packages and
4
+ * local applications from the changeset flow.
5
+ *
6
+ * The previous patch (shipped in 3.0.0) only filtered `unisphere-runtime-*`
7
+ * packages out of the MAJOR bump prompt. This updated patch additionally
8
+ * excludes local packages and local applications (anything under
9
+ * `packages/local` / `applications/local`, or using the `@local/` scope) from
10
+ * `getPackagesToRelease` — so they never appear in the "Which packages would
11
+ * you like to include?" prompt and never get their own version bump. Runtimes
12
+ * keep their existing behavior (dropped from the major prompt only).
13
+ *
14
+ * Replaces any existing @changesets/cli patch in the consuming project's
15
+ * `patches/` directory with the updated one bundled alongside this migration.
16
+ */
17
+ export default function update(tree: Tree): Promise<void>;
18
+ //# sourceMappingURL=update-changeset-patch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-changeset-patch.d.ts","sourceRoot":"","sources":["../../../src/migrations/4-13-0/update-changeset-patch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAyB,MAAM,YAAY,CAAC;AAGzD;;;;;;;;;;;;;;GAcG;AACH,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA8B9D"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const path_1 = require("path");
6
+ /**
7
+ * Migration: Update @changesets/cli patch to also exclude local packages and
8
+ * local applications from the changeset flow.
9
+ *
10
+ * The previous patch (shipped in 3.0.0) only filtered `unisphere-runtime-*`
11
+ * packages out of the MAJOR bump prompt. This updated patch additionally
12
+ * excludes local packages and local applications (anything under
13
+ * `packages/local` / `applications/local`, or using the `@local/` scope) from
14
+ * `getPackagesToRelease` — so they never appear in the "Which packages would
15
+ * you like to include?" prompt and never get their own version bump. Runtimes
16
+ * keep their existing behavior (dropped from the major prompt only).
17
+ *
18
+ * Replaces any existing @changesets/cli patch in the consuming project's
19
+ * `patches/` directory with the updated one bundled alongside this migration.
20
+ */
21
+ async function update(tree) {
22
+ devkit_1.logger.info('🔄 Updating @changesets/cli patch');
23
+ try {
24
+ const patchesPath = 'patches';
25
+ const patchesTemplatePath = (0, path_1.join)(__dirname, 'patches');
26
+ const patchFileName = '@changesets+cli+2.29.7.patch';
27
+ // Delete existing changeset patch if it exists
28
+ if (tree.exists(patchesPath)) {
29
+ const existingFiles = tree.children(patchesPath);
30
+ for (const file of existingFiles) {
31
+ if (file.includes('@changesets+cli')) {
32
+ devkit_1.logger.info(`🗑️ Removing existing patch: ${file}`);
33
+ tree.delete((0, path_1.join)(patchesPath, file));
34
+ }
35
+ }
36
+ }
37
+ // Copy the updated patch file
38
+ (0, devkit_1.generateFiles)(tree, patchesTemplatePath, `./${patchesPath}`, {});
39
+ devkit_1.logger.info(`✅ Updated patch: ${patchFileName}`);
40
+ devkit_1.logger.info('ℹ️ This patch hides local packages and local applications from the changeset prompt, and keeps unisphere-runtime-* packages out of the major bump selection');
41
+ }
42
+ catch (error) {
43
+ devkit_1.logger.error(`❌ Failed to update patch: ${error?.message || 'Unknown error'}`);
44
+ throw error;
45
+ }
46
+ }
package/migrations.json CHANGED
@@ -522,6 +522,14 @@
522
522
  "cli": {
523
523
  "postUpdateMessage": "✅ Security Audit step commented out in .github/workflows/cicd.yml"
524
524
  }
525
+ },
526
+ "4.13.0-update-changeset-patch": {
527
+ "version": "4.13.0",
528
+ "description": "Updates @changesets/cli patch to also hide local packages and local applications from the changeset prompt (runtimes stay out of the major bump selection)",
529
+ "factory": "./dist/migrations/4-13-0/update-changeset-patch.js",
530
+ "cli": {
531
+ "postUpdateMessage": "✅ @changesets/cli patch updated"
532
+ }
525
533
  }
526
534
  },
527
535
  "packageJsonUpdates": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/nx",
3
- "version": "4.12.6",
3
+ "version": "4.13.0",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",