-
Notifications
You must be signed in to change notification settings - Fork 556
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
feat: pages dev supports query params #1409
Conversation
🦋 Changeset detectedLatest commit: 0bce555 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/2721646185/npm-package-wrangler-1409 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1409/npm-package-wrangler-1409 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/2721646185/npm-package-wrangler-1409 dev path/to/script.js |
6a0bc98
to
aa5de96
Compare
packages/wrangler/src/pages/dev.tsx
Outdated
@@ -477,14 +477,14 @@ async function spawnProxyProcess({ | |||
} | |||
|
|||
function escapeRegex(str: string) { | |||
return str.replace(/[-/\\^$*+?.()|[]{}]/g, "\\$&"); | |||
return str.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"); |
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.
This may have solved a bug with parsing unusual characters
packages/wrangler/src/pages/dev.tsx
Outdated
} | ||
|
||
type Replacements = Record<string, string>; | ||
|
||
function replacer(str: string, replacements: Replacements) { | ||
for (const [replacement, value] of Object.entries(replacements)) { | ||
str = str.replace(`:${replacement}`, value); | ||
str = str.replaceAll(`:${replacement}`, value); |
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.
Docs will need to be changed to mention this (there's a PR in prod by Walshy doing the same thing)
* chore: show warnings for invalid redirect rules * fix: be strict about limit of rules
d1532fd
to
73211ca
Compare
Codecov Report
@@ Coverage Diff @@
## main #1409 +/- ##
=======================================
Coverage ? 82.48%
=======================================
Files ? 85
Lines ? 5527
Branches ? 1416
=======================================
Hits ? 4559
Misses ? 968
Partials ? 0 |
Closing in favour of #1863 |
Closed in favour of #1863