BREAKING CHANGE: Remove legacy @mosaic/cli fallback from update-checker. The updater now targets only @mosaic/mosaic — legacy package compatibility is out of scope per approved breaking change. - update-checker.ts: remove LEGACY_PKG, INSTALLED_PACKAGE_ORDER, candidate iteration, and cache key comparison. Single query for @mosaic/mosaic only. - update-checker.test.ts: remove legacy fallback and cross-contamination tests. Add test asserting no @mosaic/cli queries are made. - pr-merge.sh: add --repo and --login flags to tea merge command; resolve OWNER/REPO before case block. - issue-close.sh: add --repo and --login flags to tea issue commands; resolve OWNER/REPO after detect_platform. - pr-ci-wait.sh: no changes needed (uses curl, not tea). - detect-platform.sh: no changes needed (provides get_repo_owner/name). Ref: #387
2.7 KiB
2.7 KiB
Scratchpad — issue #387 updater simplification + Gitea wrapper repo context
- Objective: simplify updater behavior to
@mosaic/mosaiconly, and fix Gitea wrapper scripts so merge/CI/issue operations work reliably when tea needs explicit repo/login context. - Scope:
packages/mosaic/src/runtime/update-checker.tspackages/mosaic/__tests__/update-checker.test.ts- any package metadata/version bumps needed
- repo-source git wrappers under
packages/mosaic/framework/tools/git/
- Constraints:
- Jason approved breaking changes; legacy
@mosaic/clisupport is out of scope. - Keep changes focused and mergeable.
- Jason approved breaking changes; legacy
- Acceptance:
- updater only targets
@mosaic/mosaic - wrapper path works on Gitea in this environment without manual repo guessing
- PR merges squash-only after green CI
- updater only targets
Progress
2026-04-04
Update Checker Simplification (DONE)
- Removed
LEGACY_PKG,INSTALLED_PACKAGE_ORDERconstants — onlyPKG = '@mosaic/mosaic'remains getInstalledVersion()— removed loop over multiple packages, only checks@mosaic/mosaicgetLatestVersion()— removedinstalledPackageparameter and candidate iteration; single query for@mosaic/mosaiccheckForUpdate()— removedcurrentPackage-based cache key comparison; cache is now package-agnosticRegistryCache— removedcurrentPackageandtargetPackagefieldsformatUpdateNotice()— removedtargetChangedbranch (package migration notice no longer relevant)- All legacy fallback/compatibility logic removed
Test Updates (DONE)
- Removed legacy
@mosaic/clifallback test - Removed cache cross-contamination test (was testing legacy→modern package transition)
- Added
does not query legacy @mosaic/cli packagetest — asserts no@mosaic/clinpm commands are issued - Added
returns empty result when package is not installedtest - All 8 tests pass ✅
Gitea Wrapper Fixes (DONE)
pr-merge.sh:- Added
OWNER=$(get_repo_owner)/REPO=$(get_repo_name)before case block - tea merge command now includes
--repo $OWNER/$REPO --login ${GITEA_LOGIN:-mosaicstack}
- Added
issue-close.sh:- Added
OWNER=$(get_repo_owner)/REPO=$(get_repo_name)after detect_platform - Both
tea issue commentandtea issue closenow include--repo "$OWNER/$REPO" --login "${GITEA_LOGIN:-mosaicstack}"
- Added
pr-ci-wait.sh: No changes needed — uses curl API calls (not tea), already passes owner/repo correctlydetect-platform.sh: No changes needed — provides theget_repo_owner/get_repo_namefunctions used by wrappers
Verification
vitest run— 8/8 tests passtsc --noEmit— no errors in update-checker.ts (pre-existing workspace dep errors unrelated)eslint— clean, no warnings