Uh oh!
There was an error while loading. Please reload this page.
fix(core): match multi-variable URI template path expressions - #2216
fix(core): match multi-variable URI template path expressions#2216he-yufeng wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 8549a3e The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 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 |
@modelcontextprotocol/client@modelcontextprotocol/codemod@modelcontextprotocol/core@modelcontextprotocol/server@modelcontextprotocol/server-legacy@modelcontextprotocol/express@modelcontextprotocol/fastify@modelcontextprotocol/hono@modelcontextprotocol/nodecommit: |
he-yufeng
commented
Jun 4, 2026
Rebased this onto current Local checks:
The branch now contains only the UriTemplate fix, its regression test, and the changeset. |
fc61b9b to
7f65ae4Comparehe-yufeng
commented
Jun 12, 2026
Rebased onto current Focused validation after the rebase: Result: core |
17d27e2 to
7e1b23dCompare7e1b23d to
c9b464fCompare
Fixes#2166.
UriTemplate.match()built a single capture group for simple expressions with multiple variable names, so a template like/users/{userId,format}rejected the comma separator and only knew about the first variable. The matcher now emits one capture group per variable for non-exploded simple expressions, separated by literal commas.This keeps the existing single-variable and exploded matching behavior intact, and adds a regression test for
/users/42,jsonreturning bothuserIdandformat.Validation:
pnpm --filter @modelcontextprotocol/core test -- test/shared/uriTemplate.test.tspnpm --filter @modelcontextprotocol/core typecheckpnpm --filter @modelcontextprotocol/core lintpnpm changeset status --since upstream/maintypecheck:all,build:all,lint:all