two-stroke 8.0.15 → 8.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +8 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "two-stroke",
3
- "version": "8.0.15",
3
+ "version": "8.0.16",
4
4
  "description": "Simple Cloudflare Worker framework.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/index.ts CHANGED
@@ -374,8 +374,8 @@ export function twoStroke<T>(
374
374
  method: "PUT",
375
375
  path,
376
376
  matcher: new RegExp(
377
- // oxlint-disable-next-line unicorn/prefer-string-raw
378
- `^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<$seg>[^\\/]*)")}$`,
377
+ // oxlint-disable-next-line no-template-curly-in-string
378
+ `^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<${seg}>[^\\/]*)")}$`,
379
379
  ),
380
380
  input,
381
381
  output,
@@ -397,8 +397,8 @@ export function twoStroke<T>(
397
397
  method: "POST",
398
398
  path,
399
399
  matcher: new RegExp(
400
- // oxlint-disable-next-line unicorn/prefer-string-raw
401
- `^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<$seg>[^\\/]*)")}$`,
400
+ // oxlint-disable-next-line no-template-curly-in-string
401
+ `^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<${seg}>[^\\/]*)")}$`,
402
402
  ),
403
403
  input,
404
404
  output,
@@ -419,8 +419,8 @@ export function twoStroke<T>(
419
419
  method: "GET",
420
420
  path,
421
421
  matcher: new RegExp(
422
- // oxlint-disable-next-line unicorn/prefer-string-raw
423
- `^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<$seg>[^\\/]*)")}$`,
422
+ // oxlint-disable-next-line no-template-curly-in-string
423
+ `^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<${seg}>[^\\/]*)")}$`,
424
424
  ),
425
425
  output,
426
426
  handler,
@@ -439,8 +439,8 @@ export function twoStroke<T>(
439
439
  method: "DELETE",
440
440
  path,
441
441
  matcher: new RegExp(
442
- // oxlint-disable-next-line unicorn/prefer-string-raw
443
- `^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<$seg>[^\\/]*)")}$`,
442
+ // oxlint-disable-next-line no-template-curly-in-string
443
+ `^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<${seg}>[^\\/]*)")}$`,
444
444
  ),
445
445
  output,
446
446
  handler,