What problem does it solve?
Upgrading path-to-regexp from v6 to v8 breaks existing path strings in RestEndpoint and resource() definitions, causing runtime errors like "Unexpected ?" or "Unexpected +" during path compilation. This Skill provides the exact syntax conversion rules to update every affected path string.
Core Features & Use Cases
- Optional Parameter Conversion: Rewrites
/:id? suffix syntax into v8 brace groups like {/:id}.
- Wildcard and Repeating Parameter Migration: Converts
+ and * suffixes into the *name wildcard syntax.
- Escaping and Quoting Rules: Handles literal special characters with
\\ escapes and quoted parameter names like /:"with-dash".
- Use Case: After upgrading @data-client/rest, your app throws "Unexpected ?" errors on endpoints with optional params. Use this Skill to locate every
path: string in RestEndpoint, resource(), and .extend() calls and rewrite them to valid v8 syntax.
Quick Start
Ask the AI to migrate all RestEndpoint path strings in this repository from path-to-regexp v6 to v8 syntax.