chore: use nodenext module resolution, update CI to Node 22#118
Merged
chore: use nodenext module resolution, update CI to Node 22#118
Conversation
- Switch tsconfig module/moduleResolution to nodenext (fixes type resolution for @mikro-orm/core subpath exports like ./schema) - Update CI matrix to Node 22 only (MikroORM v7 requires >= 22.17.0) - Update lockfile for v7 dependencies Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace jest/ts-jest with vitest + unplugin-swc - Add @swc-node/register and @swc/core - Remove @types/jest, ts-jest, ts-loader, tslint, webpack deps - Add Node 24 to CI matrix - Update test scripts to use vitest Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Enable legacyDecorator + decoratorMetadata in SWC config - Set ReflectMetadataProvider explicitly (no longer default in v7) - Add reflect-metadata as vitest setup file Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
With isolate: false, both test suites share the process. The author
test drops the DB via refresh({ dropDb: true }), so the book test
needs to do the same to recreate it.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each test file creates its own MikroORM instance against the same DB, so they need isolated processes (like jest's default behavior) but sequential execution to avoid conflicts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use tmpfs instead of named volume to ensure fresh MySQL state on every run. Add healthcheck and --wait to ensure MySQL is ready before tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests share the same database, so they need to run sequentially to avoid conflicts. Unlike the realworld example which uses mocked services, these tests use a real MySQL database. Co-Authored-By: Claude Opus 4.6 <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.
Summary
module/moduleResolutiontonodenext— fixes type resolution for@mikro-orm/coresubpath exports (e.g../schema), which causedSqlSchemaGenerator is missing refresh, ensureIndexeserrors>= 22.17.0)Test plan
🤖 Generated with Claude Code