Skip to content

Commit

Permalink
feat: add locale utils for hono (#31)
Browse files Browse the repository at this point in the history
* feat: add locale utils for hono

* chore: downgrade vitest

* fix: typo

* update

* fix: add node options

* fix
  • Loading branch information
kazupon committed Oct 19, 2023
1 parent f55ad46 commit e92abd9
Show file tree
Hide file tree
Showing 7 changed files with 671 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ jobs:
- name: Install dependencies
run: bun install

# NOTE: avoid https://github.com/intlify/utils/actions/runs/6573605958/job/17857030689?pr=31#step:8:48
# vitest-environment-miniflare tries to load dist/index.cjs and work with vitest...
- name: Build codes
run: npm run build

- name: Test
run: npm test

edge-release:
Expand Down
5 changes: 4 additions & 1 deletion build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ export default defineBuildConfig({
{
input: './src/h3.ts',
},
{
input: './src/hono.ts',
},
{
input: './src/node.ts',
},
],
externals: ['h3'],
externals: ['h3', 'hono'],
})
Binary file modified bun.lockb
Binary file not shown.
18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
"require": "./dist/h3.cjs",
"default": "./dist/h3.mjs"
},
"./hono": {
"types": "./dist/hono.d.ts",
"import": "./dist/hono.mjs",
"require": "./dist/hono.cjs",
"default": "./dist/hono.mjs"
},
"./node": {
"types": "./dist/node.d.ts",
"import": "./dist/node.mjs",
Expand All @@ -68,7 +74,7 @@
"build": "unbuild",
"test": "npm run test:typecheck && npm run test:unit",
"test:unit": "vitest run",
"test:typecheck": "vitest typecheck --run",
"test:typecheck": "NODE_OPTIONS=--experimental-vm-modules vitest typecheck --run",
"test:coverage": "npm test -- --reporter verbose --coverage",
"play:browser": "npm run -w example-browser dev",
"play:node": "npm run -w example-node dev",
Expand All @@ -84,19 +90,23 @@
]
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20231016.0",
"@types/node": "^20.6.0",
"@types/supertest": "^2.0.12",
"@vitest/coverage-v8": "^1.0.0-beta.1",
"bun-types": "latest",
"@vitest/coverage-v8": "^0.34.6",
"bumpp": "^9.2.0",
"bun-types": "latest",
"cookie-es": "^1.0.0",
"gh-changelogen": "^0.2.8",
"h3": "^1.8.1",
"hono": "^3.8.1",
"lint-staged": "^15.0.0",
"miniflare": "^3.20231016.0",
"supertest": "^6.3.3",
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vitest": "^1.0.0-beta.1"
"vitest": "^0.34.6",
"vitest-environment-miniflare": "^2.14.1"
},
"workspaces": [
"playground/*"
Expand Down
Loading

0 comments on commit e92abd9

Please sign in to comment.