Skip to content

[next] Handle patterns in rewrites - #13052

Merged
wyattjoh merged 2 commits into
mainfrom
fix/url-parsing
Feb 13, 2025
Merged

wyattjoh merged 2 commits into
mainfrom
fix/url-parsing

Conversation

@wyattjoh

Copy link
Copy Markdown
Contributor

Handles patterns correctly in rewrites.

vercel/next.js#75973

@changeset-bot

changeset-bot Bot commented Feb 12, 2025 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 949f8e3

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

This PR includes changesets to release 2 packages
Name Type
@vercel/next Patch
vercel 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

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Comment thread .changeset/great-mangos-try.md Resolved
pathname = pathname.substring(0, index);

// If there's a hash, we should remove it.
index = query.indexOf('#');

@ztanner ztanner Feb 13, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
}

@wyattjoh
wyattjoh added this pull request to the merge queue Feb 13, 2025
Merged via the queue into main with commit 892c9ef Feb 13, 2025
@wyattjoh
wyattjoh deleted the fix/url-parsing branch February 13, 2025 20:37
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

1 active deployment
Preview — 949f8e31 Deployed Feb 13, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants