Skip to content
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: 0 additions & 1 deletion .github/workflows/ci-bun-transpiler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
bun-version-file: .tool-versions
- run: yarn workspaces focus hono-middleware @hono/bun-transpiler
- run: yarn workspace @hono/bun-transpiler build
- run: yarn workspace @hono/bun-transpiler publint
- run: yarn workspace @hono/bun-transpiler typecheck
- run: yarn eslint packages/bun-transpiler
- run: yarn prettier --check . !packages packages/bun-transpiler
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
with:
node-version-file: .tool-versions
- run: yarn
- run: yarn publint
- run: yarn typecheck
- run: yarn lint
- run: yarn format
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: yarn

- name: Build
run: yarn workspaces foreach --all --topological --parallel --no-private run build
run: yarn build

- name: Publish to StackBlitz
run: yarn pkg-pr-new publish --compact --no-template './packages/*'
1 change: 0 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
with:
node-version-file: .tool-versions
- run: yarn
- run: yarn publint
- run: yarn typecheck
- run: yarn lint
- run: yarn format
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "hono-middleware",
"version": "0.0.0",
"description": "Third-party middleware for Hono",
"type": "module",
"workspaces": {
"packages": [
".github/actions/*",
"packages/*"
]
},
"scripts": {
"build": "turbo run build",
"publint": "turbo run publint",
"build": "tsdown",
"publish": "yarn publish:npm && yarn publish:jsr",
"publish:npm": "yarn workspaces foreach --all --no-private --topological --verbose npm publish --tolerate-republish && changeset tag",
"publish:jsr": "deno install --no-lock && deno publish",
Expand All @@ -34,6 +34,7 @@
"url": "git+https://github.com/honojs/middleware.git"
},
"devDependencies": {
"@arethetypeswrong/core": "^0.18.2",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.29.7",
"@cloudflare/vitest-pool-workers": "^0.9.13",
Expand All @@ -48,7 +49,8 @@
"hono": "^4.10.1",
"pkg-pr-new": "^0.0.54",
"prettier": "^3.6.2",
"tsup": "^8.5.0",
"publint": "^0.3.15",
"tsdown": "^0.15.9",
"turbo": "^2.5.8",
"typescript": "^5.8.2",
"typia": "^9.7.2",
Expand Down
8 changes: 2 additions & 6 deletions packages/ajv-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
"dist"
],
"scripts": {
"build": "tsup ./src/index.ts",
"build": "tsdown",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"prepack": "yarn build",
"publint": "attw --pack && publint",
"typecheck": "tsc -b tsconfig.json",
"test": "vitest",
"version:jsr": "yarn version:set $npm_package_version"
Expand Down Expand Up @@ -46,11 +44,9 @@
"hono": ">=3.9.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
"ajv": "^8.12.0",
"hono": "^4.10.1",
"publint": "^0.3.14",
"tsup": "^8.5.0",
"tsdown": "^0.15.9",
"typescript": "^5.8.2",
"vitest": "^3.2.4"
}
Expand Down
11 changes: 11 additions & 0 deletions packages/ajv-validator/tsdown.config.ts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can all tsdown.config.tss in the packages look for tsdown.config.ts in the top, and can we remove the tsdown.config.ts`s?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would be good except

  • @hono/zod-openapi having a dependency on @hono/zod-validator, as CI needs to build @hono/zod-validator before building @hono/zod-openapi
  • Each workspace has slightly different config, eg entry, attw.profile, etc..

I'll do my best to remove any duplicate configuration, but I think we'll still need to include most of them

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from 'tsdown'

export default defineConfig({
attw: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, tsdown includes the arethetypeswrong and publint?? It's cool!

clean: true,
dts: true,
entry: 'src/index.ts',
format: ['cjs', 'esm'],
publint: true,
tsconfig: 'tsconfig.build.json',
})
8 changes: 2 additions & 6 deletions packages/arktype-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
"dist"
],
"scripts": {
"build": "tsup ./src/index.ts",
"build": "tsdown",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"prepack": "yarn build",
"publint": "attw --pack && publint",
"typecheck": "tsc -b tsconfig.json",
"test": "vitest",
"version:jsr": "yarn version:set $npm_package_version"
Expand Down Expand Up @@ -47,11 +45,9 @@
"hono": ">=3.0.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
"arktype": "^2.1.20",
"hono": "^4.10.1",
"publint": "^0.3.14",
"tsup": "^8.5.0",
"tsdown": "^0.15.9",
"typescript": "^5.8.2",
"vitest": "^3.2.4"
}
Expand Down
11 changes: 11 additions & 0 deletions packages/arktype-validator/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from 'tsdown'

export default defineConfig({
attw: true,
clean: true,
dts: true,
entry: 'src/index.ts',
format: ['cjs', 'esm'],
publint: true,
tsconfig: 'tsconfig.build.json',
})
8 changes: 2 additions & 6 deletions packages/auth-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@
"dist"
],
"scripts": {
"build": "tsup src/index.ts src/react.tsx",
"build": "tsdown",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"prepack": "yarn build",
"publint": "attw --pack --profile node16 && publint",
"typecheck": "tsc -b tsconfig.json",
"test": "vitest",
"version:jsr": "yarn version:set $npm_package_version"
Expand All @@ -63,13 +61,11 @@
"react": "^18 || ^19 || ^19.0.0-rc"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
"@auth/core": "^0.35.3",
"@types/react": "^19",
"hono": "^4.10.1",
"publint": "^0.3.14",
"react": "^19.2.0",
"tsup": "^8.5.0",
"tsdown": "^0.15.9",
"typescript": "^5.8.2",
"vitest": "^3.2.4"
},
Expand Down
13 changes: 13 additions & 0 deletions packages/auth-js/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from 'tsdown'

export default defineConfig({
attw: {
profile: 'node16',
},
clean: true,
dts: true,
entry: ['src/index.ts', 'src/react.tsx'],
format: ['cjs', 'esm'],
publint: true,
tsconfig: 'tsconfig.build.json',
})
8 changes: 2 additions & 6 deletions packages/bun-compress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
"dist"
],
"scripts": {
"build": "tsup ./src/index.ts",
"build": "tsdown",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"prepack": "yarn build",
"publint": "attw --pack && publint",
"typecheck": "tsc -b tsconfig.json",
"test": "bun test"
},
Expand Down Expand Up @@ -44,12 +42,10 @@
"hono": ">=4.0.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
"@types/bun": "^1.2.12",
"@types/node": "^24.9.0",
"hono": "^4.10.1",
"publint": "^0.3.14",
"tsup": "^8.5.0",
"tsdown": "^0.15.9",
"typescript": "^5.8.2",
"vitest": "^3.2.4"
}
Expand Down
11 changes: 11 additions & 0 deletions packages/bun-compress/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from 'tsdown'

export default defineConfig({
attw: true,
clean: true,
dts: true,
entry: 'src/index.ts',
format: ['cjs', 'esm'],
publint: true,
tsconfig: 'tsconfig.build.json',
})
8 changes: 2 additions & 6 deletions packages/bun-transpiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
"dist"
],
"scripts": {
"build": "tsup ./src/index.ts --external bun",
"build": "tsdown",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"prepack": "yarn build",
"publint": "attw --pack && publint",
"typecheck": "tsc -b tsconfig.json",
"test": "bun test"
},
Expand Down Expand Up @@ -45,10 +43,8 @@
"hono": ">=4.0.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
"hono": "^4.10.1",
"publint": "^0.3.14",
"tsup": "^8.5.0",
"tsdown": "^0.15.9",
"typescript": "^5.8.2",
"vitest": "^3.2.4"
},
Expand Down
12 changes: 12 additions & 0 deletions packages/bun-transpiler/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'tsdown'

export default defineConfig({
attw: true,
clean: true,
dts: true,
entry: 'src/index.ts',
external: ['bun'],
format: ['cjs', 'esm'],
publint: true,
tsconfig: 'tsconfig.build.json',
})
8 changes: 2 additions & 6 deletions packages/casbin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@
"dist"
],
"scripts": {
"build": "tsup ./src/index.ts ./src/helper/index.ts",
"build": "tsdown",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"prepack": "yarn build",
"publint": "attw --pack --profile node16 && publint",
"typecheck": "tsc -b tsconfig.json",
"test": "vitest",
"version:jsr": "yarn version:set $npm_package_version"
Expand All @@ -57,11 +55,9 @@
"hono": ">=4.5.11"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
"casbin": "^5.30.0",
"hono": "^4.10.1",
"publint": "^0.3.14",
"tsup": "^8.5.0",
"tsdown": "^0.15.9",
"typescript": "^5.8.2",
"vitest": "^3.2.4"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/casbin/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"outDir": "../../dist/packages/casbin",
"types": ["vitest/globals"]
},
"include": ["src", "vitest.config.ts", "vitest.setup.ts"],
"include": ["src", "tsdown.config.ts", "vitest.config.ts", "vitest.setup.ts"],
"references": []
}
13 changes: 13 additions & 0 deletions packages/casbin/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from 'tsdown'

export default defineConfig({
attw: {
profile: 'node16',
},
clean: true,
dts: true,
entry: ['src/index.ts', 'src/helper/index.ts'],
format: ['cjs', 'esm'],
publint: true,
tsconfig: 'tsconfig.build.json',
})
8 changes: 2 additions & 6 deletions packages/class-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@
"dist"
],
"scripts": {
"build": "tsup ./src/index.ts",
"build": "tsdown",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"prepack": "yarn build",
"publint": "attw --pack && publint",
"typecheck": "tsc -b tsconfig.json",
"test": "vitest",
"version:jsr": "yarn version:set $npm_package_version"
Expand All @@ -46,10 +44,8 @@
"hono": ">=3.9.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
"hono": "^4.10.1",
"publint": "^0.3.14",
"tsup": "^8.5.0",
"tsdown": "^0.15.9",
"typescript": "^5.8.2",
"vitest": "^3.2.4"
},
Expand Down
11 changes: 11 additions & 0 deletions packages/class-validator/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from 'tsdown'

export default defineConfig({
attw: true,
clean: true,
dts: true,
entry: 'src/index.ts',
format: ['cjs', 'esm'],
publint: true,
tsconfig: 'tsconfig.build.json',
})
8 changes: 2 additions & 6 deletions packages/clerk-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
"dist"
],
"scripts": {
"build": "tsup ./src/index.ts",
"build": "tsdown",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"prepack": "yarn build",
"publint": "attw --pack && publint",
"typecheck": "tsc -b tsconfig.json",
"test": "vitest",
"version:jsr": "yarn version:set $npm_package_version"
Expand Down Expand Up @@ -50,12 +48,10 @@
"hono": ">=3.0.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
"@types/react": "^19",
"hono": "^4.10.1",
"publint": "^0.3.14",
"react": "^19.2.0",
"tsup": "^8.5.0",
"tsdown": "^0.15.9",
"typescript": "^5.8.2",
"vitest": "^3.2.4"
},
Expand Down
11 changes: 11 additions & 0 deletions packages/clerk-auth/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from 'tsdown'

export default defineConfig({
attw: true,
clean: true,
dts: true,
entry: 'src/index.ts',
format: ['cjs', 'esm'],
publint: true,
tsconfig: 'tsconfig.build.json',
})
Loading
Loading