@unisphere/nx 3.11.1 → 3.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.
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Migration: Sync package-lock.json
3
3
  *
4
- * Runs npm install after all migrations are complete to ensure
5
- * the lockfile is in sync with any package reorganization changes.
4
+ * Previously ran npm install after all migrations. Now just logs
5
+ * instructions for the user to clean up after migrations complete.
6
6
  * This must be the last migration in the 3.0.0 sequence.
7
7
  */
8
8
  import { Tree } from '@nx/devkit';
9
- export default function update(tree: Tree): Promise<() => void>;
9
+ export default function update(tree: Tree): Promise<void>;
10
10
  //# sourceMappingURL=sync-package-lock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sync-package-lock.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-0-0/sync-package-lock.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAG1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAYpE"}
1
+ {"version":3,"file":"sync-package-lock.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-0-0/sync-package-lock.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAE1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAO9D"}
@@ -2,25 +2,18 @@
2
2
  /**
3
3
  * Migration: Sync package-lock.json
4
4
  *
5
- * Runs npm install after all migrations are complete to ensure
6
- * the lockfile is in sync with any package reorganization changes.
5
+ * Previously ran npm install after all migrations. Now just logs
6
+ * instructions for the user to clean up after migrations complete.
7
7
  * This must be the last migration in the 3.0.0 sequence.
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.default = update;
11
11
  const devkit_1 = require("@nx/devkit");
12
- const child_process_1 = require("child_process");
13
12
  async function update(tree) {
14
- return () => {
15
- devkit_1.logger.info('');
16
- devkit_1.logger.info('Syncing package-lock.json...');
17
- try {
18
- (0, child_process_1.execSync)('npm install', { stdio: 'inherit' });
19
- devkit_1.logger.info('package-lock.json synced successfully');
20
- }
21
- catch (error) {
22
- devkit_1.logger.error(`Failed to sync package-lock.json: ${error}`);
23
- throw error;
24
- }
25
- };
13
+ devkit_1.logger.info('');
14
+ devkit_1.logger.info('⚠️ After all migrations complete, run the following commands:');
15
+ devkit_1.logger.info(' rm -rf node_modules');
16
+ devkit_1.logger.info(' npm run reset');
17
+ devkit_1.logger.info(' npm ci');
18
+ devkit_1.logger.info(' npm run check');
26
19
  }
@@ -19,8 +19,8 @@ import { Tree } from '@nx/devkit';
19
19
  * This automatically excludes unisphere/applications/documentation/** without
20
20
  * needing a negation pattern.
21
21
  *
22
- * After updating workspaces, runs npm install to sync package-lock.json.
23
- * Note: Nx migrations don't execute callbacks, so we flush changes and run npm install directly.
22
+ * After all migrations complete, the user should run:
23
+ * rm -rf node_modules && npm run reset && npm ci && npm run check
24
24
  */
25
25
  export default function update(tree: Tree): Promise<string[]>;
26
26
  //# sourceMappingURL=fix-workspaces-pattern.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fix-workspaces-pattern.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-1-0/fix-workspaces-pattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAA+B,MAAM,YAAY,CAAC;AAI/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA+ElE"}
1
+ {"version":3,"file":"fix-workspaces-pattern.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-1-0/fix-workspaces-pattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAA+B,MAAM,YAAY,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAuElE"}
@@ -2,8 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = update;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const tree_1 = require("nx/src/generators/tree");
6
- const child_process_1 = require("child_process");
7
5
  /**
8
6
  * Migration: Fix npm workspaces pattern to use explicit includes
9
7
  *
@@ -24,8 +22,8 @@ const child_process_1 = require("child_process");
24
22
  * This automatically excludes unisphere/applications/documentation/** without
25
23
  * needing a negation pattern.
26
24
  *
27
- * After updating workspaces, runs npm install to sync package-lock.json.
28
- * Note: Nx migrations don't execute callbacks, so we flush changes and run npm install directly.
25
+ * After all migrations complete, the user should run:
26
+ * rm -rf node_modules && npm run reset && npm ci && npm run check
29
27
  */
30
28
  async function update(tree) {
31
29
  devkit_1.logger.info('🔄 Fixing npm workspaces pattern to use explicit includes');
@@ -74,19 +72,11 @@ async function update(tree) {
74
72
  devkit_1.logger.info(` ${JSON.stringify(newWorkspaces)}`);
75
73
  devkit_1.logger.info('');
76
74
  devkit_1.logger.info('This allows documentation apps (like Docusaurus) to have their own node_modules.');
77
- // Flush tree changes to disk before running npm install
78
- // Note: Nx doesn't execute callbacks from migrations, so we must flush and run directly
79
- const changes = tree.listChanges();
80
- (0, tree_1.flushChanges)(tree.root, changes);
81
75
  devkit_1.logger.info('');
82
- devkit_1.logger.info('Syncing package-lock.json after workspaces update...');
83
- try {
84
- (0, child_process_1.execSync)('npm install', { stdio: 'inherit', cwd: tree.root });
85
- devkit_1.logger.info(' package-lock.json synced successfully');
86
- }
87
- catch (error) {
88
- devkit_1.logger.error(`Failed to sync package-lock.json: ${error}`);
89
- devkit_1.logger.warn('⚠️ Please run "npm install" manually to sync package-lock.json');
90
- }
76
+ devkit_1.logger.info('⚠️ After all migrations complete, run the following commands:');
77
+ devkit_1.logger.info(' rm -rf node_modules');
78
+ devkit_1.logger.info(' npm run reset');
79
+ devkit_1.logger.info(' npm ci');
80
+ devkit_1.logger.info(' npm run check');
91
81
  return [];
92
82
  }
package/migrations.json CHANGED
@@ -529,7 +529,7 @@
529
529
  "postUpdateMessage": "🎉 Migration to @unisphere/nx 3.7.0 completed successfully!\n\n⚠️ Breaking change: The types package can no longer have React dependencies.\nLearn more: https://unisphere.kaltura.com/docs/create/packages/overview#the-types-package",
530
530
  "packages": {
531
531
  "@unisphere/cli": {
532
- "version": "3.0.2",
532
+ "version": "3.0.3",
533
533
  "alwaysAddToPackageJson": false
534
534
  }
535
535
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/nx",
3
- "version": "3.11.1",
3
+ "version": "3.13.0",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",