Repository navigation
[next] Handle patterns in rewrites - #13052
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 949f8e3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
wyattjoh
force-pushed
the
fix/url-parsing
branch
from
February 12, 2025 21:17
9bbd29a to
d1e4825
Compare
wyattjoh
marked this pull request as ready for review
February 12, 2025 21:38
wyattjoh
requested review from
huozhi,
ijjk,
timneutkens and
ztanner
as code owners
February 12, 2025 21:38
LukeSheard
reviewed
Feb 13, 2025
ztanner
reviewed
Feb 13, 2025
| pathname = pathname.substring(0, index); | ||
|
|
||
| // If there's a hash, we should remove it. | ||
| index = query.indexOf('#'); |
Contributor
There was a problem hiding this comment.
since we're removing the hash in both the if and else, would it make sense to handle this earlier so we don't have to duplicate the logic?
eg outside the if:
const hashIndex = pathname.indexOf('#');
if (hashIndex !== -1) {
pathname = pathname.substring(0, hashIndex);
}
ztanner
approved these changes
Feb 13, 2025
wyattjoh
added this pull request to the merge queue
Feb 13, 2025
Merged
onsclom
pushed a commit
that referenced
this pull request
Feb 14, 2025
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @vercel/[email protected] ### Patch Changes - [build-utils] Move `runNpmInstallSema` closer to where it's used ([#13061](#13061)) - [build-utils] extract getInstallCommandForPackageManager to module scope ([#13058](#13058)) - [build-utils] remove redundant sema release ([#13059](#13059)) - Revert support pnpm 10 ([#13064](#13064)) ## [email protected] ### Patch Changes - Updated dependencies \[[`5f8cc837c400ee7b493caa03931310637193ed24`](5f8cc83), [`f25215c31d972cacb29ad254e768f993445e2a07`](f25215c), [`892c9ef08b8dfa462b4f0f1a6a299065f788c98a`](892c9ef), [`244c4101e68edcc82c920e713172a7d109916f03`](244c410), [`c98677c379b92654b6e9d03bef5f7ec1173cb93d`](c98677c), [`28e366b9d1b3938635fc0cc40fc838161f018f97`](28e366b)]: - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`5f8cc837c400ee7b493caa03931310637193ed24`](5f8cc83), [`f25215c31d972cacb29ad254e768f993445e2a07`](f25215c), [`244c4101e68edcc82c920e713172a7d109916f03`](244c410), [`c98677c379b92654b6e9d03bef5f7ec1173cb93d`](c98677c)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`5f8cc837c400ee7b493caa03931310637193ed24`](5f8cc83), [`f25215c31d972cacb29ad254e768f993445e2a07`](f25215c), [`244c4101e68edcc82c920e713172a7d109916f03`](244c410), [`c98677c379b92654b6e9d03bef5f7ec1173cb93d`](c98677c)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Handle patterns in rewrite destinations correctly ([#13052](#13052)) ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`5f8cc837c400ee7b493caa03931310637193ed24`](5f8cc83), [`f25215c31d972cacb29ad254e768f993445e2a07`](f25215c), [`244c4101e68edcc82c920e713172a7d109916f03`](244c410), [`c98677c379b92654b6e9d03bef5f7ec1173cb93d`](c98677c)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Leverage project settings to determine framework ([#13056](#13056)) ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[]: - @vercel/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
QuietCraftsmanship
pushed a commit
to QuietCraftsmanship/Vercel
that referenced
this pull request
Jul 6, 2025
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @vercel/[email protected] ### Patch Changes - [build-utils] Move `runNpmInstallSema` closer to where it's used ([#13061](vercel/vercel#13061)) - [build-utils] extract getInstallCommandForPackageManager to module scope ([#13058](vercel/vercel#13058)) - [build-utils] remove redundant sema release ([#13059](vercel/vercel#13059)) - Revert support pnpm 10 ([#13064](vercel/vercel#13064)) ## [email protected] ### Patch Changes - Updated dependencies \[[`e62cd885d935120080327585065e9ca73bb9a16d`](vercel/vercel@e62cd88), [`742a6bdc1da9b9cf739fdaac7fe488fd33b9615c`](vercel/vercel@742a6bd), [`7aa4e5abafb44335f51aeb9cffd68b4618e55fca`](vercel/vercel@7aa4e5a), [`7bafeff58fcdd781b943f8a9039a14aef3bd7de6`](vercel/vercel@7bafeff), [`34a8e7faa8086c4b5a0e3b6cc22d5b3d958bf71c`](vercel/vercel@34a8e7f), [`24b944c89bd503a04ada00bc589d2611217bfc67`](vercel/vercel@24b944c)]: - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`e62cd885d935120080327585065e9ca73bb9a16d`](vercel/vercel@e62cd88), [`742a6bdc1da9b9cf739fdaac7fe488fd33b9615c`](vercel/vercel@742a6bd), [`7bafeff58fcdd781b943f8a9039a14aef3bd7de6`](vercel/vercel@7bafeff), [`34a8e7faa8086c4b5a0e3b6cc22d5b3d958bf71c`](vercel/vercel@34a8e7f)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`e62cd885d935120080327585065e9ca73bb9a16d`](vercel/vercel@e62cd88), [`742a6bdc1da9b9cf739fdaac7fe488fd33b9615c`](vercel/vercel@742a6bd), [`7bafeff58fcdd781b943f8a9039a14aef3bd7de6`](vercel/vercel@7bafeff), [`34a8e7faa8086c4b5a0e3b6cc22d5b3d958bf71c`](vercel/vercel@34a8e7f)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Handle patterns in rewrite destinations correctly ([#13052](vercel/vercel#13052)) ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`e62cd885d935120080327585065e9ca73bb9a16d`](vercel/vercel@e62cd88), [`742a6bdc1da9b9cf739fdaac7fe488fd33b9615c`](vercel/vercel@742a6bd), [`7bafeff58fcdd781b943f8a9039a14aef3bd7de6`](vercel/vercel@7bafeff), [`34a8e7faa8086c4b5a0e3b6cc22d5b3d958bf71c`](vercel/vercel@34a8e7f)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Leverage project settings to determine framework ([#13056](vercel/vercel#13056)) ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[]: - @vercel/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Handles patterns correctly in rewrites.
vercel/next.js#75973