From: Eduardo San Martin Morote Date: Mon, 11 Aug 2025 08:06:49 +0000 (+0200) Subject: chore: rename to int X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Ffeat%2Fnew-matcher;p=thirdparty%2Fvuejs%2Frouter.git chore: rename to int --- diff --git a/packages/experiments-playground/src/router/index.ts b/packages/experiments-playground/src/router/index.ts index c8b5b2b1..cc283621 100644 --- a/packages/experiments-playground/src/router/index.ts +++ b/packages/experiments-playground/src/router/index.ts @@ -5,7 +5,7 @@ import { MatcherPatternPathStatic, MatcherPatternPathCustomParams, normalizeRouteRecord, - PARAM_PARSER_INTEGER, + PARAM_PARSER_INT, } from 'vue-router/experimental' import type { EXPERIMENTAL_RouteRecordNormalized_Matchable, @@ -146,7 +146,7 @@ const r_profiles_detail = normalizeRouteRecord({ // this version handles all kind of params but in practice, // the generation should recognize this is a single required param // and therefore userId is of type number - userId: PARAM_PARSER_INTEGER, + userId: PARAM_PARSER_INT, }, ['profiles', 0] ), diff --git a/packages/router/src/experimental/index.ts b/packages/router/src/experimental/index.ts index 595128ee..a1a95c9b 100644 --- a/packages/router/src/experimental/index.ts +++ b/packages/router/src/experimental/index.ts @@ -25,7 +25,7 @@ export { MatcherPatternPathCustomParams, // custom param parsers // TODO: find a more elegant format than having 4 variants per param type - PARAM_PARSER_INTEGER, + PARAM_PARSER_INT, PARAM_INTEGER_SINGLE, PARAM_NUMBER_OPTIONAL, PARAM_NUMBER_REPEATABLE, diff --git a/packages/router/src/experimental/route-resolver/matchers/matcher-pattern.ts b/packages/router/src/experimental/route-resolver/matchers/matcher-pattern.ts index 89fc978c..e0202508 100644 --- a/packages/router/src/experimental/route-resolver/matchers/matcher-pattern.ts +++ b/packages/router/src/experimental/route-resolver/matchers/matcher-pattern.ts @@ -254,7 +254,7 @@ export const PARAM_NUMBER_REPEATABLE_OPTIONAL = { * * @internal */ -export const PARAM_PARSER_INTEGER: Param_GetSet = { +export const PARAM_PARSER_INT: Param_GetSet = { get: value => Array.isArray(value) ? PARAM_NUMBER_REPEATABLE.get(value)