diff --git a/packages/core/package.json b/packages/core/package.json index a53fea78..894a52c0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -82,7 +82,6 @@ "tsdown": "catalog:build", "typescript": "catalog:devtools", "unplugin-vue": "catalog:build", - "unplugin-vue-router": "catalog:playground", "vite": "catalog:build", "vue": "catalog:frontend", "vue-router": "catalog:playground", diff --git a/packages/core/playground/src/main.ts b/packages/core/playground/src/main.ts index ef10c3a0..b1f50595 100644 --- a/packages/core/playground/src/main.ts +++ b/packages/core/playground/src/main.ts @@ -1,6 +1,5 @@ import { createApp } from 'vue' import { createRouter, createWebHistory } from 'vue-router' -// @ts-expect-error skip type check import { routes } from 'vue-router/auto-routes' import App from './App.vue' diff --git a/packages/core/playground/typed-router.d.ts b/packages/core/playground/typed-router.d.ts index afa989e2..191869b1 100644 --- a/packages/core/playground/typed-router.d.ts +++ b/packages/core/playground/typed-router.d.ts @@ -1,26 +1,30 @@ /* eslint-disable */ /* prettier-ignore */ +// oxfmt-ignore // @ts-nocheck // noinspection ES6UnusedImports -// Generated by unplugin-vue-router. !! DO NOT MODIFY THIS FILE !! +// Generated by vue-router. !! DO NOT MODIFY THIS FILE !! // It's recommended to commit this file. // Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry. -declare module 'vue-router/auto-resolver' { - export type ParamParserCustom = never +import type { + RouteRecordInfo, + ParamValue, + ParamValueOneOrMore, + ParamValueZeroOrMore, + ParamValueZeroOrOne, +} from 'vue-router' + +declare module 'vue-router' { + interface TypesConfig { + ParamParsers: + | never + } } declare module 'vue-router/auto-routes' { - import type { - RouteRecordInfo, - ParamValue, - ParamValueOneOrMore, - ParamValueZeroOrMore, - ParamValueZeroOrOne, - } from 'vue-router' - /** - * Route name map generated by unplugin-vue-router + * Route name map generated by vue-router */ export interface RouteNamedMap { '/': RouteRecordInfo< @@ -40,7 +44,7 @@ declare module 'vue-router/auto-routes' { } /** - * Route file to route info map by unplugin-vue-router. + * Route file to route info map by vue-router. * Used by the \`sfc-typed-router\` Volar plugin to automatically type \`useRoute()\`. * * Each key is a file path relative to the project root with 2 properties: @@ -75,3 +79,5 @@ declare module 'vue-router/auto-routes' { ? Info['routes'] : keyof RouteNamedMap } + +export {} diff --git a/packages/core/playground/vite.config.ts b/packages/core/playground/vite.config.ts index f8b97fa5..ef8f7e11 100644 --- a/packages/core/playground/vite.config.ts +++ b/packages/core/playground/vite.config.ts @@ -1,9 +1,9 @@ import process from 'node:process' import Vue from '@vitejs/plugin-vue' import UnoCSS from 'unocss/vite' -import VueRouter from 'unplugin-vue-router/vite' import { defineConfig } from 'vite' import Tracer from 'vite-plugin-vue-tracer' +import VueRouter from 'vue-router/vite' import { alias } from '../../../alias' import { A11yCheckerPlugin } from '../../../examples/plugin-a11y-checker/src/node' import { GitUIPlugin } from '../../../examples/plugin-git-ui/src/node' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2738e8bf..93022395 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -331,9 +331,6 @@ catalogs: specifier: ^1.9.1 version: 1.9.1 playground: - unplugin-vue-router: - specifier: ^0.19.2 - version: 0.19.2 vite-plugin-vue-tracer: specifier: ^1.3.0 version: 1.3.0 @@ -762,9 +759,6 @@ importers: unplugin-vue: specifier: catalog:build version: 7.1.1(@types/node@25.0.3)(@vitejs/devtools@0.1.3)(esbuild@0.27.4)(jiti@2.6.1)(terser@5.44.1)(tsx@4.21.0)(vue@3.5.30(typescript@5.9.3))(yaml@2.8.2) - unplugin-vue-router: - specifier: catalog:playground - version: 0.19.2(@vue/compiler-sfc@3.5.30)(vue-router@5.0.4(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)) vite: specifier: ^8.0.1 version: 8.0.1(@types/node@25.0.3)(@vitejs/devtools@0.1.3)(esbuild@0.27.4)(jiti@2.6.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) @@ -7603,16 +7597,6 @@ packages: resolution: {integrity: sha512-5lWVjgi6vuHhJ526bI4nlCOmkCIF3nnfXkCMDeMJrtdvxTs6ZFCM8oNufGTsDbKv/tJ/xj8RpvXjRuPBZJuJog==} engines: {node: '>=20.19.0'} - unplugin-vue-router@0.19.2: - resolution: {integrity: sha512-u5dgLBarxE5cyDK/hzJGfpCTLIAyiTXGlo85COuD4Nssj6G7NxS+i9mhCWz/1p/ud1eMwdcUbTXehQe41jYZUA==} - deprecated: 'Merged into vuejs/router. Migrate: https://router.vuejs.org/guide/migration/v4-to-v5.html' - peerDependencies: - '@vue/compiler-sfc': ^3.5.17 - vue-router: ^4.6.0 - peerDependenciesMeta: - vue-router: - optional: true - unplugin-vue@7.1.1: resolution: {integrity: sha512-0171rToKyJtoz+faE9CSGtAhCF7//t8sJueyyfZujf4RcKtoHLU/wqcsnuH5aq3tDB+I/Tg6IXiWgPvI+TK/zw==} engines: {node: '>=20.19.0'} @@ -16190,31 +16174,6 @@ snapshots: pathe: 2.0.3 picomatch: 4.0.3 - unplugin-vue-router@0.19.2(@vue/compiler-sfc@3.5.30)(vue-router@5.0.4(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)): - dependencies: - '@babel/generator': 7.29.1 - '@vue-macros/common': 3.1.2(vue@3.5.30(typescript@5.9.3)) - '@vue/compiler-sfc': 3.5.30 - '@vue/language-core': 3.2.6 - ast-walker-scope: 0.8.3 - chokidar: 5.0.0 - json5: 2.2.3 - local-pkg: 1.1.2 - magic-string: 0.30.21 - mlly: 1.8.2 - muggle-string: 0.4.1 - pathe: 2.0.3 - picomatch: 4.0.3 - scule: 1.3.0 - tinyglobby: 0.2.15 - unplugin: 2.3.11 - unplugin-utils: 0.3.1 - yaml: 2.8.2 - optionalDependencies: - vue-router: 5.0.4(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)) - transitivePeerDependencies: - - vue - unplugin-vue@7.1.1(@types/node@25.0.3)(@vitejs/devtools@0.1.3)(esbuild@0.27.4)(jiti@2.6.1)(terser@5.44.1)(tsx@4.21.0)(vue@3.5.30(typescript@5.9.3))(yaml@2.8.2): dependencies: '@jridgewell/gen-mapping': 0.3.13 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 1fd59a3f..3e44a4a1 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -136,7 +136,6 @@ catalogs: immer: ^11.1.4 stream-json: ^1.9.1 playground: - unplugin-vue-router: ^0.19.2 vite-plugin-vue-tracer: ^1.3.0 vue-router: ^5.0.4 resolutions: