From 3637d97a99c9d5e8d0d2b5f3adaf4bd9993265f0 Mon Sep 17 00:00:00 2001 From: MrBBot Date: Fri, 10 Nov 2023 23:45:22 +0000 Subject: [PATCH] fix: add `miniflare` `bin` entry (#4428) Miniflare 3 doesn't include a CLI anymore, but should log a useful error stating this when running `npx miniflare`. We had a script for this, but it wasn't correctly hooked up. :facepalm: --- .changeset/loud-taxis-drop.md | 7 +++++++ packages/miniflare/bootstrap.js | 1 + packages/miniflare/package.json | 3 +++ 3 files changed, 11 insertions(+) create mode 100644 .changeset/loud-taxis-drop.md mode change 100644 => 100755 packages/miniflare/bootstrap.js diff --git a/.changeset/loud-taxis-drop.md b/.changeset/loud-taxis-drop.md new file mode 100644 index 000000000000..c58866e13a50 --- /dev/null +++ b/.changeset/loud-taxis-drop.md @@ -0,0 +1,7 @@ +--- +"miniflare": patch +--- + +fix: add `miniflare` `bin` entry + +Miniflare 3 doesn't include a CLI anymore, but should log a useful error stating this when running `npx miniflare`. We had a script for this, but it wasn't correctly hooked up. :facepalm: This change makes sure the required `bin` entry exists. diff --git a/packages/miniflare/bootstrap.js b/packages/miniflare/bootstrap.js old mode 100644 new mode 100755 index f059a0fc48de..a5e882634940 --- a/packages/miniflare/bootstrap.js +++ b/packages/miniflare/bootstrap.js @@ -1,3 +1,4 @@ +#!/usr/bin/env node const { Log } = require("."); const log = new Log(); diff --git a/packages/miniflare/package.json b/packages/miniflare/package.json index 89413827daec..f7ca6b775d32 100644 --- a/packages/miniflare/package.json +++ b/packages/miniflare/package.json @@ -37,6 +37,9 @@ "lint:fix": "pnpm run lint -- --fix", "types:build": "node scripts/types.mjs tsconfig.json && node scripts/types.mjs src/workers/tsconfig.json" }, + "bin": { + "miniflare": "bootstrap.js" + }, "dependencies": { "acorn": "^8.8.0", "acorn-walk": "^8.2.0",