workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

Fix `--port=0` option to correctly open on random port

Open GregBrimble opened this issue 3 years ago • 3 comments

Dependent on https://github.com/cloudflare/miniflare/pull/382

GregBrimble avatar Sep 19 '22 16:09 GregBrimble

🦋 Changeset detected

Latest commit: d7445703109e040020696fe52fd3780f10bda195

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Sep 19 '22 16:09 changeset-bot[bot]

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/3532075809/npm-package-wrangler-1883

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1883/npm-package-wrangler-1883

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/3532075809/npm-package-wrangler-1883 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.developers.workers.dev/runs/3532075809/npm-package-cloudflare-pages-shared-1883

github-actions[bot] avatar Sep 19 '22 16:09 github-actions[bot]

Codecov Report

Merging #1883 (980f3f1) into main (f8ea2b6) will decrease coverage by 0.00%. The diff coverage is 75.00%.

:exclamation: Current head 980f3f1 differs from pull request most recent head d744570. Consider uploading reports for the commit d744570 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1883      +/-   ##
==========================================
- Coverage   71.88%   71.88%   -0.01%     
==========================================
  Files         150      150              
  Lines        9525     9524       -1     
  Branches     2469     2468       -1     
==========================================
- Hits         6847     6846       -1     
  Misses       2678     2678              
Impacted Files Coverage Δ
packages/wrangler/src/dev/local.tsx 22.39% <0.00%> (ø)
packages/wrangler/src/dev.tsx 86.54% <83.33%> (-0.51%) :arrow_down:
packages/wrangler/src/dev/start-server.ts 62.82% <100.00%> (ø)
...ackages/wrangler/src/__tests__/helpers/mock-bin.ts 100.00% <0.00%> (+5.26%) :arrow_up:

codecov[bot] avatar Sep 19 '22 16:09 codecov[bot]

Hey so with https://github.com/cloudflare/miniflare/pull/382 merged, is this good to go?

rozenmd avatar Oct 10 '22 14:10 rozenmd

Just waiting on a Miniflare release 😊

GregBrimble avatar Oct 10 '22 14:10 GregBrimble

Also may want to add this to --experimental-local

rozenmd avatar Oct 10 '22 14:10 rozenmd

@mrbbot pls

rozenmd avatar Oct 10 '22 16:10 rozenmd

https://github.com/cloudflare/miniflare/releases/tag/v2.10.0 🙂

mrbbot avatar Oct 11 '22 09:10 mrbbot

https://github.com/cloudflare/wrangler2/pull/2003

GregBrimble avatar Oct 11 '22 10:10 GregBrimble

hmm, this actually isn't quite ready. It improves things, but it doesn't update the hotkey things, so pressing b will try to open localhost:0 :(

GregBrimble avatar Oct 11 '22 10:10 GregBrimble