Repository navigation
Suites v4.0.0
v4.0.0 (2026-11-04)
Documentation: https://suites.dev/docs
Suites 4 adds support for Node.js 22, 24, and 26, NestJS 12, and Inversify 8, while retaining NestJS 10/11 and Inversify 7 compatibility. This release replaces postinstall type setup with explicit TypeScript references, updates Jest integration, and retires the unmaintained Sinon adapter. CommonJS and ESM remain supported.
Breaking changes: Upgrade your installed
@suites/*packages together to version 4 and add the type references shown below. Node.js versions below 22, NestJS 8/9, and Inversify 6 are no longer supported.
Breaking Changes
*- Requires Node.js
^22.22.2 || ^24.15.0 || ^26.0.0. Support is limited to these three major lines. (#1098, @omermorad)
- Requires Node.js
unit,doubles.jest,doubles.vitest,types.di- Installation no longer injects or edits type declarations. Add one test-double
/unitreference and one DI/metadatareference to a declaration file included by your test tsconfig.MockedandStubremain available through imports from@suites/unitonce the adapter augmentation is loaded. (#1098)
- Installation no longer injects or edits type declarations. Add one test-double
doubles.jest- Requires matching
jestand@jest/globalsversions satisfying^30.5.2. Jest globals are loaded explicitly for both CommonJS and ESM. (b20daf3)
- Requires matching
di.nestjsdi.inversify- Requires Inversify
^7.0.0 || ^8.0.0. Inversify 7 remains supported. When upgrading from Inversify 6, replaceLazyServiceIdentiferwithLazyServiceIdentifier, replace@targetName(value)with@named(value), and select named mocks with{ named: value }. Use@injectFromBase()for inherited injection metadata. (b9520c8, d79e312) - Constructor parameters using
@named(...)or@tagged(...)need an explicit@inject(Dependency). Plain class-typed parameters without these decorators can still use inferred injection.
- Requires Inversify
doubles.sinon- Sinon support is removed.
@suites/doubles.sinonis no longer discovered and will not receive a version 4 release. Remove it and migrate tests, stub calls, assertions, and type references to the Jest or Vitest adapter. (faa4c4c)
- Sinon support is removed.
Features
di.inversify- Supports symbol properties and combined named/tagged injection metadata. (b9520c8)
di.nestjs,di.inversifytypes.di- Custom DI adapters can augment
IdentifierMetadataRegistryto supply their own metadata type. Without a DI reference, the generic metadata fallback remains available. (e984c0f)
- Custom DI adapters can augment
Migration from Suites 3
Upgrade @suites/unit, your DI adapter, and your test-double adapter to version 4. Upgrade any directly installed Suites core or type packages at the same time.
For NestJS + Jest, create suites.d.ts:
/// <reference types="@suites/doubles.jest/unit" />
/// <reference types="@suites/di.nestjs/metadata" />For Inversify + Vitest:
/// <reference types="@suites/doubles.vitest/unit" />
/// <reference types="@suites/di.inversify/metadata" />Choose the matching references for your combination, and include the file in your test tsconfig. Include exactly one test-double reference and one DI reference per test TypeScript project. Imports continue to come from @suites/unit:
import { TestBed, type Mocked } from '@suites/unit';Enhancements
*- Moves the repository development toolchain to Node.js 26, pnpm 12, and TypeScript 6. (#1098)
- Tests the minimum and current releases of NestJS 10/11/12 and Inversify 7/8 with Jest and Vitest across Node.js 22/24/26, including dedicated NestJS ESM cases: 96 compatibility combinations across 18 E2E jobs. (#1098)
Full Changelog: v3.1.1...v4.0.0