Skip to content

[node][remix][routing-utils] better path-to-regexp diff logging#12962

Merged
EndangeredMassa merged 23 commits intomainfrom
smassa/better-path-regexp-diff-log
Feb 5, 2025
Merged

[node][remix][routing-utils] better path-to-regexp diff logging#12962
EndangeredMassa merged 23 commits intomainfrom
smassa/better-path-regexp-diff-log

Conversation

@EndangeredMassa
Copy link
Copy Markdown
Contributor

@EndangeredMassa EndangeredMassa commented Jan 29, 2025

Updated the path-to-regexp comparison:

  • centralized logic because it was getting coplicated
  • compared keys more carefully
  • use keys in updated path-to-regexp function as a clone of the original to avoid duplicate values

Follow-up to: #12926

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 29, 2025

🦋 Changeset detected

Latest commit: 30aea45

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

This PR includes changesets to release 6 packages
Name Type
@vercel/node Patch
@vercel/remix-builder Patch
@vercel/routing-utils Patch
vercel Patch
@vercel/client Patch
@vercel/fs-detectors 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

@EndangeredMassa EndangeredMassa changed the title better path-to-regexp diff logging [node][remix][routing-utils] better path-to-regexp diff logging Jan 29, 2025
erikareads
erikareads previously approved these changes Jan 31, 2025
erikareads
erikareads previously approved these changes Jan 31, 2025
TooTallNate
TooTallNate previously approved these changes Jan 31, 2025
@TooTallNate TooTallNate dismissed stale reviews from erikareads and themself via 9c1777c January 31, 2025 23:44
TooTallNate
TooTallNate previously approved these changes Jan 31, 2025
@EndangeredMassa EndangeredMassa merged commit 1509903 into main Feb 5, 2025
146 checks passed
@EndangeredMassa EndangeredMassa deleted the smassa/better-path-regexp-diff-log branch February 5, 2025 21:00
EndangeredMassa pushed a commit that referenced this pull request Feb 5, 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
## [email protected]

### Patch Changes

- [cli] remove warning `projects lists --update-required` about
deprecated node versions
([#13016](#13016))

- [cli] updat vercel/fun to 1.1.4
([#13018](#13018))

- Updated dependencies
\[[`38758561c2cfe9ebae2b1d2af506b585639a2b84`](3875856),
[`150990344d7195c72bb336614153c77d8cefb78c`](1509903)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`150990344d7195c72bb336614153c77d8cefb78c`](1509903)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Enable "demo" property for "react-router" framework
([#13008](#13008))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`ed69811b310bc46347b225f516ff2f7e0817933c`](ed69811),
[`150990344d7195c72bb336614153c77d8cefb78c`](1509903)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- ensure non-locale prefixed route variants come after more specific
ones ([#13003](#13003))

## @vercel/[email protected]

### Patch Changes

- better path-to-regexp diff logging
([#12962](#12962))

## @vercel/[email protected]

### Patch Changes

- better path-to-regexp diff logging
([#12962](#12962))

## @vercel/[email protected]

### Patch Changes

- better path-to-regexp diff logging
([#12962](#12962))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
});
console.error(`[vc] PATH TO REGEXP PATH DIFF @ #${callerId}: ${message}`);
}
import { pathToRegexp, compile, Key } from '@vercel-internals/path-to-regexp';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This was moved to devDeps but you are using it in a normal code path. The published package is crashing for consumers, like @astrojs/vercel

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It looks like this is because unlike the runtime packages, @vercel/routing-utils isn't being bundled, so internal packages aren't being included.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I've opened an issue: #13024

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
## [email protected]

### Patch Changes

- [cli] remove warning `projects lists --update-required` about
deprecated node versions
([#13016](vercel/vercel#13016))

- [cli] updat vercel/fun to 1.1.4
([#13018](vercel/vercel#13018))

- Updated dependencies
\[[`058206a7f6eb9cff485e1c042c4256188e83d0a8`](vercel/vercel@058206a),
[`d981974034b9dac4c381985ac7c946d9cc435c7d`](vercel/vercel@d981974)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`d981974034b9dac4c381985ac7c946d9cc435c7d`](vercel/vercel@d981974)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Enable "demo" property for "react-router" framework
([#13008](vercel/vercel#13008))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`2e6531d89c912ccc6a855ddc0062673515489ad1`](vercel/vercel@2e6531d),
[`d981974034b9dac4c381985ac7c946d9cc435c7d`](vercel/vercel@d981974)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- ensure non-locale prefixed route variants come after more specific
ones ([#13003](vercel/vercel#13003))

## @vercel/[email protected]

### Patch Changes

- better path-to-regexp diff logging
([#12962](vercel/vercel#12962))

## @vercel/[email protected]

### Patch Changes

- better path-to-regexp diff logging
([#12962](vercel/vercel#12962))

## @vercel/[email protected]

### Patch Changes

- better path-to-regexp diff logging
([#12962](vercel/vercel#12962))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

5 participants