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

Pages Query Param _redirects

Open Skye-31 opened this issue 2 years ago • 7 comments

Rebased #1409

Skye-31 avatar Sep 15 '22 15:09 Skye-31

🦋 Changeset detected

Latest commit: 05e539870232c89b77a8849e0abe84798761cfda

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

This PR includes changesets to release 2 packages
Name Type
@cloudflare/pages-shared Patch
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 15 '22 15: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/3091967470/npm-package-wrangler-1863

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/3091967470/npm-package-wrangler-1863 dev path/to/script.js

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

Codecov Report

Merging #1863 (924f115) into main (01be5f5) will increase coverage by 2.03%. The diff coverage is n/a.

:exclamation: Current head 924f115 differs from pull request most recent head 05e5398. Consider uploading reports for the commit 05e5398 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1863      +/-   ##
==========================================
+ Coverage   75.46%   77.50%   +2.03%     
==========================================
  Files         116      105      -11     
  Lines        7867     7473     -394     
  Branches     2048     1972      -76     
==========================================
- Hits         5937     5792     -145     
+ Misses       1930     1681     -249     
Impacted Files Coverage Δ
...r/src/__tests__/helpers/msw/handlers/namespaces.ts 16.66% <0.00%> (-83.34%) :arrow_down:
packages/wrangler/src/cfetch/internal.ts 47.05% <0.00%> (-1.17%) :arrow_down:
packages/wrangler/src/dev.tsx 85.37% <0.00%> (-0.88%) :arrow_down:
packages/wrangler/src/dev/local.tsx 30.67% <0.00%> (-0.24%) :arrow_down:
packages/wrangler/src/dev/start-server.ts 76.00% <0.00%> (-0.20%) :arrow_down:
packages/wrangler/src/index.tsx 89.13% <0.00%> (-0.04%) :arrow_down:
packages/wrangler/src/init.ts 96.00% <0.00%> (-0.03%) :arrow_down:
packages/wrangler/src/paths.ts 100.00% <0.00%> (ø)
packages/wrangler/src/logger.ts 100.00% <0.00%> (ø)
packages/wrangler/src/api/dev.ts 69.23% <0.00%> (ø)
... and 23 more

codecov[bot] avatar Sep 15 '22 17:09 codecov[bot]

I think this is good to go now. I'd like to add some more tests to rulesEngine.test.ts, but I can do that in a follow-up PR if we just want to get this out now.

GregBrimble avatar Sep 20 '22 12:09 GregBrimble

Ah, screw it. I need to fix that unused var anyway. I'll add the tests to this PR after lunch too.

GregBrimble avatar Sep 20 '22 12:09 GregBrimble

One of these recent changes just broke all the tests, they were working locally

Skye-31 avatar Sep 20 '22 12:09 Skye-31

Facing some tricky decisions editing the pages-shared tests. One of them is the behaviour of when there's a rule for both /foo?bar and /foo. My initial solution was append .* to the rule if there's no query params, however that then means /foo?bar matches both the rule it's meant to, and /foo, however does fix the previous issue, which probably isn't the desired output

I modified some tests that had older messages which this PR updates, let me know if any of that is wrong as I haven't touched those much before..

Skye-31 avatar Sep 20 '22 17:09 Skye-31