Skip to content

Commit

Permalink
fix: add miniflare bin entry (#4428)
Browse files Browse the repository at this point in the history
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. 🤦
  • Loading branch information
mrbbot authored Nov 10, 2023
1 parent 7fbe193 commit 3637d97
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/loud-taxis-drop.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions packages/miniflare/bootstrap.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
const { Log } = require(".");

const log = new Log();
Expand Down
3 changes: 3 additions & 0 deletions packages/miniflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3637d97

Please sign in to comment.