TypeORM 0.3

Last reviewed Sep 23, 2026

Export as PDF

Prompt Details

Prompt Composition

4prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. Node.js 24101 lines · 5.3K tokens
  3. TypeScript 5.940 lines · 1.2K tokens
  4. 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 typeorm install, for example through a package.json script that calls the project's own typeorm binary, and upgrade them together; never generate or run migrations with a globally or separately installed CLI, or one that npx downloads 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, and migrationsRun false in application data sources outside disposable local databases.
  • Set Postgres installExtensions: false and provision required extensions through a separate migration identity; keep schema-altering and superuser privileges off the runtime role.
  • Build DataSource options from trusted configuration. Load entities, migrations, and subscribers from explicit imports or deployment-controlled directories; glob matches and CLI -d files load executable code.
  • For decorator-based entities, import reflect-metadata before loading them and compile with experimentalDecorators and emitDecoratorMetadata; entity decorators do not perform request validation.

Where criteria, null handling, and