Skip to content

Commit

Permalink
feat(core): add support for ESM via gen-esm-wrapper
Browse files Browse the repository at this point in the history
Closes #1010
  • Loading branch information
B4nan committed Apr 17, 2021
1 parent ff280bc commit aa71065
Show file tree
Hide file tree
Showing 15 changed files with 159 additions and 16 deletions.
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,15 @@
"semanticCommits": "enabled",
"packageRules": [
{
"depTypeList": ["devDependencies"],
"depTypeList": [
"devDependencies"
],
"automerge": true
}
],
"schedule": ["every weekday"]
"schedule": [
"every weekday"
]
},
"engines": {
"node": ">= 12.17.0 || >= 13.10.0"
Expand All @@ -121,6 +125,7 @@
"eslint": "7.24.0",
"eslint-plugin-jsdoc": "32.3.0",
"fs-extra": "9.1.0",
"gen-esm-wrapper": "^1.1.1",
"husky": "6.0.0",
"jest": "26.6.3",
"lerna": "4.0.0",
Expand Down
10 changes: 9 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -38,10 +45,11 @@
"mikro-orm": "./dist/cli.js"
},
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/entity-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/knex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/mariadb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/migrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/mikro-orm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/mongodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/mysql-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/mysql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/postgresql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/reflection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
10 changes: 9 additions & 1 deletion packages/sqlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"version": "4.5.3",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
Expand Down Expand Up @@ -35,10 +42,11 @@
},
"homepage": "https://mikro-orm.io",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.17.0 || >= 13.10.0"
},
"scripts": {
"build": "yarn clean && yarn compile && yarn copy",
"postbuild": "yarn gen-esm-wrapper dist/index.js dist/index.mjs",
"clean": "rimraf ./dist",
"compile": "tsc -p tsconfig.build.json",
"copy": "ts-node -T ../../scripts/copy.ts"
Expand Down
Loading

0 comments on commit aa71065

Please sign in to comment.