-
Notifications
You must be signed in to change notification settings - Fork 770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: strip leading *
/*.
from routes when deducing a host for dev
#1018
Conversation
🦋 Changeset detectedLatest commit: 9f5aa23 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
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/2334052220/npm-package-wrangler-1018 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1018/npm-package-wrangler-1018 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/2334052220/npm-package-wrangler-1018 dev path/to/script.js |
e7beb4f
to
943ed76
Compare
@JacobMGEvans @petebacondarwin What's happening here, I think, is that node_modules is being restored from cache, which blows away the symlinks that |
Ah yes. I think when linux-like OSes zip up files they keep the symlinks but these are lost on Windows. One option might be to run |
943ed76
to
4d619e8
Compare
omg I added npm install and look at this error 😳😳😳 https://github.com/cloudflare/wrangler2/runs/6453430257?check_suite_focus=true |
4d619e8
to
91548aa
Compare
Ok, looks good now! |
91548aa
to
81170a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! regex one-liner backed by tests.
I have regex101.com open every day lol |
When given routes, we use the host name from the route to deduce a zone id to pass along with the host to set with dev `session`. Route patterns can include leading `*`/`*.`, which we don't account for when deducing said zone id, resulting in subtle errors for the session. This fix strips those leading characters as appropriate. Fixes #1002
81170a9
to
9f5aa23
Compare
When given routes, we use the host name from the route to deduce a zone id to pass along with the host to set with dev
session
. Route patterns can include leading*
/*.
, which we don't account for when deducing said zone id, resulting in subtle errors for the session. This fix strips those leading characters as appropriate.Fixes #1002