TypeORM 1
Last reviewed Sep 19, 2026
Prompt Details
Prompt Composition
4prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- TypeScript 746 lines · 1.5K tokens
- TypeORM 173 lines · 3.3K tokens
Total322 lines · 13.3K 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
- 681
- 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 7, and JavaScript ES2026 prompts first. These rules target TypeORM 1 and were checked against 1.1.0, which requires Node.js 24.11.0 or later on the 24 line. Apply relational SQL rules to SQL drivers and the MongoDB-specific rules when using MongoRepository.
Runtime and configuration
- Use a maintained Node.js 24 patch meeting TypeORM's minimum and a patched database driver within 1.1.0's peer dependency range. Use
mysql2for MySQL/MariaDB andbetter-sqlite3for Node SQLite; the oldmysqlandsqlite3integrations were removed in v1. - Construct
DataSourceoptions from validated server configuration. Do not rely on automatic.envloading or legacyTYPEORM_*configuration, which v1 removed; explicitly supply the intended database and fail startup if required settings are missing. - Keep
entities,subscribers,migrations, naming strategies, and CLI data-source paths under deployment control. Their classes, module paths, glob matches, and schema expressions are executable configuration; never derive them from request data or scan upload directories. - Review the effective native-driver options in
extra, including overrides of TLS, timeouts, pooling, and logging. TypeORM passes this object to the driver without validating its driver-specific keys or values.
Criteria and authorization
- Preserve
invalidWhereValuesBehavior: { null: "throw", undefined: "throw" }, the 1.1.0 defaults, and useIsNull()for intentional SQL null matching. Do not restore"ignore"to accommodate malformed filters because it removes