@unisphere/nx 1.8.0 → 1.10.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,15 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * Unisphere Migrate Generator
4
+ *
5
+ * This generator runs all migrations manually from migrations.json.
6
+ * Use this to force-run migrations locally or when nx migrate isn't detecting them.
7
+ *
8
+ * Usage:
9
+ * npx nx g @unisphere/nx:unisphere-migrate
10
+ *
11
+ * Or with local path:
12
+ * npx nx g /path/to/packages/nx:unisphere-migrate
13
+ */
14
+ export default function unisphereManualMigrate(tree: Tree): Promise<void>;
15
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/generators/unisphere-migrate/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAuB,MAAM,YAAY,CAAC;AAIvD;;;;;;;;;;;GAWG;AACH,wBAA8B,sBAAsB,CAAC,IAAI,EAAE,IAAI,iBAiH9D"}
@@ -1,27 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = testMigrationLocally;
3
+ exports.default = unisphereManualMigrate;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const fs_1 = require("fs");
6
6
  const path_1 = require("path");
7
7
  /**
8
- * Test Migration Locally Generator
8
+ * Unisphere Migrate Generator
9
9
  *
10
- * This generator mimics the full `nx migrate` flow for local testing.
11
- * It reads migrations.json and executes everything in the correct order,
12
- * including showing post-upgrade messages.
10
+ * This generator runs all migrations manually from migrations.json.
11
+ * Use this to force-run migrations locally or when nx migrate isn't detecting them.
13
12
  *
14
13
  * Usage:
15
- * npx nx g @unisphere/nx:test-migration-locally
14
+ * npx nx g @unisphere/nx:unisphere-migrate
16
15
  *
17
16
  * Or with local path:
18
- * npx nx g ./packages/nx:test-migration-locally
17
+ * npx nx g /path/to/packages/nx:unisphere-migrate
19
18
  */
