Skip to content

chore: declare node>=20 engines floor and document prettier-plugin-svelte workaround#285

Open
dobby-coder[bot] wants to merge 2 commits into
mainfrom
chore/declare-node20-engines-document-prettier-workaround
Open

chore: declare node>=20 engines floor and document prettier-plugin-svelte workaround#285
dobby-coder[bot] wants to merge 2 commits into
mainfrom
chore/declare-node20-engines-document-prettier-workaround

Conversation

@dobby-coder

@dobby-coder dobby-coder Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Non-blocking follow-up from merged #234. Closes #235.

Changes

1. Declare the implicit Node 20 floor (package.json)

prettier-plugin-svelte@4.0.0 raised its own engines.node to >=20, so the repo carried an undocumented Node 20 floor. Added a top-level "engines": { "node": ">=20" } so a contributor on Node 18 gets a clear EBADENGINE signal instead of silence.

2. Document the prettier-plugin-svelte workaround (SendButton.svelte)

totalProgress is a script-level $derived rather than an inline {@const} ternary specifically to dodge an upstream prettier-plugin-svelte crash on a ternary with a BinaryExpression test inside {@const}. Added a short comment linking the upstream tracking issue — sveltejs/prettier-plugin-svelte#528 (found existing, no external issue filed) — so the workaround can be retired once the fix is confirmed in the pinned plugin version.

Out of scope (per issue)

  • The two already-resolved SendButton.svelte inline review threads.
  • The "no automated test for the rewrite" note.

Verification

  • npm run check → 0 errors, 0 warnings
  • npm run build → ✓ built
  • npx prettier --check on both edited files → clean

🤖 Generated with Claude Code

dobby-coder Bot and others added 2 commits June 29, 2026 07:47
…elte workaround

prettier-plugin-svelte@4.0.0 raised its own engines.node to >=20, giving
the repo an undocumented Node 20 floor. Add a top-level engines field so a
contributor on Node 18 gets a clear EBADENGINE signal.

Also document why totalProgress in SendButton.svelte is a script-level
$derived rather than an inline {@const} ternary, linking the upstream bug
(sveltejs/prettier-plugin-svelte#528) so the workaround can be retired.

Closes #235

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The pinned prettier-plugin-svelte@^4.0.1 already contains the #528 fix,
so reword the comment to state that explicitly rather than implying the
fix is not yet in the pinned version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

chore: follow-up from PR #234 — chore: bump prettier-plugin-svelte 3.5.2 -> 4.0.0

0 participants