chore: migrate to pnpm, oxlint/oxfmt and vitest - #25
Merged
Conversation
Replace npm with pnpm, biome with oxlint + oxfmt, and jest with vitest. vitest.config.js keeps globals on, because the tests were written for jest and use describe/it/expect without importing them; rewriting them to change runners would be noise. File parallelism is off: the tests boot fastify and share one instance per file. .npmrc goes away with jest. It only carried node-options for jest's ESM support, an npm setting pnpm does not apply to scripts anyway. The image still starts through bin/start.sh and listens on 3000, which is what docker_basics_course builds its examples on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The existing main and pull_request workflows are kept: they build and test through docker compose and publish the images, which a generic Node CI would not cover. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Pure formatting, no behaviour change. Co-Authored-By: Claude Opus 5 (1M context) <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.
The most course-entangled repository in the organisation:
docker_basics_coursereferences it in eight lessons.vitest.config.jskeepsglobalson: the tests were written for jest and usedescribe/it/expectwithout importing them, and rewriting them to change runners would be noise. File parallelism is off — the tests boot fastify and share one instance per file..npmrcgoes with jest. It only carriednode-optionsfor jest's ESM support, an npm setting pnpm does not apply to scripts anyway.mainandpull_requestworkflows are kept: they build and test through docker compose and publish the images, which a generic Node CI would not cover.Verified against the course scenario, not just the test suite: the image builds,
docker run -p 8080:3000 -e SERVER_MESSAGE="Hexlet Awesome Server"serves the page on 3000 with that message, exactly as300-applicationdescribes.One pre-existing drift worth knowing, unrelated to this PR:
300-application/README.mdquotes startup output asnpm startwithfastify start ... -P. The image has since runbin/start.shdirectly with-o, so that transcript was already stale.