logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.31k stars 406 forks source link

refactor: use tsup for building #6354

Closed gao-sun closed 1 month ago

gao-sun commented 1 month ago

Summary

for projects that do NOT need type declarations, tsup (or the underlying esbuild) is extremely faster than tsc. this is helpful for both dev and prod builds.

for type checks, eslint helps us do the job. we need to run tsc manually, added in #6355.

some known limits:

Testing

Performance

less than 1s vs. 10s

352788168-62cdc7bd-f2e9-4c90-8db9-abb6caf0d3cc 352788162-53cfbfa8-86e5-480b-bf68-f120762273d3

Accuracy

locally tested, also should be ok with the current ci

Checklist

github-actions[bot] commented 1 month ago

COMPARE TO master

Total Size Diff :chart_with_upwards_trend: +3.46 KB

Diff by File |Name|Diff| |---|---| |package.json|:chart_with_upwards_trend: +22 Bytes| |packages/core/nodemon.json|:chart_with_upwards_trend: +384 Bytes| |packages/core/package.json|:chart_with_upwards_trend: +34 Bytes| |packages/core/tsconfig.base.json|:chart_with_upwards_trend: +215 Bytes| |packages/core/tsconfig.build.json|:chart_with_upwards_trend: +134 Bytes| |packages/core/tsconfig.json|:chart_with_upwards_trend: +222 Bytes| |packages/core/tsconfig.test.json|:chart_with_upwards_trend: +31 Bytes| |packages/core/tsup.config.ts|:chart_with_upwards_trend: +289 Bytes| |packages/core/tsup.dev.config.ts|:chart_with_upwards_trend: +284 Bytes| |packages/integration-tests/jest.setup.api.js|:chart_with_upwards_trend: +249 Bytes| |packages/integration-tests/package.json|:chart_with_upwards_trend: +26 Bytes| |packages/integration-tests/tsup.config.ts|:chart_with_upwards_trend: +258 Bytes| |packages/schemas/tsconfig.build.alterations.json|:chart_with_upwards_trend: +34 Bytes| |packages/schemas/tsconfig.build.gen.json|:chart_with_upwards_trend: +62 Bytes| |pnpm-lock.yaml|:chart_with_upwards_trend: +2.61 KB| |tsup.shared.config.ts|:chart_with_upwards_trend: +216 Bytes|