Skip to content

Commit e92abd9

Browse files
authored
feat: add locale utils for hono (#31)
* feat: add locale utils for hono * chore: downgrade vitest * fix: typo * update * fix: add node options * fix
1 parent f55ad46 commit e92abd9

File tree

7 files changed

+671
-6
lines changed

7 files changed

+671
-6
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,12 @@ jobs:
9898
- name: Install dependencies
9999
run: bun install
100100

101+
# NOTE: avoid https://github.com/intlify/utils/actions/runs/6573605958/job/17857030689?pr=31#step:8:48
102+
# vitest-environment-miniflare tries to load dist/index.cjs and work with vitest...
101103
- name: Build codes
104+
run: npm run build
105+
106+
- name: Test
102107
run: npm test
103108

104109
edge-release:

build.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ export default defineBuildConfig({
1616
{
1717
input: './src/h3.ts',
1818
},
19+
{
20+
input: './src/hono.ts',
21+
},
1922
{
2023
input: './src/node.ts',
2124
},
2225
],
23-
externals: ['h3'],
26+
externals: ['h3', 'hono'],
2427
})

bun.lockb

138 KB
Binary file not shown.

package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@
4747
"require": "./dist/h3.cjs",
4848
"default": "./dist/h3.mjs"
4949
},
50+
"./hono": {
51+
"types": "./dist/hono.d.ts",
52+
"import": "./dist/hono.mjs",
53+
"require": "./dist/hono.cjs",
54+
"default": "./dist/hono.mjs"
55+
},
5056
"./node": {
5157
"types": "./dist/node.d.ts",
5258
"import": "./dist/node.mjs",
@@ -68,7 +74,7 @@
6874
"build": "unbuild",
6975
"test": "npm run test:typecheck && npm run test:unit",
7076
"test:unit": "vitest run",
71-
"test:typecheck": "vitest typecheck --run",
77+
"test:typecheck": "NODE_OPTIONS=--experimental-vm-modules vitest typecheck --run",
7278
"test:coverage": "npm test -- --reporter verbose --coverage",
7379
"play:browser": "npm run -w example-browser dev",
7480
"play:node": "npm run -w example-node dev",
@@ -84,19 +90,23 @@
8490
]
8591
},
8692
"devDependencies": {
93+
"@cloudflare/workers-types": "^4.20231016.0",
8794
"@types/node": "^20.6.0",
8895
"@types/supertest": "^2.0.12",
89-
"@vitest/coverage-v8": "^1.0.0-beta.1",
90-
"bun-types": "latest",
96+
"@vitest/coverage-v8": "^0.34.6",
9197
"bumpp": "^9.2.0",
98+
"bun-types": "latest",
9299
"cookie-es": "^1.0.0",
93100
"gh-changelogen": "^0.2.8",
94101
"h3": "^1.8.1",
102+
"hono": "^3.8.1",
95103
"lint-staged": "^15.0.0",
104+
"miniflare": "^3.20231016.0",
96105
"supertest": "^6.3.3",
97106
"typescript": "^5.2.2",
98107
"unbuild": "^2.0.0",
99-
"vitest": "^1.0.0-beta.1"
108+
"vitest": "^0.34.6",
109+
"vitest-environment-miniflare": "^2.14.1"
100110
},
101111
"workspaces": [
102112
"playground/*"

0 commit comments

Comments
 (0)