Modernize library: ESM, SWC, TypeORM 0.3+, 100% test coverage - #6
Open
tankist wants to merge 10 commits into
Open
Modernize library: ESM, SWC, TypeORM 0.3+, 100% test coverage#6tankist wants to merge 10 commits into
tankist wants to merge 10 commits into
Conversation
- Removed custom in-memory cache implementation. - Added `eslint.config.mjs` for enhanced linting rules and Prettier integration. - Upgraded `node` version to 22 in `.node-version`. - Updated `package-lock.json` with new dependencies, including TypeScript 6.x and ESLint upgrades.
- Introduced `.circleci/config.yml` to set up CI workflows. - Added jobs for testing across multiple Node.js versions. - Automated npm publishing on tagged releases.
- Updated `.github/workflows/publish.yml` to use Node.js 24. - Adjusted `.circleci/config.yml` Node.js matrix and Docker image to include Node.js 24.15. - Modified `.github/workflows/ci.yml` to add Node.js 24 to the test matrix.
- Replaced `ts-jest` with `@swc/jest` for improved performance. - Removed `ts-jest` and its dependencies from `package.json` and `package-lock.json`. - Added `@swc/core` and `@swc/jest` as dev dependencies. - Updated test scripts in `package.json` to drop `NODE_OPTIONS` flags.
- Updated `.node-version` to use Node.js 24. - Adjusted `tsconfig.build.json` to use `emitDeclarationOnly` for faster builds. - Added `.swcrc` configuration to enable SWC compilation. - Updated `package-lock.json` with new dependencies, including SWC tools and other adjacency.
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
Complete rewrite and modernization of
typeorm-in-memory-cacheto bring it up to current ecosystem standards.Changes
Module system
"type": "module")export class InMemoryCacheProviderinstead ofexport default— named export for better tree-shakingDependencies
node-cachewith@cacheable/node-cachetypeormpeer dependency to>=0.3.0QueryResultCacheinterface implementation with optionalqueryRunnerparameters (TypeORM 0.3.x requirement)Build
tsc --emitDeclarationOnlyfor.d.tsgenerationNodeNextmodule resolution,verbatimModuleSyntaxTests
@swc/jesttransformerLinting & formatting
eslint.config.mjs)typescript-eslintstrict + stylistic type-checked rulesCI/CD
Infrastructure
src/, tests in__tests__/.vscode/, updated.node-version,.gitignoreMigration from 1.x
The API is fully backward-compatible — only the import syntax changes.
Test plan
npm run typecheck— passesnpm run lint— passes (0 errors)npm run build— passesnpm test— 25/25 tests pass, 100% coverage