Skip to content

Commit

Permalink
feat: add esm version
Browse files Browse the repository at this point in the history
  • Loading branch information
akitaSummer committed Apr 19, 2024
1 parent 68c1a9c commit a105355
Show file tree
Hide file tree
Showing 120 changed files with 937 additions and 96 deletions.
3 changes: 3 additions & 0 deletions core/ajv-decorator/esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
19 changes: 17 additions & 2 deletions core/ajv-decorator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@
"ajv"
],
"main": "dist/index.js",
"module": "esm/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",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json && tsc -p ./tsconfig.esm.json",
"prepublishOnly": "npm run tsc:pub"
},
"license": "MIT",
Expand Down Expand Up @@ -49,5 +52,17 @@
"mocha": "^10.2.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
},
"exports": {
".": {
"import": {
"types": "./esm/index.d.ts",
"default": "./esm/index.js"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
}
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": "Bundler",
"module": "ESNext",
"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"
]
}
3 changes: 3 additions & 0 deletions core/aop-decorator/esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
19 changes: 17 additions & 2 deletions core/aop-decorator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"test": "cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha",
"clean": "tsc -b --clean",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json && tsc -p ./tsconfig.esm.json",
"prepublishOnly": "npm run tsc:pub"
},
"publishConfig": {
Expand All @@ -36,9 +36,12 @@
},
"license": "MIT",
"main": "dist/index.js",
"module": "esm/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 @@ -50,5 +53,17 @@
"mocha": "^10.2.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
},
"exports": {
".": {
"import": {
"types": "./esm/index.d.ts",
"default": "./esm/index.js"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
}
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": "Bundler",
"module": "ESNext",
"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"
]
}
3 changes: 3 additions & 0 deletions core/aop-runtime/esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
19 changes: 17 additions & 2 deletions core/aop-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
},
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
"dist/**/*.d.ts",
"esm/**/*.js",
"esm/**/*.d.ts"
],
"typings": "dist/index.d.ts",
"module": "esm/index.js",
"keywords": [
"egg",
"typescript",
Expand All @@ -22,7 +25,7 @@
"test": "cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha",
"clean": "tsc -b --clean && rm -rf dist",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json && tsc -p ./tsconfig.esm.json",
"prepublishOnly": "npm run tsc:pub"
},
"author": "killagu <[email protected]>",
Expand Down Expand Up @@ -62,5 +65,17 @@
"mocha": "^10.2.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
},
"exports": {
".": {
"import": {
"types": "./esm/index.d.ts",
"default": "./esm/index.js"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
}
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": "Bundler",
"module": "ESNext",
"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"
]
}
3 changes: 3 additions & 0 deletions core/background-task/esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
19 changes: 17 additions & 2 deletions core/background-task/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@
"tegg"
],
"main": "dist/index.js",
"module": "esm/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",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json && tsc -p ./tsconfig.esm.json",
"prepublishOnly": "npm run tsc:pub"
},
"homepage": "https://github.com/eggjs/tegg",
Expand Down Expand Up @@ -54,5 +57,17 @@
},
"publishConfig": {
"access": "public"
},
"exports": {
".": {
"import": {
"types": "./esm/index.d.ts",
"default": "./esm/index.js"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
}
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": "Bundler",
"module": "ESNext",
"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"
]
}
3 changes: 3 additions & 0 deletions core/common-util/esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
19 changes: 17 additions & 2 deletions core/common-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@
"tegg"
],
"main": "dist/index.js",
"module": "esm/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",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json && tsc -p ./tsconfig.esm.json",
"prepublishOnly": "npm run tsc:pub"
},
"author": "killagu <[email protected]>",
Expand Down Expand Up @@ -51,5 +54,17 @@
"mocha": "^10.2.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
},
"exports": {
".": {
"import": {
"types": "./esm/index.d.ts",
"default": "./esm/index.js"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
}
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": "Bundler",
"module": "ESNext",
"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"
]
}
Loading

0 comments on commit a105355

Please sign in to comment.