-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Description
Issue description
Generated JS migrations in modern ESM format
See also: https://nodejs.org/api/esm.html
ECMAScript modules are the official standard format to package JavaScript code for reuse. Modules are defined using a variety of import and export statements.
Expected Behavior
Generate ESM JS migrations, with import/export
So the migration works in a ESM codebase.
Actual Behavior
Generate CommonJS JS migrations
So migrations dont work now in a ESM codebase.
Steps to reproduce
Add "type": "module", to your package.json
Generate migrations with cli with the -o
My Environment
| Dependency | Version |
|---|---|
| Operating System | |
| Node.js version | 20.11.1 |
| Typescript version | 5.4.3 |
| TypeORM version | 0.3.20 |
Additional Context
No response
Relevant Database Driver(s)
- aurora-mysql
- aurora-postgres
- better-sqlite3
- cockroachdb
- cordova
- expo
- mongodb
- mysql
- nativescript
- oracle
- postgres
- react-native
- sap
- spanner
- sqlite
- sqlite-abstract
- sqljs
- sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
phosmium, pieterwigboldus-visma, EpeusJS, cjnoname, jochemd and 1 more