-
Notifications
You must be signed in to change notification settings - Fork 742
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: escape function path regex chars #1686
Conversation
🦋 Changeset detectedLatest commit: 8938b36 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/2868686305/npm-package-wrangler-1686 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1686/npm-package-wrangler-1686 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/2868686305/npm-package-wrangler-1686 dev path/to/script.js |
b4dbd18
to
4175bd4
Compare
4175bd4
to
bab249a
Compare
Codecov Report
@@ Coverage Diff @@
## main #1686 +/- ##
==========================================
+ Coverage 80.88% 80.89% +0.01%
==========================================
Files 91 91
Lines 6068 6068
Branches 1556 1556
==========================================
+ Hits 4908 4909 +1
+ Misses 1160 1159 -1
|
bab249a
to
69aa904
Compare
Hey Skye! Thanks for putting this together. Would you mind adding some test cases before this change (with working paths) to ensure we don't break existing functionality? Then we could add this change with additional tests showing the old + additional paths work. Edit: I see now we have some tests - per our convo, maybe add some tests with |
Closes #1685
Currently, if you have a file such as
functions/*.ts
, pages attempts to run path-to-regex on this, and this will fail, as it assumes it's a regex character (it shouldn't be). This results in anUnexpected MODIFIER at 1, expected END.
error. This PR correctly escapes these characters to solve the issue (confirmed fix from Alastair)