chore: declare node>=20 engines floor and document prettier-plugin-svelte workaround#285
Open
dobby-coder[bot] wants to merge 2 commits into
Open
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Non-blocking follow-up from merged #234. Closes #235.
Changes
1. Declare the implicit Node 20 floor (
package.json)prettier-plugin-svelte@4.0.0raised its ownengines.nodeto>=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 clearEBADENGINEsignal instead of silence.2. Document the prettier-plugin-svelte workaround (
SendButton.svelte)totalProgressis a script-level$derivedrather than an inline{@const}ternary specifically to dodge an upstream prettier-plugin-svelte crash on a ternary with aBinaryExpressiontest 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)
SendButton.svelteinline review threads.Verification
npm run check→ 0 errors, 0 warningsnpm run build→ ✓ builtnpx prettier --checkon both edited files → clean🤖 Generated with Claude Code