Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dev-server): Move miniflare,wrangler to dev as it peer optional #165

Merged
merged 7 commits into from
Aug 28, 2024
Merged
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
5 changes: 5 additions & 0 deletions .changeset/spotty-gifts-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hono/vite-dev-server': patch
---

Remove miniflare from deps, and add it to peer optional.
6 changes: 6 additions & 0 deletions packages/dev-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ You can pass the `env` value of a specified environment to the application.

You can pass the Bindings specified in `wrangler.toml` to your application by using "Cloudflare Adapter".

Install miniflare and wrangler to develop and deploy your cf project.

```text
npm i -D wrangler miniflare
```

```ts
import devServer from '@hono/vite-dev-server'
import cloudflareAdapter from '@hono/vite-dev-server/cloudflare'
Expand Down
19 changes: 16 additions & 3 deletions packages/dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@playwright/test": "^1.37.1",
"glob": "^10.3.10",
"hono": "^4.4.11",
"miniflare": "^3.20240701.0",
"playwright": "^1.39.0",
"publint": "^0.2.5",
"rimraf": "^5.0.1",
Expand All @@ -69,14 +70,26 @@
"wrangler": "^3.63.1"
},
"peerDependencies": {
"hono": "*"
"hono": "*",
"miniflare": "*",
"wrangler": "*"
},
"peerDependenciesMeta": {
"hono": {
"optional": false
},
"miniflare": {
"optional": true
},
"wrangler": {
"optional": true
}
},
"engines": {
"node": ">=18.14.1"
},
"dependencies": {
"@hono/node-server": "^1.12.0",
"miniflare": "^3.20240701.0",
"minimatch": "^9.0.3"
}
}
}
9 changes: 9 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,15 @@ __metadata:
wrangler: ^3.63.1
peerDependencies:
hono: "*"
miniflare: "*"
wrangler: "*"
peerDependenciesMeta:
hono:
optional: false
miniflare:
optional: true
wrangler:
optional: true
languageName: unknown
linkType: soft

Expand Down
Loading