Skip to content

Commit

Permalink
refactor(connector): use tsup for building
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun committed Jul 28, 2024
1 parent 8a29943 commit 510f681
Show file tree
Hide file tree
Showing 46 changed files with 332 additions and 1,295 deletions.
46 changes: 46 additions & 0 deletions .changeset/violet-phones-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
"@logto/connector-mock-standard-email": minor
"@logto/connector-logto-social-demo": minor
"@logto/connector-sendgrid-email": minor
"@logto/connector-alipay-native": minor
"@logto/connector-wechat-native": minor
"@logto/connector-dingtalk-web": minor
"@logto/connector-huggingface": minor
"@logto/connector-logto-email": minor
"@logto/connector-mock-social": minor
"@logto/connector-tencent-sms": minor
"@logto/connector-alipay-web": minor
"@logto/connector-aliyun-sms": minor
"@logto/connector-feishu-web": minor
"@logto/connector-mock-email": minor
"@logto/connector-twilio-sms": minor
"@logto/connector-wechat-web": minor
"@logto/connector-aliyun-dm": minor
"@logto/connector-logto-sms": minor
"@logto/connector-facebook": minor
"@logto/connector-mock-sms": minor
"@logto/connector-aws-ses": minor
"@logto/connector-azuread": minor
"@logto/connector-discord": minor
"@logto/connector-mailgun": minor
"@logto/connector-smsaero": minor
"@logto/connector-github": minor
"@logto/connector-google": minor
"@logto/connector-oauth": minor
"@logto/connector-apple": minor
"@logto/connector-kakao": minor
"@logto/connector-naver": minor
"@logto/connector-wecom": minor
"@logto/connector-oidc": minor
"@logto/connector-saml": minor
"@logto/connector-smtp": minor
"@logto/integration-tests": minor
"@logto/schemas": minor
"@logto/core": minor
---

use tsup for building

We've updated some of the packages to use `tsup` for building. This will make the build process faster, and should not affect the functionality of the packages.

Use minor version bump to catch your attention.
3 changes: 1 addition & 2 deletions packages/connectors/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# generated files
/*/tsconfig.*
/*/rollup.config.*
/*/vitest.config.*
/*/*.config.*

