Skip to content

Commit

Permalink
fix(dev-server): Move miniflare,wrangler to dev as it peer optional (#…
Browse files Browse the repository at this point in the history
…165)

* Move miniflare,wrangler to dev as it peer optional

* Update readme

* Update changeset

* update changeset

* update lockfile

* remove description not related to this PR

* remove the description not related to the PR
  • Loading branch information
arisris authored Aug 28, 2024
1 parent 5e0127e commit 0a59fdd
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
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

0 comments on commit 0a59fdd

Please sign in to comment.