Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: feat: add esm version #216

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ plugin/*/test/fixtures/**/run
plugin/*/test/fixtures/**/oneapi
plugin/*/test/fixtures/**/logs
benchmark
scripts
!plugin/tegg-compatible/typings/index.d.ts
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ yarn.lock
*clinic-doctor*
.nyc_output/
dist
esm

**/*.js
**/*.d.ts
Expand All @@ -44,4 +45,5 @@ plugin/tegg/test/fixtures/apps/**/*.js
!standalone/standalone/test/fixtures/**/node_modules/**/*.js
!plugin/tegg/test/fixtures/**/node_modules
!plugin/config/test/fixtures/**/node_modules
!scripts/**/*.js
.node
12 changes: 8 additions & 4 deletions core/ajv-decorator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@
"main": "dist/index.js",
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
"dist/**/*.d.ts",
"esm/**/*.js",
"esm/**/*.d.ts"
],
"typings": "dist/index.d.ts",
"scripts": {
"test": "cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha",
"clean": "tsc -b --clean",
"clean": "tsc -b --clean && npm run clean:esm",
"clean:esm": "node ../../scripts/clean-esm.js",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"tsc:esm": "npm run clean:esm && node ../../scripts/build-esm.js &&tsc -p ./tsconfig.esm.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json && npm run tsc:esm",
"prepublishOnly": "npm run tsc:pub"
},
"license": "MIT",
Expand Down Expand Up @@ -50,4 +54,4 @@
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
}
}
}
16 changes: 16 additions & 0 deletions core/ajv-decorator/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"moduleResolution": "node",
"module": "ES2020",
"target": "ESNext",
"outDir": "esm",
"baseUrl": "./"
},
"exclude": [
"dist",
"node_modules",
"test",
"esm"
]
}
3 changes: 2 additions & 1 deletion core/ajv-decorator/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exclude": [
"dist",
"node_modules",
"test"
"test",
"esm"
]
}
3 changes: 2 additions & 1 deletion core/ajv-decorator/tsconfig.pub.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exclude": [
"dist",
"node_modules",
"test"
"test",
"esm"
]
}
12 changes: 8 additions & 4 deletions core/aop-decorator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
},
"scripts": {
"test": "cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha",
"clean": "tsc -b --clean",
"clean": "tsc -b --clean && npm run clean:esm",
"clean:esm": "node ../../scripts/clean-esm.js",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"tsc:esm": "npm run clean:esm && node ../../scripts/build-esm.js &&tsc -p ./tsconfig.esm.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json && npm run tsc:esm",
"prepublishOnly": "npm run tsc:pub"
},
"publishConfig": {
Expand All @@ -38,7 +40,9 @@
"main": "dist/index.js",
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
"dist/**/*.d.ts",
"esm/**/*.js",
"esm/**/*.d.ts"
],
"bugs": {
"url": "https://github.com/eggjs/tegg/issues"
Expand All @@ -51,4 +55,4 @@
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
}
}
}
16 changes: 16 additions & 0 deletions core/aop-decorator/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"moduleResolution": "node",
"module": "ES2020",
"target": "ESNext",
"outDir": "esm",
"baseUrl": "./"
},
"exclude": [
"dist",
"node_modules",
"test",
"esm"
]
}
3 changes: 2 additions & 1 deletion core/aop-decorator/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exclude": [
"dist",
"node_modules",
"test"
"test",
"esm"
]
}
3 changes: 2 additions & 1 deletion core/aop-decorator/tsconfig.pub.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exclude": [
"dist",
"node_modules",
"test"
"test",
"esm"
]
}
12 changes: 8 additions & 4 deletions core/aop-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
},
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
"dist/**/*.d.ts",
"esm/**/*.js",
"esm/**/*.d.ts"
],
"typings": "dist/index.d.ts",
"keywords": [
Expand All @@ -20,9 +22,11 @@
],
"scripts": {
"test": "cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha",
"clean": "tsc -b --clean && rm -rf dist",
"clean": "tsc -b --clean && rm -rf dist && npm run clean:esm",
"clean:esm": "node ../../scripts/clean-esm.js",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"tsc:esm": "npm run clean:esm && node ../../scripts/build-esm.js &&tsc -p ./tsconfig.esm.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json && npm run tsc:esm",
"prepublishOnly": "npm run tsc:pub"
},
"author": "killagu <killa123@126.com>",
Expand Down Expand Up @@ -63,4 +67,4 @@
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
}
}
}
16 changes: 16 additions & 0 deletions core/aop-runtime/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"moduleResolution": "node",
"module": "ES2020",
"target": "ESNext",
"outDir": "esm",
"baseUrl": "./"
},
"exclude": [
"dist",
"node_modules",
"test",
"esm"
]
}
3 changes: 2 additions & 1 deletion core/aop-runtime/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exclude": [
"dist",
"node_modules",
"test"
"test",
"esm"
]
}
3 changes: 2 additions & 1 deletion core/aop-runtime/tsconfig.pub.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exclude": [
"dist",
"node_modules",
"test"
"test",
"esm"
]
}
12 changes: 8 additions & 4 deletions core/background-task/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@
"main": "dist/index.js",
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
"dist/**/*.d.ts",
"esm/**/*.js",
"esm/**/*.d.ts"
],
"typings": "dist/index.d.ts",
"scripts": {
"test": "cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha",
"clean": "tsc -b --clean",
"clean": "tsc -b --clean && npm run clean:esm",
"clean:esm": "node ../../scripts/clean-esm.js",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"tsc:esm": "npm run clean:esm && node ../../scripts/build-esm.js &&tsc -p ./tsconfig.esm.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json && npm run tsc:esm",
"prepublishOnly": "npm run tsc:pub"
},
"homepage": "https://github.com/eggjs/tegg",
Expand Down Expand Up @@ -55,4 +59,4 @@
"publishConfig": {
"access": "public"
}
}
}
16 changes: 16 additions & 0 deletions core/background-task/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"moduleResolution": "node",
"module": "ES2020",
"target": "ESNext",
"outDir": "esm",
"baseUrl": "./"
},
"exclude": [
"dist",
"node_modules",
"test",
"esm"
]
}
3 changes: 2 additions & 1 deletion core/background-task/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exclude": [
"dist",
"node_modules",
"test"
"test",
"esm"
]
}
3 changes: 2 additions & 1 deletion core/background-task/tsconfig.pub.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exclude": [
"dist",
"node_modules",
"test"
"test",
"esm"
]
}
12 changes: 8 additions & 4 deletions core/common-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
"main": "dist/index.js",
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
"dist/**/*.d.ts",
"esm/**/*.js",
"esm/**/*.d.ts"
],
"typings": "dist/index.d.ts",
"scripts": {
"test": "cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha",
"clean": "tsc -b --clean",
"clean": "tsc -b --clean && npm run clean:esm",
"clean:esm": "node ../../scripts/clean-esm.js",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"tsc:esm": "npm run clean:esm && node ../../scripts/build-esm.js &&tsc -p ./tsconfig.esm.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json && npm run tsc:esm",
"prepublishOnly": "npm run tsc:pub"
},
"author": "killagu <killa123@126.com>",
Expand Down Expand Up @@ -52,4 +56,4 @@
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
}
}
}
16 changes: 16 additions & 0 deletions core/common-util/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"moduleResolution": "node",
"module": "ES2020",
"target": "ESNext",
"outDir": "esm",
"baseUrl": "./"
},
"exclude": [
"dist",
"node_modules",
"test",
"esm"
]
}
3 changes: 2 additions & 1 deletion core/common-util/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exclude": [
"dist",
"node_modules",
"test"
"test",
"esm"
]
}
3 changes: 2 additions & 1 deletion core/common-util/tsconfig.pub.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exclude": [
"dist",
"node_modules",
"test"
"test",
"esm"
]
}
12 changes: 8 additions & 4 deletions core/controller-decorator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@
"main": "dist/index.js",
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
"dist/**/*.d.ts",
"esm/**/*.js",
"esm/**/*.d.ts"
],
"typings": "dist/index.d.ts",
"scripts": {
"test": "cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha",
"clean": "tsc -b --clean",
"clean": "tsc -b --clean && npm run clean:esm",
"clean:esm": "node ../../scripts/clean-esm.js",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"tsc:esm": "npm run clean:esm && node ../../scripts/build-esm.js &&tsc -p ./tsconfig.esm.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json && npm run tsc:esm",
"prepublishOnly": "npm run tsc:pub"
},
"author": "killagu <killa123@126.com>",
Expand Down Expand Up @@ -57,4 +61,4 @@
"publishConfig": {
"access": "public"
}
}
}
16 changes: 16 additions & 0 deletions core/controller-decorator/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"moduleResolution": "node",
"module": "ES2020",
"target": "ESNext",
"outDir": "esm",
"baseUrl": "./"
},
"exclude": [
"dist",
"node_modules",
"test",
"esm"
]
}
Loading