# keep templates
!/templates/**
12 changes: 3 additions & 9 deletions packages/connectors/connector-alipay-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@shopify/jest-koa-mocks": "^5.0.0",
"@silverhand/eslint-config": "6.0.1",
"@silverhand/ts-config": "6.0.0",
Expand All @@ -27,9 +23,8 @@
"lint-staged": "^15.0.2",
"nock": "^13.3.1",
"prettier": "^3.0.0",
"rollup": "^4.12.0",
"rollup-plugin-output-size": "^1.3.0",
"supertest": "^7.0.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vitest": "^2.0.0"
},
Expand All @@ -46,9 +41,8 @@
],
"scripts": {
"precommit": "lint-staged",
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test": "vitest src",
Expand Down
12 changes: 3 additions & 9 deletions packages/connectors/connector-alipay-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@shopify/jest-koa-mocks": "^5.0.0",
"@silverhand/eslint-config": "6.0.1",
"@silverhand/ts-config": "6.0.0",
Expand All @@ -26,9 +22,8 @@
"lint-staged": "^15.0.2",
"nock": "^13.3.1",
"prettier": "^3.0.0",
"rollup": "^4.12.0",
"rollup-plugin-output-size": "^1.3.0",
"supertest": "^7.0.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vitest": "^2.0.0"
},
Expand All @@ -45,9 +40,8 @@
],
"scripts": {
"precommit": "lint-staged",
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test": "vitest src",
Expand Down
12 changes: 3 additions & 9 deletions packages/connectors/connector-aliyun-dm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
],
"scripts": {
"precommit": "lint-staged",
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test": "vitest src",
Expand All @@ -51,10 +50,6 @@
"access": "public"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@silverhand/eslint-config": "6.0.1",
"@silverhand/ts-config": "6.0.0",
"@types/node": "^20.11.20",
Expand All @@ -64,9 +59,8 @@
"lint-staged": "^15.0.2",
"nock": "^13.3.1",
"prettier": "^3.0.0",
"rollup": "^4.12.0",
"rollup-plugin-output-size": "^1.3.0",
"supertest": "^7.0.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vitest": "^2.0.0"
}
Expand Down
12 changes: 3 additions & 9 deletions packages/connectors/connector-aliyun-sms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
],
"scripts": {
"precommit": "lint-staged",
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test": "vitest src",
Expand All @@ -51,10 +50,6 @@
"access": "public"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@silverhand/eslint-config": "6.0.1",
"@silverhand/ts-config": "6.0.0",
"@types/node": "^20.11.20",
Expand All @@ -64,9 +59,8 @@
"lint-staged": "^15.0.2",
"nock": "^13.3.1",
"prettier": "^3.0.0",
"rollup": "^4.12.0",
"rollup-plugin-output-size": "^1.3.0",
"supertest": "^7.0.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vitest": "^2.0.0"
}
Expand Down
12 changes: 3 additions & 9 deletions packages/connectors/connector-apple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
],
"scripts": {
"precommit": "lint-staged",
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test": "vitest src",
Expand All @@ -53,10 +52,6 @@
"access": "public"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@silverhand/eslint-config": "6.0.1",
"@silverhand/ts-config": "6.0.0",
"@types/node": "^20.11.20",
Expand All @@ -66,9 +61,8 @@
"lint-staged": "^15.0.2",
"nock": "^13.3.1",
"prettier": "^3.0.0",
"rollup": "^4.12.0",
"rollup-plugin-output-size": "^1.3.0",
"supertest": "^7.0.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vitest": "^2.0.0"
}
Expand Down
12 changes: 3 additions & 9 deletions packages/connectors/connector-aws-ses/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
],
"scripts": {
"precommit": "lint-staged",
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test": "vitest src",
Expand All @@ -54,10 +53,6 @@
"access": "public"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@silverhand/eslint-config": "6.0.1",
"@silverhand/ts-config": "6.0.0",
"@types/node": "^20.11.20",
Expand All @@ -67,9 +62,8 @@
"lint-staged": "^15.0.2",
"nock": "^13.3.1",
"prettier": "^3.0.0",
"rollup": "^4.12.0",
"rollup-plugin-output-size": "^1.3.0",
"supertest": "^7.0.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vitest": "^2.0.0"
}
Expand Down
12 changes: 3 additions & 9 deletions packages/connectors/connector-azuread/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
],
"scripts": {
"precommit": "lint-staged",
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test": "vitest src",
Expand All @@ -53,10 +52,6 @@
"access": "public"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@silverhand/eslint-config": "6.0.1",
"@silverhand/ts-config": "6.0.0",
"@types/node": "^20.11.20",
Expand All @@ -66,9 +61,8 @@
"lint-staged": "^15.0.2",
"nock": "^13.3.1",
"prettier": "^3.0.0",
"rollup": "^4.12.0",
"rollup-plugin-output-size": "^1.3.0",
"supertest": "^7.0.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vitest": "^2.0.0"
}
Expand Down
12 changes: 3 additions & 9 deletions packages/connectors/connector-dingtalk-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@shopify/jest-koa-mocks": "^5.0.0",
"@silverhand/eslint-config": "6.0.1",
"@silverhand/ts-config": "6.0.0",
Expand All @@ -26,9 +22,8 @@
"lint-staged": "^15.0.2",
"nock": "^13.3.1",
"prettier": "^3.0.0",
"rollup": "^4.12.0",
"rollup-plugin-output-size": "^1.3.0",
"supertest": "^7.0.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vitest": "^2.0.0"
},
Expand All @@ -45,9 +40,8 @@
],
"scripts": {
"precommit": "lint-staged",
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test": "vitest src",
Expand Down
12 changes: 3 additions & 9 deletions packages/connectors/connector-discord/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
],
"scripts": {
"precommit": "lint-staged",
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test": "vitest src",
Expand All @@ -52,10 +51,6 @@
"access": "public"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@silverhand/eslint-config": "6.0.1",
"@silverhand/ts-config": "6.0.0",
"@types/node": "^20.11.20",
Expand All @@ -65,9 +60,8 @@
"lint-staged": "^15.0.2",
"nock": "^13.3.1",
"prettier": "^3.0.0",
"rollup": "^4.12.0",
"rollup-plugin-output-size": "^1.3.0",
"supertest": "^7.0.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vitest": "^2.0.0"
}
Expand Down
12 changes: 3 additions & 9 deletions packages/connectors/connector-facebook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
],
"scripts": {
"precommit": "lint-staged",
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test": "vitest src",
Expand All @@ -52,10 +51,6 @@
"access": "public"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@silverhand/eslint-config": "6.0.1",
"@silverhand/ts-config": "6.0.0",
"@types/node": "^20.11.20",
Expand All @@ -65,9 +60,8 @@
"lint-staged": "^15.0.2",
"nock": "^13.3.1",
"prettier": "^3.0.0",
"rollup": "^4.12.0",
"rollup-plugin-output-size": "^1.3.0",
"supertest": "^7.0.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vitest": "^2.0.0"
}
Expand Down
Loading

0 comments on commit 510f681

Please sign in to comment.