20
- async function testMigrationLocally(tree) {
19
+ async function unisphereManualMigrate(tree) {
21
20
  devkit_1.logger.info('');
22
- devkit_1.logger.info('🧪 TESTING MIGRATIONS LOCALLY');
21
+ devkit_1.logger.info('🔄 RUNNING UNISPHERE MIGRATIONS MANUALLY');
23
22
  devkit_1.logger.info('='.repeat(70));
24
- devkit_1.logger.info('This simulates the full `nx migrate` flow for testing purposes.');
23
+ devkit_1.logger.info('This runs all migrations from migrations.json.');
25
24
  devkit_1.logger.info('='.repeat(70));
26
25
  devkit_1.logger.info('');
27
26
  try {
@@ -29,7 +28,7 @@ async function testMigrationLocally(tree) {
29
28
  const migrationsJsonPath = (0, path_1.join)(__dirname, '../../../migrations.json');
30
29
  const migrationsJson = JSON.parse((0, fs_1.readFileSync)(migrationsJsonPath, 'utf-8'));
31
30
  const migrations = migrationsJson.migrations;
32
- const packageUpdates = migrationsJson.packageJsonUpdates?.['1.1.5'];
31
+ const packageUpdates = migrationsJson.packageJsonUpdates?.['1.9.0'];
33
32
  // Show what will be run
34
33
  devkit_1.logger.info(`📋 Migrations to run: ${Object.keys(migrations).length}`);
35
34
  Object.entries(migrations).forEach(([name, config]) => {
@@ -50,11 +49,13 @@ async function testMigrationLocally(tree) {
50
49
  try {
51
50
  // Construct the migration path
52
51
  const migrationPath = migrationConfig.implementation
53
- .replace('./dist/migrations/', '../../migrations/')
54
- .replace(/\.js$/, '');
52
+ .replace('./dist/migrations/', '../../migrations/');
55
53
  // Import and run the migration
56
- const migrationModule = await import(migrationPath);
57
- const migrationFn = migrationModule.default;
54
+ // Using eval to bypass TypeScript restrictions on require in ESM
55
+ const absolutePath = (0, path_1.join)(__dirname, migrationPath);
56
+ const requireFn = eval('require');
57
+ const migrationModule = requireFn(absolutePath);
58
+ const migrationFn = migrationModule.default || migrationModule;
58
59
  if (typeof migrationFn !== 'function') {
59
60
  throw new Error(`Migration ${migrationName} does not export a default function`);
60
61
  }
@@ -0,0 +1,15 @@
1
+ ## Run Unisphere migrations manually
2
+
3
+ From the consumer project root:
4
+
5
+ ```bash
6
+ npx nx g @unisphere/nx:unisphere-migrate
7
+ ```
8
+
9
+ Or using the local path:
10
+
11
+ ```bash
12
+ npx nx g /path/to/unisphere-nx-workspace-plugin/packages/nx:unisphere-migrate
13
+ ```
14
+
15
+ This will run ALL migrations defined in migrations.json manually.
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "UnisphereMigrate",
5
+ "title": "Unisphere Manual Migrate",
6
+ "description": "Manually run all Unisphere migrations from migrations.json",
7
+ "type": "object",
8
+ "properties": {},
9
+ "required": []
10
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "migrations": {
3
3
  "check-nx-version": {
4
- "version": "1.6.0",
4
+ "version": "1.9.0",
5
5
  "description": "Checks that Nx version is 22 or higher",
6
6
  "implementation": "./dist/migrations/update-1-1-5/check-nx-version.js",
7
7
  "cli": {
@@ -9,32 +9,27 @@
9
9
  }
10
10
  },
11
11
  "rename-widgetname-to-widgetname": {
12
- "version": "1.6.0",
12
+ "version": "1.9.0",
13
13
  "description": "Changes the executor name from WidgetName to widgetName",
14
14
  "implementation": "./dist/migrations/update-1-1-5/rename-widgetname-to-widgetname.js"
15
15
  },
16
16
  "fix-playground-apps": {
17
- "version": "1.6.0",
17
+ "version": "1.9.0",
18
18
  "description": "Fixes playground apps",
19
19
  "implementation": "./dist/migrations/update-1-1-5/fix-playground-apps.js"
20
20
  },
21
21
  "move-runtime-info-to-core": {
22
- "version": "1.6.0",
22
+ "version": "1.9.0",
23
23
  "description": "Moves runtime-information.ts and runtime-settings.ts to core package",
24
24
  "implementation": "./dist/migrations/update-1-1-5/move-runtime-info-to-core.js"
25
25
  },
26
- "update-npmrc": {
27
- "version": "1.6.0",
28
- "description": "Set legacy-peer-deps=false in .npmrc files",
29
- "implementation": "./dist/migrations/update-1-1-5/update-npmrc.js"
30
- },
31
26
  "sync-package-json-files": {
32
- "version": "1.6.0",
27
+ "version": "1.9.0",
33
28
  "description": "Syncs package json files",
34
29
  "implementation": "./dist/migrations/update-1-1-5/sync-package-json-files.js"
35
30
  },
36
31
  "update-nvmrc": {
37
- "version": "1.6.0",
32
+ "version": "1.9.0",
38
33
  "description": "Updates .nvmrc to Node 24 (creates if missing)",
39
34
  "implementation": "./dist/migrations/update-1-1-5/update-nvmrc.js",
40
35
  "cli": {
@@ -42,7 +37,7 @@
42
37
  }
43
38
  },
44
39
  "fix-dependency-versions": {
45
- "version": "1.6.0",
40
+ "version": "1.9.0",
46
41
  "description": "Removes ^ from @changesets/cli version in package.json",
47
42
  "implementation": "./dist/migrations/update-1-1-5/fix-dependency-versions.js",
48
43
  "cli": {
@@ -50,7 +45,7 @@
50
45
  }
51
46
  },
52
47
  "update-github-workflow": {
53
- "version": "1.6.0",
48
+ "version": "1.9.0",
54
49
  "description": "Updates .github/workflows/cicd.yml from template",
55
50
  "implementation": "./dist/migrations/update-1-1-5/update-github-workflow.js",
56
51
  "cli": {
@@ -59,11 +54,19 @@
59
54
  }
60
55
  },
61
56
  "packageJsonUpdates": {
62
- "1.6.0": {
63
- "version": "1.6.0",
57
+ "1.9.0": {
58
+ "version": "1.9.0",
64
59
  "cli": "nx",
65
- "postUpdateMessage": "\n🎉 Migration to @unisphere/nx 1.1.5 completed successfully!\n\n📋 Summary of changes:\n • Upgraded to Nx 22\n • Updated Node.js to version 24 (.nvmrc)\n • Pinned @changesets/cli to exact version\n • Updated GitHub workflow to use Node 24\n • Updated all @unisphere and @kaltura packages\n • Upgraded to React 19\n\n⚠️ Important next steps:\n 1. Install dependencies: npm install\n 2. Ensure you have Node.js 24.x installed (check with: node --version)\n 3. Review and test your application\n 4. Commit the changes\n\nFor more information, visit: https://github.com/your-org/unisphere\n",
60
+ "postUpdateMessage": "\n🎉 Migration to @unisphere/nx 1.9.0 completed successfully!\n\n📋 Summary of changes:\n • Upgraded to Nx 22\n • Upgraded MUI to v7\n • Updated Node.js to version 24 (.nvmrc)\n • Updated all @unisphere and @kaltura packages\n • Upgraded to React 19\n\n⚠️ Important next steps:\n 1. Install dependencies: npm install\n 2. Ensure you have Node.js 24.x installed (check with: node --version)\n 3. Review and test your application\n 4. Commit the changes\n\nFor more information, visit: https://github.com/your-org/unisphere\n",
66
61
  "packages": {
62
+ "@mui/material": {
63
+ "version": "^7.3.1",
64
+ "alwaysAddToPackageJson": false
65
+ },
66
+ "@mui/icons-material": {
67
+ "version": "^7.3.1",
68
+ "alwaysAddToPackageJson": false
69
+ },
67
70
  "@kaltura/ds-react-bits": {
68
71
  "version": "latest",
69
72
  "alwaysAddToPackageJson": false
package/generators.json CHANGED
@@ -25,11 +25,11 @@
25
25
  "schema": "./dist/generators/migrate-to-1-1-5/schema.json",
26
26
  "description": "Migrates your project to @unisphere/nx v1.1.5 with package updates, WidgetName renaming, and React 19 preparation"
27
27
  },
28
- "test-migration-locally": {
29
- "factory": "./dist/generators/test-migration-locally/generator",
30
- "schema": "./dist/generators/test-migration-locally/schema.json",
31
- "description": "Test migrations locally (mimics nx migrate flow with post-upgrade messages)",
32
- "hidden": true
28
+ "unisphere-migrate": {
29
+ "factory": "./dist/generators/unisphere-migrate/generator",
30
+ "schema": "./dist/generators/unisphere-migrate/schema.json",
31
+ "description": "Manually run all Unisphere migrations from migrations.json",
32
+ "hidden": false
33
33
  }
34
34
  }
35
35
  }
package/migrations.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "migrations": {
3
3
  "check-nx-version": {
4
- "version": "1.6.0",
4
+ "version": "1.9.0",
5
5
  "description": "Checks that Nx version is 22 or higher",
6
6
  "implementation": "./dist/migrations/update-1-1-5/check-nx-version.js",
7
7
  "cli": {
@@ -9,32 +9,27 @@
9
9
  }
10
10
  },
11
11
  "rename-widgetname-to-widgetname": {
12
- "version": "1.6.0",
12
+ "version": "1.9.0",
13
13
  "description": "Changes the executor name from WidgetName to widgetName",
14
14
  "implementation": "./dist/migrations/update-1-1-5/rename-widgetname-to-widgetname.js"
15
15
  },
16
16
  "fix-playground-apps": {
17
- "version": "1.6.0",
17
+ "version": "1.9.0",
18
18
  "description": "Fixes playground apps",
19
19
  "implementation": "./dist/migrations/update-1-1-5/fix-playground-apps.js"
20
20
  },
21
21
  "move-runtime-info-to-core": {
22
- "version": "1.6.0",
22
+ "version": "1.9.0",
23
23
  "description": "Moves runtime-information.ts and runtime-settings.ts to core package",
24
24
  "implementation": "./dist/migrations/update-1-1-5/move-runtime-info-to-core.js"
25
25
  },
26
- "update-npmrc": {
27
- "version": "1.6.0",
28
- "description": "Set legacy-peer-deps=false in .npmrc files",
29
- "implementation": "./dist/migrations/update-1-1-5/update-npmrc.js"
30
- },
31
26
  "sync-package-json-files": {
32
- "version": "1.6.0",
27
+ "version": "1.9.0",
33
28
  "description": "Syncs package json files",
34
29
  "implementation": "./dist/migrations/update-1-1-5/sync-package-json-files.js"
35
30
  },
36
31
  "update-nvmrc": {
37
- "version": "1.6.0",
32
+ "version": "1.9.0",
38
33
  "description": "Updates .nvmrc to Node 24 (creates if missing)",
39
34
  "implementation": "./dist/migrations/update-1-1-5/update-nvmrc.js",
40
35
  "cli": {
@@ -42,7 +37,7 @@
42
37
  }
43
38
  },
44
39
  "fix-dependency-versions": {
45
- "version": "1.6.0",
40
+ "version": "1.9.0",
46
41
  "description": "Removes ^ from @changesets/cli version in package.json",
47
42
  "implementation": "./dist/migrations/update-1-1-5/fix-dependency-versions.js",
48
43
  "cli": {
@@ -50,7 +45,7 @@
50
45
  }
51
46
  },
52
47
  "update-github-workflow": {
53
- "version": "1.6.0",
48
+ "version": "1.9.0",
54
49
  "description": "Updates .github/workflows/cicd.yml from template",
55
50
  "implementation": "./dist/migrations/update-1-1-5/update-github-workflow.js",
56
51
  "cli": {
@@ -59,11 +54,19 @@
59
54
  }
60
55
  },
61
56
  "packageJsonUpdates": {
62
- "1.6.0": {
63
- "version": "1.6.0",
57
+ "1.9.0": {
58
+ "version": "1.9.0",
64
59
  "cli": "nx",
65
- "postUpdateMessage": "\n🎉 Migration to @unisphere/nx 1.1.5 completed successfully!\n\n📋 Summary of changes:\n • Upgraded to Nx 22\n • Updated Node.js to version 24 (.nvmrc)\n • Pinned @changesets/cli to exact version\n • Updated GitHub workflow to use Node 24\n • Updated all @unisphere and @kaltura packages\n • Upgraded to React 19\n\n⚠️ Important next steps:\n 1. Install dependencies: npm install\n 2. Ensure you have Node.js 24.x installed (check with: node --version)\n 3. Review and test your application\n 4. Commit the changes\n\nFor more information, visit: https://github.com/your-org/unisphere\n",
60
+ "postUpdateMessage": "\n🎉 Migration to @unisphere/nx 1.9.0 completed successfully!\n\n📋 Summary of changes:\n • Upgraded to Nx 22\n • Upgraded MUI to v7\n • Updated Node.js to version 24 (.nvmrc)\n • Updated all @unisphere and @kaltura packages\n • Upgraded to React 19\n\n⚠️ Important next steps:\n 1. Install dependencies: npm install\n 2. Ensure you have Node.js 24.x installed (check with: node --version)\n 3. Review and test your application\n 4. Commit the changes\n\nFor more information, visit: https://github.com/your-org/unisphere\n",
66
61
  "packages": {
62
+ "@mui/material": {
63
+ "version": "^7.3.1",
64
+ "alwaysAddToPackageJson": false
65
+ },
66
+ "@mui/icons-material": {
67
+ "version": "^7.3.1",
68
+ "alwaysAddToPackageJson": false
69
+ },
67
70
  "@kaltura/ds-react-bits": {
68
71
  "version": "latest",
69
72
  "alwaysAddToPackageJson": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/nx",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,16 +0,0 @@
1
- import { Tree } from '@nx/devkit';
2
- /**
3
- * Test Migration Locally Generator
4
- *
5
- * This generator mimics the full `nx migrate` flow for local testing.
6
- * It reads migrations.json and executes everything in the correct order,
7
- * including showing post-upgrade messages.
8
- *
9
- * Usage:
10
- * npx nx g @unisphere/nx:test-migration-locally
11
- *
12
- * Or with local path:
13
- * npx nx g ./packages/nx:test-migration-locally
14
- */
15
- export default function testMigrationLocally(tree: Tree): Promise<void>;
16
- //# sourceMappingURL=generator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/generators/test-migration-locally/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAuB,MAAM,YAAY,CAAC;AAIvD;;;;;;;;;;;;GAYG;AACH,wBAA8B,oBAAoB,CAAC,IAAI,EAAE,IAAI,iBA+G5D"}
@@ -1,9 +0,0 @@
1
- To run the migration locally
2
-
3
- `
4
- npx nx generate {path-to-repo}/unisphere-nx-workspace-plugin/packages/nx:test-migration-locally
5
- `
6
-
7
-
8
- npx nx generate /home/tokomeno/kaltura/unisphere/pl/unisphere-nx-workspace-plugin/packages/nx:test-migration-locally
9
-
@@ -1,10 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "TestMigrationLocally",
5
- "title": "Test Migration Locally",
6
- "description": "Runs migrations locally for testing (mimics nx migrate flow)",
7
- "type": "object",
8
- "properties": {},
9
- "required": []
10
- }