Skip to content

chore(deps): move to @antelopejs/dms-frontend 0.3.0 - #22

Open
alessaloisio wants to merge 1 commit into
mainfrom
chore/dms-frontend-0.3
Open

alessaloisio wants to merge 1 commit into
mainfrom
chore/dms-frontend-0.3

Conversation

@alessaloisio

Copy link
Copy Markdown
Contributor

Summary

@antelopejs/dms-frontend 0.3.0 removes the useColorMode shim (AntelopeJS/dms-frontend#43, breaking).

This PR moves the repo to renderer 0.3.0 and raises every selector of @antelopejs/dms to ≥ 0.4.3, so renderer 0.3.0 can only be combined with a dms that no longer uses the shim. A type: "package" module source is resolved against the registry at startup, but offline the core falls back to any cached version the range still allows, so >=0.4.0 could serve a cached 0.4.0–0.4.2.

Changes

  • playground/antelope.config.ts: version: ">=0.4.0 <1.0.0", → version: ">=0.4.3 <1.0.0",
  • playground/package.json: "@antelopejs/dms": ">=0.4.0 <1.0.0", → "@antelopejs/dms": ">=0.4.3 <1.0.0",
  • playground/package.json: "@antelopejs/dms-frontend": "0.2.6", → "@antelopejs/dms-frontend": "0.3.0",
  • src/test/harness.ts: version: ">=0.4.0 <1.0.0", → version: ">=0.4.3 <1.0.0",
  • playground/pnpm-lock.yaml: resolved to dms-frontend 0.3.0 (and dms 0.4.3 where it is locked)

Related issue

Tracked in AntelopeJS/dms-frontend#45 (goal, compatibility matrix, all PRs and follow-ups). Follows AntelopeJS/dms-frontend#43 (shim removal, v0.3.0), AntelopeJS/dms#56 (dms 0.4.3) and AntelopeJS/dms#55 (color-mode rollout).

Verification

  • 9/9 checks exit 0.
  • Playground SSR (/auth/login): dark → class="dark", light → class="light", no cookie → no color class; exactly one script#dms-color-mode. Backend and frontend started cleanly.

How to test

  1. pnpm install, then the repo's lint, typecheck and test scripts. See Verification for the expected exit codes.
  2. Start the playground (backend, then frontend), and wait for .antelope/dev.json and "Server ready".
  3. Check the color mode through SSR, no login needed:
    • curl -s -H 'Cookie: dms-color-mode=%22dark%22' http://localhost:3001/auth/login | grep -o '<html[^>]*>' contains class="dark";
    • with %22light%22: class="light"; with no cookie: no color class;
    • the HTML contains exactly one <script id="dms-color-mode".
  4. Logged in, Settings › Appearance: pick Dark / Light / System and reload; the right option stays selected with no hydration warning.

Merge order

Independent of the other repos' PRs, so any order works. Its prerequisites are already released: dms-frontend 0.3.0, @antelopejs/dms 0.4.3 and @antelopejs/dms-database 0.0.9. It only changes dependency floors, playground and test configuration, so it needs no release of its own unless the repo publishes its playground or test harness.

Checklist

  • The pull request title follows Conventional Commits.
  • I added or updated tests when behavior changed. (Dependency floors only.)
  • I updated documentation when users or contributors are affected. (Not affected.)
  • I documented breaking changes and migration steps. (None for this repo; the breaking change is in dms-frontend 0.3.0.)
  • I did not include credentials or unrelated changes.

@antelopejs/dms-frontend 0.3.0 removes the useColorMode shim
(AntelopeJS/dms-frontend#43). @antelopejs/dms 0.4.2 and earlier still
call it from Settings > Appearance, which fails with "useColorMode is
not defined" on the new renderer. dms 0.4.3 (AntelopeJS/dms#56) keeps
the preference in its own dms-color-mode cookie, renders the color
class on the server and requires dms-frontend 0.2.8 or later. This
module's own query builder imports useColorMode from @vueuse/core since
0.0.9 (#21), so it no longer depends on the shim either.

Pin dms-frontend 0.3.0 in the playground and raise the @antelopejs/dms
minimum to 0.4.3 everywhere this repository selects it, so the new
renderer can no longer be paired with a dms that calls the removed
shim:
- the playground dependency;
- the dms module source in playground/antelope.config.ts, which the
  core resolves against the registry at startup and, when offline,
  falls back to any cached version the range still allows;
- the test harness module source, kept on the same floor as the
  playground.

The playground loads this module from the local checkout, so no
dms-database range needs raising here. The playground lockfile moves
dms 0.4.0 -> 0.4.3 and dms-frontend 0.2.6 -> 0.3.0.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant