everything-dev 1.12.4 → 1.14.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/app.cjs +17 -5
- package/dist/app.cjs.map +1 -1
- package/dist/app.mjs +17 -5
- package/dist/app.mjs.map +1 -1
- package/dist/cli/init.cjs +151 -74
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.d.cts +1 -1
- package/dist/cli/init.d.cts.map +1 -1
- package/dist/cli/init.d.mts +1 -1
- package/dist/cli/init.d.mts.map +1 -1
- package/dist/cli/init.mjs +152 -75
- package/dist/cli/init.mjs.map +1 -1
- package/dist/cli/prompts.cjs +3 -3
- package/dist/cli/prompts.cjs.map +1 -1
- package/dist/cli/prompts.mjs +3 -3
- package/dist/cli/prompts.mjs.map +1 -1
- package/dist/cli/status.cjs +22 -0
- package/dist/cli/status.cjs.map +1 -1
- package/dist/cli/status.mjs +22 -0
- package/dist/cli/status.mjs.map +1 -1
- package/dist/cli/sync.cjs +15 -56
- package/dist/cli/sync.cjs.map +1 -1
- package/dist/cli/sync.mjs +15 -56
- package/dist/cli/sync.mjs.map +1 -1
- package/dist/cli/upgrade.cjs +59 -5
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs +59 -5
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/config.cjs +206 -69
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +13 -6
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +13 -6
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +201 -71
- package/dist/config.mjs.map +1 -1
- package/dist/contract.d.cts +106 -10
- package/dist/contract.d.cts.map +1 -1
- package/dist/contract.d.mts +106 -10
- package/dist/contract.d.mts.map +1 -1
- package/dist/host.cjs +34 -1
- package/dist/host.cjs.map +1 -1
- package/dist/host.d.cts.map +1 -1
- package/dist/host.d.mts.map +1 -1
- package/dist/host.mjs +34 -1
- package/dist/host.mjs.map +1 -1
- package/dist/index.cjs +16 -0
- package/dist/index.d.cts +5 -3
- package/dist/index.d.mts +5 -3
- package/dist/index.mjs +5 -3
- package/dist/internal/manifest-normalizer.cjs +14 -1
- package/dist/internal/manifest-normalizer.cjs.map +1 -1
- package/dist/internal/manifest-normalizer.mjs +14 -1
- package/dist/internal/manifest-normalizer.mjs.map +1 -1
- package/dist/merge.cjs +113 -0
- package/dist/merge.cjs.map +1 -0
- package/dist/merge.d.cts +7 -0
- package/dist/merge.d.cts.map +1 -0
- package/dist/merge.d.mts +7 -0
- package/dist/merge.d.mts.map +1 -0
- package/dist/merge.mjs +107 -0
- package/dist/merge.mjs.map +1 -0
- package/dist/orchestrator.d.cts +1 -1
- package/dist/orchestrator.d.mts +1 -1
- package/dist/plugin.cjs +117 -105
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +115 -9
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +115 -9
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +117 -105
- package/dist/plugin.mjs.map +1 -1
- package/dist/service-descriptor.cjs +21 -0
- package/dist/service-descriptor.cjs.map +1 -1
- package/dist/service-descriptor.d.cts +23 -1
- package/dist/service-descriptor.d.cts.map +1 -1
- package/dist/service-descriptor.d.mts +23 -1
- package/dist/service-descriptor.d.mts.map +1 -1
- package/dist/service-descriptor.mjs +21 -0
- package/dist/service-descriptor.mjs.map +1 -1
- package/dist/shared.cjs +24 -2
- package/dist/shared.cjs.map +1 -1
- package/dist/shared.d.cts +3 -0
- package/dist/shared.d.cts.map +1 -1
- package/dist/shared.d.mts +3 -0
- package/dist/shared.d.mts.map +1 -1
- package/dist/shared.mjs +25 -3
- package/dist/shared.mjs.map +1 -1
- package/dist/sidebar.cjs +124 -0
- package/dist/sidebar.cjs.map +1 -0
- package/dist/sidebar.d.cts +8 -0
- package/dist/sidebar.d.cts.map +1 -0
- package/dist/sidebar.d.mts +8 -0
- package/dist/sidebar.d.mts.map +1 -0
- package/dist/sidebar.mjs +122 -0
- package/dist/sidebar.mjs.map +1 -0
- package/dist/types.cjs +104 -10
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +256 -29
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +256 -29
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +100 -11
- package/dist/types.mjs.map +1 -1
- package/dist/utils/path-match.cjs +18 -0
- package/dist/utils/path-match.cjs.map +1 -0
- package/dist/utils/path-match.mjs +17 -0
- package/dist/utils/path-match.mjs.map +1 -0
- package/dist/utils/save-config.cjs +19 -0
- package/dist/utils/save-config.cjs.map +1 -0
- package/dist/utils/save-config.mjs +18 -0
- package/dist/utils/save-config.mjs.map +1 -0
- package/package.json +6 -6
- package/skills/dev-workflow/SKILL.md +8 -0
- package/skills/extends-config/SKILL.md +132 -0
- package/skills/init-upgrade/SKILL.md +128 -0
- package/skills/publish-sync/SKILL.md +30 -0
- package/src/app.ts +15 -5
- package/src/cli/init.ts +207 -108
- package/src/cli/prompts.ts +2 -2
- package/src/cli/status.ts +20 -0
- package/src/cli/sync.ts +27 -96
- package/src/cli/upgrade.ts +65 -3
- package/src/cli.ts +1 -1
- package/src/config.ts +306 -119
- package/src/host.ts +45 -0
- package/src/index.ts +1 -0
- package/src/internal/manifest-normalizer.ts +16 -4
- package/src/merge.ts +198 -0
- package/src/plugin.ts +340 -318
- package/src/service-descriptor.ts +23 -0
- package/src/shared.ts +48 -5
- package/src/sidebar.ts +162 -0
- package/src/types.ts +134 -28
- package/src/utils/path-match.ts +16 -0
- package/src/utils/save-config.ts +20 -0
- package/cli.js +0 -10
package/src/cli/sync.ts
CHANGED
|
@@ -10,6 +10,13 @@ import {
|
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
11
|
import { glob } from "glob";
|
|
12
12
|
import type { SyncOptions, SyncResult } from "../contract";
|
|
13
|
+
import {
|
|
14
|
+
isPlainObject as isPlainObjectFromMerge,
|
|
15
|
+
mergeBosConfigWithTemplate,
|
|
16
|
+
resolveExtendsRef,
|
|
17
|
+
} from "../merge";
|
|
18
|
+
import type { BosPluginRef } from "../types";
|
|
19
|
+
import { isPathExcluded } from "../utils/path-match";
|
|
13
20
|
import {
|
|
14
21
|
personalizeConfig,
|
|
15
22
|
readTemplatekeep,
|
|
@@ -24,6 +31,8 @@ const FRAMEWORK_OWNED_SYNC_FILES = new Set([
|
|
|
24
31
|
"biome.json",
|
|
25
32
|
"bos.config.json",
|
|
26
33
|
"package.json",
|
|
34
|
+
".github/renovate.json",
|
|
35
|
+
".github/workflows/ci.yml",
|
|
27
36
|
".github/workflows/release-sync.yml",
|
|
28
37
|
"ui/package.json",
|
|
29
38
|
"ui/postcss.config.mjs",
|
|
@@ -67,22 +76,6 @@ export function readLocalSyncExcludes(projectDir: string): string[] {
|
|
|
67
76
|
return readExcludeFile(join(projectDir, ".bos", "sync-local-exclude"));
|
|
68
77
|
}
|
|
69
78
|
|
|
70
|
-
function isExcluded(filePath: string, excludePatterns: string[]): boolean {
|
|
71
|
-
for (const pattern of excludePatterns) {
|
|
72
|
-
if (pattern.endsWith("/**")) {
|
|
73
|
-
const prefix = pattern.slice(0, -3);
|
|
74
|
-
if (filePath.startsWith(`${prefix}/`) || filePath === prefix) return true;
|
|
75
|
-
} else if (pattern.endsWith("/*")) {
|
|
76
|
-
const prefix = pattern.slice(0, -2);
|
|
77
|
-
const slashIdx = filePath.indexOf("/", prefix.length + 1);
|
|
78
|
-
if (filePath.startsWith(`${prefix}/`) && slashIdx === -1) return true;
|
|
79
|
-
} else if (filePath === pattern || filePath.startsWith(`${pattern}/`)) {
|
|
80
|
-
return true;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
79
|
function computeLocalHash(projectDir: string, filePath: string): string | null {
|
|
87
80
|
const fullPath = join(projectDir, filePath);
|
|
88
81
|
if (!existsSync(fullPath)) return null;
|
|
@@ -111,78 +104,6 @@ function backupFiles(projectDir: string, filePaths: string[]): string | null {
|
|
|
111
104
|
return backupDir;
|
|
112
105
|
}
|
|
113
106
|
|
|
114
|
-
function isPlainObject(value: unknown): value is Record<string, unknown> {
|
|
115
|
-
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function mergeJsonValues(local: unknown, template: unknown): unknown {
|
|
119
|
-
if (isPlainObject(local) && isPlainObject(template)) {
|
|
120
|
-
const merged: Record<string, unknown> = {};
|
|
121
|
-
// Preserve local key order first
|
|
122
|
-
for (const key of Object.keys(local)) {
|
|
123
|
-
merged[key] = mergeJsonValues(local[key], template[key]);
|
|
124
|
-
}
|
|
125
|
-
// Append any new template keys at the end
|
|
126
|
-
for (const key of Object.keys(template)) {
|
|
127
|
-
if (!(key in merged)) {
|
|
128
|
-
merged[key] = template[key];
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return merged;
|
|
132
|
-
}
|
|
133
|
-
// For arrays and primitives, local always wins
|
|
134
|
-
return local ?? template;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function mergeBosConfig(
|
|
138
|
-
local: Record<string, unknown>,
|
|
139
|
-
template: Record<string, unknown>,
|
|
140
|
-
): Record<string, unknown> {
|
|
141
|
-
const merged: Record<string, unknown> = {};
|
|
142
|
-
|
|
143
|
-
// 1. extends always first
|
|
144
|
-
if (local.extends !== undefined) merged.extends = local.extends;
|
|
145
|
-
else if (template.extends !== undefined) merged.extends = template.extends;
|
|
146
|
-
|
|
147
|
-
// 2. Fixed trailing group: app, plugins, shared
|
|
148
|
-
const TRAIL_GROUP = ["app", "plugins", "shared"];
|
|
149
|
-
|
|
150
|
-
const localKeys = Object.keys(local).filter((k) => k !== "extends");
|
|
151
|
-
const templateKeys = Object.keys(template).filter(
|
|
152
|
-
(k) => k !== "extends" && !localKeys.includes(k),
|
|
153
|
-
);
|
|
154
|
-
|
|
155
|
-
// Find the first trailing-group key present locally ("app" comes first in the group)
|
|
156
|
-
const firstTrailIndex = localKeys.findIndex((k) => TRAIL_GROUP.includes(k));
|
|
157
|
-
|
|
158
|
-
const orderedKeys: string[] = [];
|
|
159
|
-
|
|
160
|
-
if (firstTrailIndex >= 0) {
|
|
161
|
-
// Keys before the trail group stay in local order
|
|
162
|
-
orderedKeys.push(...localKeys.slice(0, firstTrailIndex));
|
|
163
|
-
// New template keys inserted right before the trail group
|
|
164
|
-
orderedKeys.push(...templateKeys);
|
|
165
|
-
// Trail group keys (app, plugins, shared) in canonical order, preserving local if present
|
|
166
|
-
for (const trailKey of TRAIL_GROUP) {
|
|
167
|
-
if (localKeys.includes(trailKey)) orderedKeys.push(trailKey);
|
|
168
|
-
}
|
|
169
|
-
} else {
|
|
170
|
-
// No trail group found locally — keep local order then append new keys and trail group
|
|
171
|
-
orderedKeys.push(...localKeys);
|
|
172
|
-
orderedKeys.push(...templateKeys);
|
|
173
|
-
for (const trailKey of TRAIL_GROUP) {
|
|
174
|
-
if (templateKeys.includes(trailKey)) orderedKeys.push(trailKey);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// 3. Merge values for each key
|
|
179
|
-
for (const key of orderedKeys) {
|
|
180
|
-
merged[key] = mergeJsonValues(local[key], template[key]);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
return merged;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
107
|
function mergeStringMaps(
|
|
187
108
|
local: Record<string, string> | undefined,
|
|
188
109
|
template: Record<string, string> | undefined,
|
|
@@ -328,7 +249,7 @@ function writeSyncedFile(sourceDir: string, projectDir: string, filePath: string
|
|
|
328
249
|
if (localContent) {
|
|
329
250
|
const local = JSON.parse(localContent) as Record<string, unknown>;
|
|
330
251
|
const template = JSON.parse(templateContent) as Record<string, unknown>;
|
|
331
|
-
const merged =
|
|
252
|
+
const merged = mergeBosConfigWithTemplate(local, template);
|
|
332
253
|
writeFileSync(dest, `${JSON.stringify(merged, null, 2)}\n`);
|
|
333
254
|
return;
|
|
334
255
|
}
|
|
@@ -351,11 +272,20 @@ function writeSyncedFile(sourceDir: string, projectDir: string, filePath: string
|
|
|
351
272
|
}
|
|
352
273
|
|
|
353
274
|
export async function syncTemplate(projectDir: string, options: SyncOptions): Promise<SyncResult> {
|
|
275
|
+
// Sync reads the raw bos.config.json (not the resolved config) because it needs
|
|
276
|
+
// the user's explicit local settings: their extends ref, selected plugins, etc.
|
|
277
|
+
// The resolved config is the merged result and would include inherited parent
|
|
278
|
+
// values that the user didn't explicitly choose, which would break sync filtering.
|
|
354
279
|
const localConfig = JSON.parse(
|
|
355
280
|
readFileSync(join(projectDir, "bos.config.json"), "utf-8"),
|
|
356
281
|
) as Record<string, unknown>;
|
|
357
282
|
|
|
358
|
-
|
|
283
|
+
let extendsRef: string | undefined;
|
|
284
|
+
if (typeof localConfig.extends === "string") {
|
|
285
|
+
extendsRef = localConfig.extends;
|
|
286
|
+
} else if (isPlainObjectFromMerge(localConfig.extends)) {
|
|
287
|
+
extendsRef = resolveExtendsRef(localConfig.extends as Record<string, string>, "production");
|
|
288
|
+
}
|
|
359
289
|
if (!extendsRef?.startsWith("bos://")) {
|
|
360
290
|
return {
|
|
361
291
|
status: "error",
|
|
@@ -421,8 +351,9 @@ export async function syncTemplate(projectDir: string, options: SyncOptions): Pr
|
|
|
421
351
|
|
|
422
352
|
const pluginRoutes: Record<string, string[]> = {};
|
|
423
353
|
if (parentConfig.plugins) {
|
|
424
|
-
for (const [key,
|
|
425
|
-
|
|
354
|
+
for (const [key, entry] of Object.entries(parentConfig.plugins)) {
|
|
355
|
+
const ref: BosPluginRef | null = entry && typeof entry !== "string" ? entry : null;
|
|
356
|
+
if (ref?.routes && ref.routes.length > 0) {
|
|
426
357
|
pluginRoutes[key] = ref.routes;
|
|
427
358
|
}
|
|
428
359
|
}
|
|
@@ -439,7 +370,7 @@ export async function syncTemplate(projectDir: string, options: SyncOptions): Pr
|
|
|
439
370
|
for (const filePath of allTemplateFiles) {
|
|
440
371
|
const pluginMatch = filePath.match(/^plugins\/([^/]+)/);
|
|
441
372
|
if (pluginMatch && !childPlugins.includes(pluginMatch[1])) continue;
|
|
442
|
-
if (
|
|
373
|
+
if (isPathExcluded(filePath, excludedRoutePatterns)) continue;
|
|
443
374
|
filteredFiles.add(filePath);
|
|
444
375
|
}
|
|
445
376
|
|
|
@@ -453,7 +384,7 @@ export async function syncTemplate(projectDir: string, options: SyncOptions): Pr
|
|
|
453
384
|
absolute: false,
|
|
454
385
|
});
|
|
455
386
|
for (const match of matches) {
|
|
456
|
-
if (!
|
|
387
|
+
if (!isPathExcluded(match, excludedRoutePatterns)) {
|
|
457
388
|
filteredFiles.add(match);
|
|
458
389
|
}
|
|
459
390
|
}
|
|
@@ -469,7 +400,7 @@ export async function syncTemplate(projectDir: string, options: SyncOptions): Pr
|
|
|
469
400
|
for (const filePath of filteredFiles) {
|
|
470
401
|
const destPath = toDestPath(filePath);
|
|
471
402
|
const frameworkOwned = isFrameworkOwnedSyncFile(destPath);
|
|
472
|
-
if (
|
|
403
|
+
if (isPathExcluded(destPath, excludePatterns) && !frameworkOwned) continue;
|
|
473
404
|
|
|
474
405
|
const localHash = computeLocalHash(projectDir, destPath);
|
|
475
406
|
const sourceContent = readFileSync(join(sourceDir, filePath));
|
|
@@ -515,7 +446,7 @@ export async function syncTemplate(projectDir: string, options: SyncOptions): Pr
|
|
|
515
446
|
}
|
|
516
447
|
|
|
517
448
|
const filesToWrite = [...updated, ...added].filter(
|
|
518
|
-
(f) => isFrameworkOwnedSyncFile(f) || !
|
|
449
|
+
(f) => isFrameworkOwnedSyncFile(f) || !isPathExcluded(f, excludePatterns),
|
|
519
450
|
);
|
|
520
451
|
|
|
521
452
|
const destToSource = new Map<string, string>();
|
package/src/cli/upgrade.ts
CHANGED
|
@@ -7,6 +7,19 @@ import { runBunInstall, runTypesGen } from "./init";
|
|
|
7
7
|
import { syncTemplate } from "./sync";
|
|
8
8
|
|
|
9
9
|
const FRAMEWORK_PACKAGES = ["everything-dev", "every-plugin"];
|
|
10
|
+
|
|
11
|
+
const CATALOG_TOOL_PACKAGES = [
|
|
12
|
+
"@rspack/core",
|
|
13
|
+
"@rspack/cli",
|
|
14
|
+
"@rsbuild/core",
|
|
15
|
+
"@rsbuild/plugin-react",
|
|
16
|
+
"@module-federation/enhanced",
|
|
17
|
+
"@module-federation/node",
|
|
18
|
+
"@module-federation/rsbuild-plugin",
|
|
19
|
+
"@module-federation/runtime-core",
|
|
20
|
+
"@module-federation/sdk",
|
|
21
|
+
"@module-federation/dts-plugin",
|
|
22
|
+
] as const;
|
|
10
23
|
const LEGACY_UI_IMPORT_REWRITES = [
|
|
11
24
|
['from "@/auth"', 'from "@/app"'],
|
|
12
25
|
["from '@/auth'", "from '@/app'"],
|
|
@@ -25,6 +38,8 @@ const OBSOLETE_FILES = [
|
|
|
25
38
|
"ui/src/lib/auth-client.ts",
|
|
26
39
|
"ui/src/lib/session.ts",
|
|
27
40
|
"ui/scripts/generate-metadata.ts",
|
|
41
|
+
".github/dependabot.yml",
|
|
42
|
+
".github/templates/dependabot.yml",
|
|
28
43
|
];
|
|
29
44
|
|
|
30
45
|
interface NpmPackageInfo {
|
|
@@ -113,6 +128,28 @@ function updateRootPackageVersion(
|
|
|
113
128
|
return modified;
|
|
114
129
|
}
|
|
115
130
|
|
|
131
|
+
function updateRootCatalogVersion(
|
|
132
|
+
projectDir: string,
|
|
133
|
+
packageName: string,
|
|
134
|
+
newVersion: string,
|
|
135
|
+
): boolean {
|
|
136
|
+
const pkgPath = join(projectDir, "package.json");
|
|
137
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8")) as Record<string, unknown>;
|
|
138
|
+
|
|
139
|
+
if (!pkg.workspaces || typeof pkg.workspaces !== "object") return false;
|
|
140
|
+
const workspaces = pkg.workspaces as { catalog?: Record<string, string> };
|
|
141
|
+
if (!workspaces.catalog || typeof workspaces.catalog !== "object") return false;
|
|
142
|
+
|
|
143
|
+
if (!(packageName in workspaces.catalog)) return false;
|
|
144
|
+
|
|
145
|
+
const nextVersion = `^${newVersion}`;
|
|
146
|
+
if (workspaces.catalog[packageName] === nextVersion) return false;
|
|
147
|
+
|
|
148
|
+
workspaces.catalog[packageName] = nextVersion;
|
|
149
|
+
writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
|
|
116
153
|
async function findWorkspacePackageJsons(projectDir: string): Promise<string[]> {
|
|
117
154
|
const rootPkgPath = join(projectDir, "package.json");
|
|
118
155
|
if (!existsSync(rootPkgPath)) return [];
|
|
@@ -213,7 +250,19 @@ export async function upgradeTemplate(
|
|
|
213
250
|
packages.push({ name, from: installed, to: latest });
|
|
214
251
|
}
|
|
215
252
|
|
|
216
|
-
const
|
|
253
|
+
const catalogVersionUpdates: Array<{ name: string; from: string | undefined; to: string }> = [];
|
|
254
|
+
for (const name of CATALOG_TOOL_PACKAGES) {
|
|
255
|
+
const installed = readInstalledVersion(projectDir, name);
|
|
256
|
+
if (!installed) continue;
|
|
257
|
+
const latest = await fetchLatestNpmVersion(name);
|
|
258
|
+
if (!latest) continue;
|
|
259
|
+
if (installed === latest) continue;
|
|
260
|
+
catalogVersionUpdates.push({ name, from: installed, to: latest });
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
const hasFrameworkUpdates = packages.some((p) => p.from !== p.to && p.from !== undefined);
|
|
264
|
+
const hasCatalogUpdates = catalogVersionUpdates.length > 0;
|
|
265
|
+
const hasUpdates = hasFrameworkUpdates || hasCatalogUpdates;
|
|
217
266
|
|
|
218
267
|
if (options.dryRun) {
|
|
219
268
|
let changelogUrl: string | undefined;
|
|
@@ -233,7 +282,10 @@ export async function upgradeTemplate(
|
|
|
233
282
|
|
|
234
283
|
return {
|
|
235
284
|
status: "dry-run",
|
|
236
|
-
packages
|
|
285
|
+
packages: [
|
|
286
|
+
...packages,
|
|
287
|
+
...catalogVersionUpdates.map((u) => ({ name: u.name, from: u.from, to: u.to })),
|
|
288
|
+
],
|
|
237
289
|
changelogUrl,
|
|
238
290
|
};
|
|
239
291
|
}
|
|
@@ -244,6 +296,10 @@ export async function upgradeTemplate(
|
|
|
244
296
|
}
|
|
245
297
|
}
|
|
246
298
|
|
|
299
|
+
for (const update of catalogVersionUpdates) {
|
|
300
|
+
updateRootCatalogVersion(projectDir, update.name, update.to);
|
|
301
|
+
}
|
|
302
|
+
|
|
247
303
|
const workspacePkgPaths = await findWorkspacePackageJsons(projectDir);
|
|
248
304
|
for (const pkgPath of workspacePkgPaths) {
|
|
249
305
|
for (const pkg of packages) {
|
|
@@ -251,6 +307,9 @@ export async function upgradeTemplate(
|
|
|
251
307
|
updateWorkspacePackageRefInFile(pkgPath, pkg.name);
|
|
252
308
|
}
|
|
253
309
|
}
|
|
310
|
+
for (const update of catalogVersionUpdates) {
|
|
311
|
+
updateWorkspacePackageRefInFile(pkgPath, update.name);
|
|
312
|
+
}
|
|
254
313
|
}
|
|
255
314
|
|
|
256
315
|
if (hasUpdates && !options.noInstall) {
|
|
@@ -291,7 +350,10 @@ export async function upgradeTemplate(
|
|
|
291
350
|
|
|
292
351
|
return {
|
|
293
352
|
status: "upgraded",
|
|
294
|
-
packages
|
|
353
|
+
packages: [
|
|
354
|
+
...packages,
|
|
355
|
+
...catalogVersionUpdates.map((u) => ({ name: u.name, from: u.from, to: u.to })),
|
|
356
|
+
],
|
|
295
357
|
sync: syncResult,
|
|
296
358
|
migrated: migratedFiles.length > 0 ? migratedFiles : undefined,
|
|
297
359
|
changelogUrl,
|
package/src/cli.ts
CHANGED