TypeORM 0.3
Last reviewed Sep 23, 2026
Prompt Details
Prompt Composition
4prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- TypeScript 5.940 lines · 1.2K tokens
- TypeORM 0.387 lines · 3.4K tokens
Total330 lines · 13K tokens
CWE Coverage
- 15
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 94
- 95
- 113
- 117
- 200
- 201
- 208
- 209
- 214
- 250
- 295
- 297
- 319
- 323
- 330
- 338
- 346
- 347
- 352
- 354
- 362
- 367
- 377
- 426
- 444
- 459
- 471
- 488
- 494
- 502
- 524
- 532
- 602
- 639
- 653
- 732
- 770
- 772
- 807
- 829
- 838
- 862
- 863
- 908
- 915
- 916
- 918
- 922
- 942
- 943
- 1004
- 1321
- 1333
Prompt Preview
Apply the Node.js 24, TypeScript 5.9, and JavaScript ES2026 prompts first. These rules target TypeORM 0.3 on Node.js, including the application and migration CLI, and were checked against typeorm@0.3.31. Use the 0.3 API behavior and defaults when applying these rules.
Version scope and data source configuration
- Run the application and the migration CLI from the same locked
typeorminstall, for example through apackage.jsonscript that calls the project's owntypeormbinary, and upgrade them together; never generate or run migrations with a globally or separately installed CLI, or one thatnpxdownloads because the local install is missing. - Verify behavior against the 0.3 documentation and tagged source; 1.x null-handling defaults and relation lifecycle changes do not apply to this version.
- Keep
synchronize,dropSchema, andmigrationsRunfalse in application data sources outside disposable local databases. - Set Postgres
installExtensions: falseand provision required extensions through a separate migration identity; keep schema-altering and superuser privileges off the runtime role. - Build
DataSourceoptions from trusted configuration. Loadentities,migrations, andsubscribersfrom explicit imports or deployment-controlled directories; glob matches and CLI-dfiles load executable code. - For decorator-based entities, import
reflect-metadatabefore loading them and compile withexperimentalDecoratorsandemitDecoratorMetadata; entity decorators do not perform request validation.