@unisphere/nx 2.1.0 → 2.2.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/add-package/README.md +3 -3
- package/dist/migrations/1-22-0/check-nx-version.js +1 -1
- package/dist/migrations/1-22-0/replace-patches.d.ts.map +1 -1
- package/dist/migrations/1-22-0/replace-patches.js +1 -2
- package/dist/migrations/1-22-2/templates/cicd.template +1 -1
- package/dist/migrations/1-22-4/summary.d.ts.map +1 -1
- package/dist/migrations/1-22-4/summary.js +7 -2
- package/dist/migrations/{2-0-0/replace-patches.d.ts → 1-22-7/remove-storybook.d.ts} +1 -1
- package/dist/migrations/1-22-7/remove-storybook.d.ts.map +1 -0
- package/dist/migrations/1-22-7/remove-storybook.js +114 -0
- package/dist/migrations/1-22-7/update-git-ignore.d.ts +3 -0
- package/dist/migrations/1-22-7/update-git-ignore.d.ts.map +1 -0
- package/dist/migrations/1-22-7/update-git-ignore.js +55 -0
- package/dist/migrations/1-22-9/fix-prerelease-deploy.d.ts +3 -0
- package/dist/migrations/1-22-9/fix-prerelease-deploy.d.ts.map +1 -0
- package/dist/migrations/1-22-9/fix-prerelease-deploy.js +27 -0
- package/dist/migrations/1-22-9/templates/cicd.template +79 -0
- package/dist/migrations/1-23-0/delete-rollup-patch.d.ts +3 -0
- package/dist/migrations/1-23-0/delete-rollup-patch.d.ts.map +1 -0
- package/dist/migrations/1-23-0/delete-rollup-patch.js +14 -0
- package/dist/migrations/1-23-2/update-nvmrc.d.ts.map +1 -0
- package/dist/migrations/1-24-2/force-always-for-applications.d.ts +3 -0
- package/dist/migrations/1-24-2/force-always-for-applications.d.ts.map +1 -0
- package/dist/migrations/1-24-2/force-always-for-applications.js +36 -0
- package/dist/migrations/1-24-2/templates/_publish-artifacts.template +306 -0
- package/dist/migrations/2-0-0/summary.d.ts.map +1 -1
- package/dist/migrations/2-0-0/summary.js +7 -2
- package/dist/migrations/2-2-0/replace-github-workflow.d.ts +3 -0
- package/dist/migrations/2-2-0/replace-github-workflow.d.ts.map +1 -0
- package/dist/migrations/2-2-0/replace-github-workflow.js +36 -0
- package/dist/migrations/2-2-0/templates/_publish-artifacts.template +309 -0
- package/dist/migrations/utils/open.d.ts +2 -0
- package/dist/migrations/utils/open.d.ts.map +1 -0
- package/dist/migrations/utils/open.js +16 -0
- package/migrations.json +66 -17
- package/package.json +2 -2
- package/dist/migrations/1-22-0/patches/@nx+rollup+22.1.3.patch +0 -27
- package/dist/migrations/2-0-0/patches/@nx+rollup+22.1.3.patch +0 -27
- package/dist/migrations/2-0-0/replace-patches.d.ts.map +0 -1
- package/dist/migrations/2-0-0/replace-patches.js +0 -56
- package/dist/migrations/2-0-0/update-nvmrc.d.ts.map +0 -1
- /package/dist/migrations/{2-0-0 → 1-23-2}/update-nvmrc.d.ts +0 -0
- /package/dist/migrations/{2-0-0 → 1-23-2}/update-nvmrc.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../../src/migrations/utils/open.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,SAYtC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.openBrowser = void 0;
|
|
4
|
+
const node_child_process_1 = require("node:child_process");
|
|
5
|
+
const openBrowser = (url) => {
|
|
6
|
+
try {
|
|
7
|
+
const command = process.platform === 'darwin' ? `open "${url}"` :
|
|
8
|
+
process.platform === 'win32' ? `start "" "${url}"` :
|
|
9
|
+
`xdg-open "${url}"`;
|
|
10
|
+
(0, node_child_process_1.exec)(command);
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
console.error('Failed to open browser:', error);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
exports.openBrowser = openBrowser;
|
package/migrations.json
CHANGED
|
@@ -63,6 +63,39 @@
|
|
|
63
63
|
"description": "Migration completion summary for 1.22.4",
|
|
64
64
|
"factory": "./dist/migrations/1-22-4/summary.js"
|
|
65
65
|
},
|
|
66
|
+
"1-22-7-update-git-ignore": {
|
|
67
|
+
"version": "1.22.7",
|
|
68
|
+
"description": "Update .gitignore",
|
|
69
|
+
"factory": "./dist/migrations/1-22-7/update-git-ignore.js"
|
|
70
|
+
},
|
|
71
|
+
"1-22-7-remove-storybook": {
|
|
72
|
+
"version": "1.22.7",
|
|
73
|
+
"description": "Removes storybook files and dependencies",
|
|
74
|
+
"factory": "./dist/migrations/1-22-7/remove-storybook.js",
|
|
75
|
+
"cli": {
|
|
76
|
+
"postUpdateMessage": "✅ Storybook files and dependencies have been removed"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"1-22-9-fix-prerelease-deploy": {
|
|
80
|
+
"version": "1.22.9",
|
|
81
|
+
"description": "Fix prerelease deploy logic in GitHub workflow",
|
|
82
|
+
"factory": "./dist/migrations/1-22-9/fix-prerelease-deploy.js"
|
|
83
|
+
},
|
|
84
|
+
"1-23-0-delete-rollup-patch": {
|
|
85
|
+
"version": "1.23.0",
|
|
86
|
+
"description": "Delete rollup patch file",
|
|
87
|
+
"factory": "./dist/migrations/1-23-0/delete-rollup-patch.js"
|
|
88
|
+
},
|
|
89
|
+
"1-23-2-update-nvmrc": {
|
|
90
|
+
"version": "1.23.2",
|
|
91
|
+
"description": "Update .nvmrc to Node 24",
|
|
92
|
+
"factory": "./dist/migrations/1-23-2/update-nvmrc.js"
|
|
93
|
+
},
|
|
94
|
+
"1-24-2-force-always-for-applications": {
|
|
95
|
+
"version": "1.24.2",
|
|
96
|
+
"description": "Force always deploy applications in GitHub workflow",
|
|
97
|
+
"factory": "./dist/migrations/1-24-2/force-always-for-applications.js"
|
|
98
|
+
},
|
|
66
99
|
"2-0-0-update-npmrc": {
|
|
67
100
|
"version": "2.0.0",
|
|
68
101
|
"description": "Updates .npmrc to remove legacy-peer-deps=true",
|
|
@@ -91,22 +124,6 @@
|
|
|
91
124
|
"description": "Syncs package json files",
|
|
92
125
|
"factory": "./dist/migrations/2-0-0/sync-package-json-files.js"
|
|
93
126
|
},
|
|
94
|
-
"2-0-0-update-nvmrc": {
|
|
95
|
-
"version": "2.0.0",
|
|
96
|
-
"description": "Updates .nvmrc to Node 24 (creates if missing)",
|
|
97
|
-
"factory": "./dist/migrations/2-0-0/update-nvmrc.js",
|
|
98
|
-
"cli": {
|
|
99
|
-
"postUpdateMessage": "✅ .nvmrc has been updated to Node 24. Please ensure you have Node.js 24.x installed."
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"2-0-0-replace-patches": {
|
|
103
|
-
"version": "2.0.0",
|
|
104
|
-
"description": "Replaces patches",
|
|
105
|
-
"factory": "./dist/migrations/2-0-0/replace-patches.js",
|
|
106
|
-
"cli": {
|
|
107
|
-
"postUpdateMessage": "✅ Patches have been replaced"
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
127
|
"2-0-0-summary": {
|
|
111
128
|
"version": "2.0.0",
|
|
112
129
|
"description": "Migration completion summary for 2.0.0",
|
|
@@ -143,7 +160,15 @@
|
|
|
143
160
|
"cli": {
|
|
144
161
|
"postUpdateMessage": "✅ rollup-plugin-node-builtins dependency has been removed"
|
|
145
162
|
}
|
|
146
|
-
}
|
|
163
|
+
},
|
|
164
|
+
"2-2-0-replace-github-workflow": {
|
|
165
|
+
"version": "2.2.0",
|
|
166
|
+
"description": "increases instance size for publish runtimes workflow",
|
|
167
|
+
"factory": "./dist/migrations/2-2-0/replace-github-workflow.js",
|
|
168
|
+
"cli": {
|
|
169
|
+
"postUpdateMessage": "✅ GitHub workflow updated with some changes."
|
|
170
|
+
}
|
|
171
|
+
},
|
|
147
172
|
},
|
|
148
173
|
"packageJsonUpdates": {
|
|
149
174
|
"1.22.0": {
|
|
@@ -177,6 +202,26 @@
|
|
|
177
202
|
}
|
|
178
203
|
}
|
|
179
204
|
},
|
|
205
|
+
"1.22.9": {
|
|
206
|
+
"version": "1.22.9",
|
|
207
|
+
"cli": "nx",
|
|
208
|
+
"packages": {
|
|
209
|
+
"@unisphere/cli": {
|
|
210
|
+
"version": "^1.58.7",
|
|
211
|
+
"alwaysAddToPackageJson": true
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"1.24.1": {
|
|
216
|
+
"version": "1.24.1",
|
|
217
|
+
"cli": "nx",
|
|
218
|
+
"packages": {
|
|
219
|
+
"@unisphere/cli": {
|
|
220
|
+
"version": "^1.58.9",
|
|
221
|
+
"alwaysAddToPackageJson": true
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
180
225
|
"2.0.0": {
|
|
181
226
|
"version": "2.0.0",
|
|
182
227
|
"cli": "nx",
|
|
@@ -210,6 +255,10 @@
|
|
|
210
255
|
"version": "^12.2.2",
|
|
211
256
|
"alwaysAddToPackageJson": false
|
|
212
257
|
},
|
|
258
|
+
"@kaltura/ds-react-components": {
|
|
259
|
+
"version": "^12.2.2",
|
|
260
|
+
"alwaysAddToPackageJson": false
|
|
261
|
+
},
|
|
213
262
|
"@kaltura/ds-react-icons": {
|
|
214
263
|
"version": "^12.2.2",
|
|
215
264
|
"alwaysAddToPackageJson": false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unisphere/nx",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/kaltura/unisphere-nx
|
|
13
|
+
"url": "https://github.com/kaltura/unisphere-nx"
|
|
14
14
|
},
|
|
15
15
|
"author": {
|
|
16
16
|
"name": "Kaltura",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
diff --git a/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js b/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js
|
|
2
|
-
index 1135bba..4762053 100644
|
|
3
|
-
--- a/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js
|
|
4
|
-
+++ b/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js
|
|
5
|
-
@@ -149,7 +149,13 @@ dependencies) {
|
|
6
|
-
else {
|
|
7
|
-
options.generatePackageJson ??= true;
|
|
8
|
-
}
|
|
9
|
-
- const compilerOptions = createTsCompilerOptions(projectRoot, tsConfig, options, dependencies);
|
|
10
|
-
+ let compilerOptionsInterceptor = ((config) => config);
|
|
11
|
-
+ if (rollupConfig.unisphere?.interceptors?.compilerOptions) {
|
|
12
|
-
+ console.log(`[unisphere.nx.rollup] using monkey patched interceptor for TS compiler options`);
|
|
13
|
-
+ compilerOptionsInterceptor = rollupConfig.unisphere?.interceptors?.compilerOptions;
|
|
14
|
-
+ }
|
|
15
|
-
+
|
|
16
|
-
+ const compilerOptions = compilerOptionsInterceptor(createTsCompilerOptions(projectRoot, tsConfig, options, dependencies));
|
|
17
|
-
compilerOptions.outDir = Array.isArray(finalConfig.output)
|
|
18
|
-
? finalConfig.output[0].dir
|
|
19
|
-
: finalConfig.output.dir;
|
|
20
|
-
@@ -170,6 +176,7 @@ dependencies) {
|
|
21
|
-
return require('rollup-plugin-typescript2')({
|
|
22
|
-
check: !options.skipTypeCheck,
|
|
23
|
-
tsconfig: tsConfigPath,
|
|
24
|
-
+ exclude: ['**/*.stories.ts', '**/*.stories.tsx'],
|
|
25
|
-
tsconfigOverride: {
|
|
26
|
-
compilerOptions,
|
|
27
|
-
},
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
diff --git a/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js b/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js
|
|
2
|
-
index 1135bba..4762053 100644
|
|
3
|
-
--- a/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js
|
|
4
|
-
+++ b/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js
|
|
5
|
-
@@ -149,7 +149,13 @@ dependencies) {
|
|
6
|
-
else {
|
|
7
|
-
options.generatePackageJson ??= true;
|
|
8
|
-
}
|
|
9
|
-
- const compilerOptions = createTsCompilerOptions(projectRoot, tsConfig, options, dependencies);
|
|
10
|
-
+ let compilerOptionsInterceptor = ((config) => config);
|
|
11
|
-
+ if (rollupConfig.unisphere?.interceptors?.compilerOptions) {
|
|
12
|
-
+ console.log(`[unisphere.nx.rollup] using monkey patched interceptor for TS compiler options`);
|
|
13
|
-
+ compilerOptionsInterceptor = rollupConfig.unisphere?.interceptors?.compilerOptions;
|
|
14
|
-
+ }
|
|
15
|
-
+
|
|
16
|
-
+ const compilerOptions = compilerOptionsInterceptor(createTsCompilerOptions(projectRoot, tsConfig, options, dependencies));
|
|
17
|
-
compilerOptions.outDir = Array.isArray(finalConfig.output)
|
|
18
|
-
? finalConfig.output[0].dir
|
|
19
|
-
: finalConfig.output.dir;
|
|
20
|
-
@@ -170,6 +176,7 @@ dependencies) {
|
|
21
|
-
return require('rollup-plugin-typescript2')({
|
|
22
|
-
check: !options.skipTypeCheck,
|
|
23
|
-
tsconfig: tsConfigPath,
|
|
24
|
-
+ exclude: ['**/*.stories.ts', '**/*.stories.tsx'],
|
|
25
|
-
tsconfigOverride: {
|
|
26
|
-
compilerOptions,
|
|
27
|
-
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replace-patches.d.ts","sourceRoot":"","sources":["../../../src/migrations/2-0-0/replace-patches.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmC,MAAM,YAAY,CAAC;AAQnE,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAwD9D"}
|
|
@@ -1,56 +0,0 @@
|
|
|
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
|
-
const removePatchList = ['nx+rollup+'];
|
|
7
|
-
const forcePatchVersions = {
|
|
8
|
-
'@nx/rollup': '22.1.3'
|
|
9
|
-
};
|
|
10
|
-
async function update(tree) {
|
|
11
|
-
devkit_1.logger.info('🔄 Creating patches');
|
|
12
|
-
try {
|
|
13
|
-
// Check @nx/rollup version
|
|
14
|
-
if (Object.keys(forcePatchVersions).length !== 0) {
|
|
15
|
-
devkit_1.logger.info('removing patches of older versions');
|
|
16
|
-
const pkg = (0, devkit_1.readJson)(tree, 'package.json');
|
|
17
|
-
Object.keys(forcePatchVersions).forEach(key => {
|
|
18
|
-
const version = pkg.devDependencies?.[key] || pkg.dependencies?.[key];
|
|
19
|
-
if (version !== forcePatchVersions[key]) {
|
|
20
|
-
devkit_1.logger.error(`❌ ${key} version must be exactly ${forcePatchVersions[key]}`);
|
|
21
|
-
throw new Error(`${key} version must be exactly ${forcePatchVersions[key]}. did you migrate nx to other version?`);
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
// Create patches
|
|
26
|
-
const patchesPath = 'patches';
|
|
27
|
-
const patchesTemplatePath = (0, path_1.join)(__dirname, 'patches');
|
|
28
|
-
// Delete existing patches folder content if it exists
|
|
29
|
-
if (tree.exists(patchesPath)) {
|
|
30
|
-
const existingFiles = tree.children(patchesPath);
|
|
31
|
-
for (const file of existingFiles) {
|
|
32
|
-
if (removePatchList.some(patch => file.includes(patch))) {
|
|
33
|
-
devkit_1.logger.info(`🗑️ Removing existing patch: ${file}`);
|
|
34
|
-
tree.delete((0, path_1.join)(patchesPath, file));
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
devkit_1.logger.info(`✅ Patch: ${file} is up to date`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
devkit_1.logger.info(`🧹 Cleaned up existing patches folder`);
|
|
41
|
-
}
|
|
42
|
-
// Copy all patch files using generateFiles
|
|
43
|
-
(0, devkit_1.generateFiles)(tree, patchesTemplatePath, `./${patchesPath}`, {});
|
|
44
|
-
// Log created patches
|
|
45
|
-
const createdPatches = tree.children(patchesPath);
|
|
46
|
-
for (const patchFile of createdPatches) {
|
|
47
|
-
devkit_1.logger.info(`✅ Created patch: ${patchFile}`);
|
|
48
|
-
}
|
|
49
|
-
// Always log that patches were created
|
|
50
|
-
devkit_1.logger.info(`✅ All patches created successfully`);
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
devkit_1.logger.error(`❌ Failed to create patches: ${error?.message || 'Unknown error'}`);
|
|
54
|
-
throw error;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-nvmrc.d.ts","sourceRoot":"","sources":["../../../src/migrations/2-0-0/update-nvmrc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAuB,MAAM,YAAY,CAAC;AAEvD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA0B9D"}
|
|
File without changes
|
|
File without changes
|