From 0a59fddeaeae3cc1222779035c1f2b1c4753f1e3 Mon Sep 17 00:00:00 2001 From: Aris Riswanto <62107426+arisris@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:04:48 +0700 Subject: [PATCH] fix(dev-server): Move miniflare,wrangler to dev as it peer optional (#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 --- .changeset/spotty-gifts-complain.md | 5 +++++ packages/dev-server/README.md | 6 ++++++ packages/dev-server/package.json | 19 ++++++++++++++++--- yarn.lock | 9 +++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 .changeset/spotty-gifts-complain.md diff --git a/.changeset/spotty-gifts-complain.md b/.changeset/spotty-gifts-complain.md new file mode 100644 index 0000000..761313c --- /dev/null +++ b/.changeset/spotty-gifts-complain.md @@ -0,0 +1,5 @@ +--- +'@hono/vite-dev-server': patch +--- + +Remove miniflare from deps, and add it to peer optional. diff --git a/packages/dev-server/README.md b/packages/dev-server/README.md index 19a7a82..38463b0 100644 --- a/packages/dev-server/README.md +++ b/packages/dev-server/README.md @@ -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' diff --git a/packages/dev-server/package.json b/packages/dev-server/package.json index 22ce3c7..b1e7124 100644 --- a/packages/dev-server/package.json +++ b/packages/dev-server/package.json @@ -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", @@ -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" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index f6cfb3f..0bf1054 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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