@unisphere/nx 1.9.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.
- package/dist/generators/unisphere-migrate/generator.d.ts +15 -0
- package/dist/generators/unisphere-migrate/generator.d.ts.map +1 -0
- package/dist/generators/{test-migration-locally → unisphere-migrate}/generator.js +16 -15
- package/dist/generators/unisphere-migrate/run-locally.md +15 -0
- package/dist/generators/unisphere-migrate/schema.json +10 -0
- package/dist/migrations.json +10 -7
- package/generators.json +5 -5
- package/migrations.json +10 -7
- package/package.json +1 -1
- package/dist/generators/test-migration-locally/generator.d.ts +0 -16
- package/dist/generators/test-migration-locally/generator.d.ts.map +0 -1
- package/dist/generators/test-migration-locally/run-locally.md +0 -9
- package/dist/generators/test-migration-locally/schema.json +0 -10
|
@@ -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 =
|
|
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
|
-
*
|
|
8
|
+
* Unisphere Migrate Generator
|
|
9
9
|
*
|
|
10
|
-
* This generator
|
|
11
|
-
*
|
|
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:
|
|
14
|
+
* npx nx g @unisphere/nx:unisphere-migrate
|
|
16
15
|
*
|
|
17
16
|
* Or with local path:
|
|
18
|
-
* npx nx g
|
|
17
|
+
* npx nx g /path/to/packages/nx:unisphere-migrate
|
|
19
18
|
*/
|
|
20
|
-
async function
|
|
19
|
+
async function unisphereManualMigrate(tree) {
|
|
21
20
|
devkit_1.logger.info('');
|
|
22
|
-
devkit_1.logger.info('
|
|
21
|
+
devkit_1.logger.info('🔄 RUNNING UNISPHERE MIGRATIONS MANUALLY');
|
|
23
22
|
devkit_1.logger.info('='.repeat(70));
|
|
24
|
-
devkit_1.logger.info('This
|
|
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.
|
|
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
|
-
|
|
57
|
-
const
|
|
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
|
+
}
|
package/dist/migrations.json
CHANGED
|
@@ -23,11 +23,6 @@
|
|
|
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.9.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
27
|
"version": "1.9.0",
|
|
33
28
|
"description": "Syncs package json files",
|
|
@@ -60,10 +55,18 @@
|
|
|
60
55
|
},
|
|
61
56
|
"packageJsonUpdates": {
|
|
62
57
|
"1.9.0": {
|
|
63
|
-
"version": "1.
|
|
58
|
+
"version": "1.9.0",
|
|
64
59
|
"cli": "nx",
|
|
65
|
-
"postUpdateMessage": "\n🎉 Migration to @unisphere/nx 1.
|
|
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
|
-
"
|
|
29
|
-
"factory": "./dist/generators/
|
|
30
|
-
"schema": "./dist/generators/
|
|
31
|
-
"description": "
|
|
32
|
-
"hidden":
|
|
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
|
@@ -23,11 +23,6 @@
|
|
|
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.9.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
27
|
"version": "1.9.0",
|
|
33
28
|
"description": "Syncs package json files",
|
|
@@ -60,10 +55,18 @@
|
|
|
60
55
|
},
|
|
61
56
|
"packageJsonUpdates": {
|
|
62
57
|
"1.9.0": {
|
|
63
|
-
"version": "1.
|
|
58
|
+
"version": "1.9.0",
|
|
64
59
|
"cli": "nx",
|
|
65
|
-
"postUpdateMessage": "\n🎉 Migration to @unisphere/nx 1.
|
|
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,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,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
|
-
}
|