create-unisphere-project 2.3.1 → 2.3.2
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/CHANGELOG.md
CHANGED
package/dist/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-unisphere-repo-command.d.ts","sourceRoot":"","sources":["../../../src/lib/create-unisphere-repo-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAsC5C,eAAO,MAAM,gCAAgC,GAC3C,eAAe,OAAO,KACrB,
|
|
1
|
+
{"version":3,"file":"create-unisphere-repo-command.d.ts","sourceRoot":"","sources":["../../../src/lib/create-unisphere-repo-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAsC5C,eAAO,MAAM,gCAAgC,GAC3C,eAAe,OAAO,KACrB,OAqVF,CAAC"}
|
|
@@ -197,10 +197,24 @@ legacy-peer-deps=true`);
|
|
|
197
197
|
...packageJson.devDependencies,
|
|
198
198
|
...packageJson.peerDependencies,
|
|
199
199
|
};
|
|
200
|
-
const unispherePackages = Object.keys(allDependencies).filter((pkg) => pkg.startsWith('@unisphere') && pkg !== '@unisphere/nx'
|
|
200
|
+
const unispherePackages = Object.keys(allDependencies).filter((pkg) => pkg.startsWith('@unisphere') && pkg !== '@unisphere/nx');
|
|
201
201
|
debug(`Found @unisphere packages: ${unispherePackages.join(', ')}`);
|
|
202
|
-
const unispherePackagesToInstall = unispherePackages.map((pkg) =>
|
|
203
|
-
|
|
202
|
+
const unispherePackagesToInstall = unispherePackages.map((pkg) => {
|
|
203
|
+
const version = allDependencies[pkg];
|
|
204
|
+
// Skip file: protocol versions
|
|
205
|
+
if (version.startsWith('file:')) {
|
|
206
|
+
debug(`Package ${pkg} has file version ${version}, ignore`);
|
|
207
|
+
return '';
|
|
208
|
+
}
|
|
209
|
+
// Extract major version from various formats: 1.2.3, ^3.3.3, ~1.2, 1.2, etc.
|
|
210
|
+
const majorVersion = version.match(/^[\^~]?(\d+)/)?.[1];
|
|
211
|
+
if (majorVersion) {
|
|
212
|
+
debug(`Package ${pkg} has version ${version}, using @${majorVersion}`);
|
|
213
|
+
return `${pkg}@${majorVersion}`;
|
|
214
|
+
}
|
|
215
|
+
debug(`Package ${pkg} has version ${version}, ignore`);
|
|
216
|
+
return '';
|
|
217
|
+
}).filter(Boolean);
|
|
204
218
|
debug(`Running: ${unispherePackagesToInstall}`);
|
|
205
219
|
(0, child_process_1.execSync)(`npm install ${unispherePackagesToInstall.join(' ')} --force`, {
|
|
206
220
|
cwd: newProjectPath,
|