- Updated all package.json name fields and dependency references - Updated all TypeScript/JavaScript imports - Updated .woodpecker/publish.yml filters and registry paths - Updated tools/install.sh scope default - Updated .npmrc registry paths (worktree + host) - Enhanced update-checker.ts with checkForAllUpdates() multi-package support - Updated CLI update command to show table of all packages - Added KNOWN_PACKAGES, formatAllPackagesTable, getInstallAllCommand - Marked checkForUpdate() with @deprecated JSDoc Closes #391
2.1 KiB
2.1 KiB
Scratchpad — updater package target fix (#382)
- Objective: Fix
mosaic updateso modern installs query@mosaicstack/mosaicinstead of stale@mosaicstack/cli. - Scope: updater logic, user-facing update/install hints, tests, package version bump(s).
- Constraints: preserve backward compatibility for older
@mosaicstack/cliinstalls if practical. - Acceptance:
- fresh installs using
@mosaicstack/mosaicreport latest correctly - older installs do not regress unnecessarily
- tests cover package lookup behavior
- release version bumped for changed package(s)
- fresh installs using
Decisions
- Prefer
@mosaicstack/mosaicwhen both modern and legacy packages are installed globally. - For legacy
@mosaicstack/cliinstalls, query@mosaicstack/clifirst, then fall back to@mosaicstack/mosaicif the legacy package is not published. - Share install-target selection from
packages/mosaicso both the consolidated CLI and the legacypackages/clientrypoint print/install the same package target. - Extend the update cache to persist the resolved target package as well as the version so cached checks preserve the migration target.
Validation
pnpm installpnpm --filter @mosaicstack/mosaic test -- __tests__/update-checker.test.tspnpm exec eslint --no-warn-ignored packages/mosaic/src/runtime/update-checker.ts packages/mosaic/src/cli.ts packages/mosaic/src/index.ts packages/mosaic/__tests__/update-checker.test.ts packages/cli/src/cli.tspnpm --filter @mosaicstack/mosaic lint- pre-push hooks:
typecheck,lint,format:check
Review
- Manual review of the updater diff caught and fixed a cache regression where fallback results would lose the resolved package target on subsequent cached checks.
Risks / Notes
- Direct
pnpm --filter @mosaicstack/mosaic typecheckandpnpm --filter @mosaicstack/cli ...checks were not representative in this worktree becausepackages/cliis excluded frompnpm-workspace.yamland the standalone package check lacked the built workspace dependency graph. - The repo's pre-push hooks provided the authoritative validation path here and passed: root
typecheck,lint, andformat:check.