Changelog
All notable changes to @ackplus/nest-seeder. The format follows Keep a Changelog and Semantic Versioning.
2.1.0 — 2026-06-15
Added
--project/-pflag (andTS_NODE_PROJECTenv var) to point the CLI's ts-node at your owntsconfig.jsonwhen loading.tsconfig files and entities.
Changed
- The CLI's ts-node default is now
strict: true(wasstrict: false). WithstrictNullChecksoff, some TypeScript versions emitdesign:type = Objectfor string-literal-union columns, which makes TypeORM throwDataTypeNotSupportedErroron Postgres/MySQL. See Troubleshooting. Override with--project/TS_NODE_PROJECT.
Notes
- The version-independent fix is to give enum/union columns an explicit column type (
@Column({ type: 'varchar' })) so TypeORM never relies on reflect-metadata inference.
2.0.0 — 2026-06-15
A focused redesign that keeps the proven core (@Factory, Seeder, DataFactory) while overhauling the CLI, configuration ergonomics, packaging, and documentation. See the Migration Guide for upgrade steps.
Added
nest-seed init— scaffolds aseeder.config.ts, a factory, and a seeder (--orm typeorm|mongoose,--force).nest-seed list— lists registered seeders and their--namealiases.- Config auto-discovery — finds
seeder.config.{ts,js,cjs,mjs}automatically;--configis now optional. --dry-run— preview which seeders would run without writing data.--continue-on-error— keep going when a seeder throws.--context <json>— forward arbitrary JSON to every seeder viaoptions.context.@SeederName('name')decorator andgetSeederName()for stable, minification-safe names.defineSeederConfig()— a typed identity helper forseeder.config.ts.DataFactory.generateOne()convenience method.- Factory inheritance — a factory that
extendsa base inherits its@Factoryproperties. - Dual ESM + CJS build with an
exportsmap and full TypeScript declarations. - Unit test suite for the library.
- This documentation site (VitePress), plus a migration guide and changelog.
Changed
- CLI rewritten with subcommands (
run/init/list) and clearer output. - Logging uses the NestJS
Loggerinstead of rawconsole.*. - Refresh drops seeders in reverse order (foreign-key safe) before reseeding.
drop()is optional on theSeederinterface.- Factory overrides always appear in the record — including non-
@Factorykeys (e.g. a foreign key). dependsOnis resolved transitively and order-independently.- Build tooling switched to
tsup. Node>= 18required. --dummyDatarenamed to--dummy-data(options.dummyDatastill delivered, deprecated).
Fixed
- Overrides for non-decorated properties were dropped, causing
NOT NULLfailures when seeding relationships. - Transitive
dependsOnchains were not fully resolved. - Generated property order was reversed relative to declaration order.
- Seeder selection mutated the shared options object in place.
Removed
- The bundled
examples/directory — replaced by this site and the runnable example app. - Deep imports of internal files (
@ackplus/nest-seeder/dist/lib/...); import from the package root.
1.1.16 — 2026-01-04
- Last release of the v1 line. Iterative fixes and packaging tweaks across the
1.1.xseries.