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

chore: support esm and commonjs #128

Closed
wants to merge 4 commits into from
Closed
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
8 changes: 8 additions & 0 deletions packages/farrow-api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.11",
"description": "A type-friendly BFF framework",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"scripts": {
"build": "tsc -b",
"test": "jest",
Expand Down
8 changes: 8 additions & 0 deletions packages/farrow-api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.9",
"description": "A type-friendly BFF framework",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"scripts": {
"build": "tsc -b",
"test": "jest",
Expand Down
23 changes: 23 additions & 0 deletions packages/farrow-api-server/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES2020",
"target": "ES2018",
"outDir": "./esm"
},
"references": [
{
"path": "../farrow-schema/tsconfig.json"
},
{
"path": "../farrow-api/tsconfig.json"
},
{
"path": "../farrow-http/tsconfig.json"
},
{
"path": "../farrow-pipeline/tsconfig.json"
}
],
"include": ["src"]
}
8 changes: 8 additions & 0 deletions packages/farrow-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.9",
"description": "A type-friendly BFF framework",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"scripts": {
"build": "tsc -b",
"test": "jest",
Expand Down
17 changes: 17 additions & 0 deletions packages/farrow-api/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES2020",
"target": "ES2018",
"outDir": "./esm"
},
"references": [
{
"path": "../farrow-schema/tsconfig.json"
},
{
"path": "../farrow-pipeline/tsconfig.json"
}
],
"include": ["src"]
}
8 changes: 8 additions & 0 deletions packages/farrow-cors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.9",
"description": "Cross-Origin Resource Sharing(CORS) for farrow-http",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"files": [
"dist",
"src"
Expand Down
17 changes: 17 additions & 0 deletions packages/farrow-cors/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES2020",
"target": "ES2018",
"outDir": "./esm"
},
"references": [
{
"path": "../farrow-http/tsconfig.json"
},
{
"path": "../farrow-pipeline/tsconfig.json"
}
],
"include": ["src"]
}
8 changes: 8 additions & 0 deletions packages/farrow-deno-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.9",
"description": "A Type-Friendly Web Framework",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"files": [
"dist",
"src"
Expand Down
23 changes: 23 additions & 0 deletions packages/farrow-deno-api/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES2020",
"target": "ES2018",
"outDir": "./esm"
},
"references": [
{
"path": "../farrow-api/tsconfig.json"
},
{
"path": "../farrow-schema/tsconfig.json"
},
{
"path": "../farrow-http/tsconfig.json"
},
{
"path": "../farrow-api-server/tsconfig.json"
}
],
"include": ["src"]
}
8 changes: 8 additions & 0 deletions packages/farrow-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.9",
"description": "A Type-Friendly Web Framework",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"files": [
"dist",
"src"
Expand Down
17 changes: 17 additions & 0 deletions packages/farrow-express/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES2020",
"target": "ES2018",
"outDir": "./esm"
},
"references": [
{
"path": "../farrow-pipeline/tsconfig.json"
},
{
"path": "../farrow-http/tsconfig.json"
}
],
"include": ["src"]
}
8 changes: 8 additions & 0 deletions packages/farrow-federation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.9",
"description": "A Type-Friendly Web Framework",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"files": [
"dist",
"src"
Expand Down
23 changes: 23 additions & 0 deletions packages/farrow-federation/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES2020",
"target": "ES2018",
"outDir": "./esm"
},
"references": [
{
"path": "../farrow-api/tsconfig.json"
},
{
"path": "../farrow-schema/tsconfig.json"
},
{
"path": "../farrow-http/tsconfig.json"
},
{
"path": "../farrow-api-server/tsconfig.json"
}
],
"include": ["src"]
}
8 changes: 8 additions & 0 deletions packages/farrow-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.10",
"description": "A Type-Friendly Web Framework",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"files": [
"dist",
"src"
Expand Down
17 changes: 17 additions & 0 deletions packages/farrow-http/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES2020",
"target": "ES2018",
"outDir": "./esm"
},
"references": [
{
"path": "../farrow-pipeline/tsconfig.json"
},
{
"path": "../farrow-schema/tsconfig.json"
}
],
"include": ["src"]
}
8 changes: 8 additions & 0 deletions packages/farrow-json-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.10",
"description": "A type-friendly BFF framework",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"scripts": {
"build": "pnpm run build:dist && pnpm run build:esm",
"build:dist": "tsc -b ./tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion packages/farrow-json-schema/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"references": [
{
"path": "../farrow-api-server/tsconfig.json"
"path": "../farrow-schema/tsconfig.json"
}
],
"include": ["src"]
Expand Down
8 changes: 8 additions & 0 deletions packages/farrow-koa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.9",
"description": "A Type-Friendly Web Framework",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"files": [
"dist",
"src"
Expand Down
17 changes: 17 additions & 0 deletions packages/farrow-koa/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES2020",
"target": "ES2018",
"outDir": "./esm"
},
"references": [
{
"path": "../farrow-pipeline/tsconfig.json"
},
{
"path": "../farrow-http/tsconfig.json"
}
],
"include": ["src"]
}
8 changes: 8 additions & 0 deletions packages/farrow-module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.7",
"description": "A module abstraction providing dependencies management",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"files": [
"src",
"dist",
Expand Down
8 changes: 8 additions & 0 deletions packages/farrow-next-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.9",
"description": "A next.js adapter for farrow-http",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"files": [
"src",
"dist"
Expand Down
20 changes: 20 additions & 0 deletions packages/farrow-next-server/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES2020",
"target": "ES2018",
"outDir": "./esm"
},
"references": [
{
"path": "../farrow-http/tsconfig.json"
},
{
"path": "../farrow-pipeline/tsconfig.json"
},
{
"path": "../farrow-schema/tsconfig.json"
}
],
"include": ["src"]
}
8 changes: 8 additions & 0 deletions packages/farrow-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"version": "1.10.8",
"description": "A framework runs on Next.js",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"./dist/*": "./dist/*.js",
"./esm/*": "./dist/*.js"
},
"files": [
"src",
"dist",
Expand Down
Loading