Repository navigation
fix: accept fastify 5.x in the static-server logging plugin - #633
Merged
Merged
Conversation
The fastify-simple-logger plugin still declared `fastify: "4.x"` in its
fastify-plugin metadata. static-server moved to fastify 5.x, so the version
check failed at boot and `static-server --logs` exited without serving:
fastify-plugin: fastify-simple-logger - expected '4.x' fastify version,
'5.11.2' is installed
Widen the declared range to 5.x, which is what the package pins.
The package has no test script, so nothing caught this. Verified by hand:
`static-server <dir> --logs` now boots and logs `GET / 200` / `GET /nope 404`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bnTX3dzc8eVeb6Qfm51hv
Merged
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.
Problem
static-server --logshas been broken since the package moved to fastify 5.x. Thefastify-simple-loggerplugin still declaredfastify: "4.x"in itsfastify-pluginmetadata, so the version check failed at boot and the server exited without ever serving:Every other flag works — only
--logsis affected.Fix
One line: widen the declared range to
5.x, matching what the package actually pins.Why it went unnoticed
packages/static-serverhas notestscript and no tests (lerna runstestfor 12 of 14 packages, this is one of the two skipped), so nothing exercised the flag.Verification
Built and ran the real binary:
Before this change the same command printed the version-check error and served nothing. Full
pnpm build+pnpm lintpass.Note for later
Unrelated, but fastify now warns that
disableRequestLogging(used inserver.ts) is deprecated and goes away in fastify 6 — worth handling before that major.🤖 Generated with Claude Code
https://claude.ai/code/session_016bnTX3dzc8eVeb6Qfm51hv