Skip to content

Commit

Permalink
Update dependency path-to-regexp to v7 (#2204)
Browse files Browse the repository at this point in the history
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [path-to-regexp](https://togithub.com/pillarjs/path-to-regexp) | [`6.2.2` -> `7.0.0`](https://renovatebot.com/diffs/npm/path-to-regexp/6.2.2/7.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/path-to-regexp/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/path-to-regexp/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/path-to-regexp/6.2.2/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/path-to-regexp/6.2.2/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>pillarjs/path-to-regexp (path-to-regexp)</summary>

### [`v7.0.0`](https://togithub.com/pillarjs/path-to-regexp/releases/tag/v7.0.0): Wildcard, unicode, and modifier changes

[Compare Source](https://togithub.com/pillarjs/path-to-regexp/compare/v6.2.2...v7.0.0)

Hi all! There's a few major breaking changes in this release so read carefully.

**Breaking changes:**

-   Parameter names can now contain all unicode identifier characters (defined as regex `\p{XID_Continue}`).
-   No more implied prefix with `/` and `.` (this is relevant when using `?`, `*`, or `+`)
-   Modifiers (`?`, `*`, `+`) must be used after a param explicitly wrapped in `{}`
-   The API is no longer supporting arrays or regexes as input
-   The wildcard (standalone `*`) has been added back and matches Express.js expected behavior
-   Removed `endsWith` option
-   Renamed `strict: true` to `trailing: false`
-   Reserved `;`, `,`, `!`, and `@` for future use-cases
-   Removed `tokensToRegexp`, `tokensToFunction` and `regexpToFunction` in favor of simplifying exports
-   Enable a "loose" mode by default, so `/` can be repeated multiple times in a matched path (i.e. `/foo` works like `//foo`, etc)
-   `encode` and `decode` no longer receive the token as the second parameter
-   Removed the ESM + CommonJS dual package in favor of only one CommonJS supported export
-   Minimum JS support for ES2020 (previous ES2015)
-   Stricter `compile` function - expects an array of strings in repeated parameters, and strings in non-repeated parameters

**Added:**

-   Adds `encodePath` to fix an issue around `encode` being used for both path and parameters (the path and parameter should be encoded slightly differently)
-   Adds `loose` as an option to support arbitrarily matching the delimiter in paths, e.g. `foo/bar` and `foo///bar` should work the same
-   Allow `encode` and `decode` to be set to `false` which skips all processing of the parameters input/output
-   All remaining methods support `TokenData` (exported, returned by `parse`) as input
    -   This should be useful if you are programmatically building paths to match or want to avoid parsing multiple times

**Requests for feedback:**

-   Requiring `{}` is an obvious drawback but I'm seeking feedback on whether it helps make path behavior clearer
    -   Related: Removing `/` and `.` as implicit prefixes
-   Removing array and regex support is to reduce the overall package size for things many users don't need
-   Unicode IDs are added to align more closely with browser URLPattern behavior, which uses JS identifiers

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Nextjs).
  • Loading branch information
renovate[bot] authored Jun 30, 2024
1 parent 7d8ebf3 commit 7120bdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
"os-browserify": "0.3.0",
"p-limit": "5.0.0",
"path-browserify": "1.0.1",
"path-to-regexp": "6.2.2",
"path-to-regexp": "7.0.0",
"platform": "1.3.6",
"postcss-flexbugs-fixes": "5.0.2",
"postcss-modules-extract-imports": "3.1.0",
Expand Down

0 comments on commit 7120bdf

Please sign in to comment.