import {
type MatcherLocationRaw,
type ResolverLocationResolved,
- type NEW_MatcherRecord,
NO_MATCH_LOCATION,
} from './resolver-abstract'
-import { type NEW_MatcherRecordRaw } from './resolver-dynamic'
-import { createCompiledMatcher } from './resolver-dynamic'
+import { type NEW_MatcherRecord } from './old/resolver-dynamic'
+import { type NEW_MatcherRecordRaw } from './old/resolver-dynamic'
+import { createCompiledMatcher } from './old/resolver-dynamic'
import { miss } from './matchers/errors'
import {
MatcherPatternPath,
MatcherPatternQuery,
MatcherPatternHash,
} from './matcher-pattern'
-import { NEW_MatcherRecord } from '../resolver-abstract'
+import { NEW_MatcherRecord } from '../old/resolver-dynamic'
import { invalid, miss } from './errors'
export const ANY_PATH_PATTERN_MATCHER: MatcherPatternPath<{
import { describe, expect, it } from 'vitest'
-import { NO_MATCH_LOCATION, pathEncoded } from './resolver-abstract'
+import { NO_MATCH_LOCATION, pathEncoded } from '../resolver-abstract'
import { createCompiledMatcher } from './resolver-dynamic'
import {
MatcherPatternQuery,
MatcherPatternPathStatic,
MatcherPatternPathDynamic,
-} from './matchers/matcher-pattern'
+} from '../matchers/matcher-pattern'
import {
EMPTY_PATH_ROUTE,
USER_ID_ROUTE,
EMPTY_PATH_PATTERN_MATCHER,
USER_ID_PATH_PATTERN_MATCHER,
ANY_HASH_PATTERN_MATCHER,
-} from './matchers/test-utils'
+} from '../matchers/test-utils'
const PAGE_QUERY_PATTERN_MATCHER: MatcherPatternQuery<{ page: number }> = {
match: query => {
import { describe, expectTypeOf, it } from 'vitest'
-import { ResolverLocationResolved } from './resolver-abstract'
+import { ResolverLocationResolved } from '../resolver-abstract'
import { NEW_MatcherRecordRaw } from './resolver-dynamic'
import { NEW_RouterResolver } from './resolver-dynamic'
-import { EXPERIMENTAL_RouteRecordNormalized } from '../router'
+import { EXPERIMENTAL_RouteRecordNormalized } from '../../router'
describe('Matcher', () => {
type TMatcherRecordRaw = NEW_MatcherRecordRaw
LocationNormalized,
parseURL,
resolveRelativePath,
-} from '../../location'
-import { normalizeQuery, stringifyQuery, parseQuery } from '../../query'
-import type { MatcherParamsFormatted } from './matchers/matcher-pattern'
-import type { ResolverLocationAsRelative } from './resolver-abstract'
-import type { ResolverLocationAsPathAbsolute } from './resolver-abstract'
-import type { ResolverLocationAsPathRelative } from './resolver-abstract'
-import type { ResolverLocationAsNamed } from './resolver-abstract'
+} from '../../../location'
+import { normalizeQuery, stringifyQuery, parseQuery } from '../../../query'
+import type { MatcherParamsFormatted } from '../matchers/matcher-pattern'
+import type { ResolverLocationAsRelative } from '../resolver-abstract'
+import type { ResolverLocationAsPathAbsolute } from '../resolver-abstract'
+import type { ResolverLocationAsPathRelative } from '../resolver-abstract'
+import type { ResolverLocationAsNamed } from '../resolver-abstract'
import {
MatcherQueryParams,
EXPERIMENTAL_Resolver_Base,
NO_MATCH_LOCATION,
RecordName,
ResolverLocationResolved,
-} from './resolver-abstract'
-import { comparePathParserScore } from '../../matcher/pathParserRanker'
-import { warn } from '../../warning'
+} from '../resolver-abstract'
+import { comparePathParserScore } from '../../../matcher/pathParserRanker'
+import { warn } from '../../../warning'
import type {
MatcherPatternPath,
MatcherPatternQuery,
MatcherPatternHash,
-} from './matchers/matcher-pattern'
+} from '../matchers/matcher-pattern'
/**
* Manage and resolve routes. Also handles the encoding, decoding, parsing and
score: Array<number[]>
}
+
+/**
+ * Normalized version of a {@link NEW_MatcherRecordRaw} record.
+ */
+export interface NEW_MatcherRecord extends NEW_MatcherDynamicRecord {}
} from '../../encoding'
import type { MatcherParamsFormatted } from './matchers/matcher-pattern'
import type { _RouteRecordProps } from '../../typed-routes'
-import type { NEW_MatcherDynamicRecord } from './resolver-dynamic'
import type { LocationNormalized } from '../../location'
/**
matched: [],
} satisfies Omit<ResolverLocationResolved<never>, keyof LocationNormalized>
-/**
- * Normalized version of a {@link NEW_MatcherRecordRaw} record.
- */
-export interface NEW_MatcherRecord extends NEW_MatcherDynamicRecord {}
-
// FIXME: move somewhere else
/**
* Tagged template helper to encode params into a path. Doesn't work with null