-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Custom Route Resolvers #2415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
posva
wants to merge
92
commits into
main
Choose a base branch
from
feat/new-matcher
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Custom Route Resolvers #2415
Changes from 83 commits
Commits
Show all changes
92 commits
Select commit
Hold shift + click to select a range
474596f
feat: wip new matcher
posva 745dabc
test: check parsed urls
posva 3b893cf
chore: build location
posva f89a842
perf: parseURL minor improvements
posva 38606b9
refactor: avoid double decoding
posva af7afb5
refactor: add fullPath
posva f26e919
chore: static path matcher
posva b7204fa
chore: error matches
posva 684e970
test: static matcher
posva 7cec10b
refactor: unused code
posva b0e0f0d
chore: ignore temp tsconfig
posva 42bd1ac
test: better IM after hash
posva 8204744
test: url parsing
posva ca95567
refactor: simplify parseURL
posva 17bb729
chore: comment
posva f8cdff0
chore: comments
posva 0d86f5a
refactor: renames and minor changes
posva c18e14f
refactor: simplify matcher interfaces
posva e1de9e6
refactor: remove unused code
posva 00eef15
refactor: rename matcher-pattern
posva d061304
refactor: add methods needed by router
posva 89035ea
feat: new dynamic path matcher
posva 84ac19e
refactor: reorganize types and add initial experimental router
posva 9af1441
chore: comments
posva e080bff
refactor: simplify router resolve
posva 047858d
chore: wip encoding
posva a8e01d3
chore: small fix
posva 0efc390
refactor: rename matcher to resolver
posva 2d17e5b
chore: remove unused
posva 1471a07
test: fix ts errors
posva 9780e91
test: remove old matcher refs
posva 800721f
chore: remove last ts errors
posva e9ba885
feat: support partial locations
posva 3fe030a
chore: rename
posva b7b0bbf
feat: allow string in matcher resolve
posva a218b24
test: stricter no match test
posva ef995f4
feat: handle children
posva 4b8ac59
refactor: simplify new resolver to be static
posva 46aa26d
build: use tsdown
posva bce9486
docs: upgrade typedoc
posva 38e5ed2
refactor: matchers tests
posva 37aaddc
refactor: extended type of record
posva ce463fd
build: test out size
posva fe74a7b
chore: use mjs file
posva 94e6813
feat: expose experimental package
posva de402ff
chore: add experimental playground'
posva ecc2666
chore: minor playground
posva 5e2cd9e
chore: fix ts in playground
posva 4477471
chore: show route info in playground
posva 99cfc82
chore: add nested and layouts
posva a281602
chore: more
posva 8859028
chore: add schema to tsconfig
posva d238f6d
refactor: loose children property in normalized records
posva 316fb9b
chore: showaces layout level query params
posva 5a60b24
chore: more links'
posva 4ccd88a
refactor: reorg resolver
posva 398b128
chore: ignore file
posva 606c919
build: add experimental
posva 0027186
chore: comment style
posva 879fae6
feat: allow multiple query matchers per route
posva f48f51d
chore: playground
posva 5e84856
feat: make children optional in experimental
posva 93d36a0
refactor: use warn
posva ca12ba3
chore: comment
posva 8fa7a70
chore: dx
posva bf813e8
chore: typo
posva 3be0abd
fix(types): missing options in RouteLocationGeneric
posva 6fec4ac
refactor: types
posva 26bb388
chore: remove build
posva 5fa416a
feat: MatcherPatternPathCustom
posva 8b8cebf
feat: custom param
posva d746242
build: add node version back
posva 01770df
build: remove non needed copy
posva 7df84d9
chore: debug globals
posva f006032
chore: initial param parsers
posva 86bc30f
build: cross compat
posva e0a6c2a
chore: import order
posva 5b985d8
chore: fix non relative imports
posva 9d15638
test: reuse utils
posva f846fad
refactor: add encoding within matcher
posva 1d6b6ec
feat(types): typed MatcherPatternPathCustomParams
posva d3aff90
chore: unused import
posva 27ab8e0
refactor: simpler param recognition in build
posva b931c7f
test: more
posva a1abbcb
refactor: leftover
posva 08dfd9e
refactor: merge the parser config
posva 18ccc00
refactor: identity fn
posva dce4df5
chore: outdated comments
posva 441d75b
refactor: use identity instad of boolean
posva 8fd456f
test: fix parser usage
posva e2966b0
refactor: put TOut type param first
posva 2cfaaba
chore: rename to int
posva File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ local.log | |
_selenium-server.log | ||
packages/*/LICENSE | ||
tracing_output | ||
tsconfig.vitest-temp.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.vitepress/cache | ||
api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
import path from 'node:path' | ||
import { fileURLToPath } from 'node:url' | ||
import { createTypeDocApp } from './typedoc-markdown.mjs' | ||
|
||
const __dirname = path.dirname(fileURLToPath(import.meta.url)) | ||
const __dirname = path.dirname(new URL(import.meta.url).pathname) | ||
|
||
createTypeDocApp({ | ||
name: 'API Documentation', | ||
textContentMappings: { | ||
'title.indexPage': 'API Reference', | ||
'title.memberPage': '{name}', | ||
}, | ||
tsconfig: path.resolve(__dirname, './typedoc.tsconfig.json'), | ||
// entryPointStrategy: 'packages', | ||
categorizeByGroup: true, | ||
githubPages: false, | ||
disableSources: true, // some links are in node_modules and it's ugly | ||
plugin: ['typedoc-plugin-markdown'], | ||
readme: 'none', | ||
indexFormat: 'table', | ||
disableSources: true, | ||
plugin: ['typedoc-plugin-markdown', 'typedoc-vitepress-theme'], | ||
useCodeBlocks: true, | ||
entryPoints: [path.resolve(__dirname, '../router/src/index.ts')], | ||
}).then(app => app.build()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
.DS_Store | ||
dist | ||
dist-ssr | ||
coverage | ||
*.local | ||
|
||
/cypress/videos/ | ||
/cypress/screenshots/ | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
*.tsbuildinfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["Vue.volar"] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# experiments-playground | ||
|
||
This template should help get you started developing with Vue 3 in Vite. | ||
|
||
## Recommended IDE Setup | ||
|
||
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). | ||
|
||
## Type Support for `.vue` Imports in TS | ||
|
||
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. | ||
|
||
## Customize configuration | ||
|
||
See [Vite Configuration Reference](https://vite.dev/config/). | ||
|
||
## Project Setup | ||
|
||
```sh | ||
pnpm install | ||
``` | ||
|
||
### Compile and Hot-Reload for Development | ||
|
||
```sh | ||
pnpm dev | ||
``` | ||
|
||
### Type-Check, Compile and Minify for Production | ||
|
||
```sh | ||
pnpm build | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="vite/client" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang=""> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "experiments-playground", | ||
"version": "0.0.0", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"preview": "vite preview", | ||
"build-only": "vite build", | ||
"type-check": "vue-tsc --build" | ||
}, | ||
"dependencies": { | ||
"vue": "^3.5.17", | ||
"vue-router": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@tsconfig/node22": "^22.0.2", | ||
"@types/node": "^22.15.32", | ||
"@vitejs/plugin-vue": "^6.0.0", | ||
"@vue/tsconfig": "^0.7.0", | ||
"npm-run-all2": "^8.0.4", | ||
"typescript": "~5.8.0", | ||
"vite": "^7.0.0", | ||
posva marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"vite-plugin-vue-devtools": "^7.7.7", | ||
"vue-tsc": "^2.2.10" | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.