Skip to content

Commit bb44504

Browse files
committed
Merge branch 'main' into perf-releases
# Conflicts: # README.md # packages/router/CHANGELOG.md # packages/router/package.json
2 parents 633d9e6 + 36aed4f commit bb44504

File tree

129 files changed

+956
-6582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+956
-6582
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: Help and Question
3+
- name: 👨‍💻 Support
4+
url: https://cal.com/posva/consultancy
5+
about: Get direct help from the author of Vue Router with your project
6+
- name: ❓ Help & Questions
47
url: https://github.com/vuejs/router/discussions/new?category=help-and-questions
58
about: Ask a question or discuss about Vue Router
6-
- name: GitHub Sponsors
9+
- name: 💡 Ideas
10+
url: https://github.com/vuejs/router/discussions/new?category=ideas
11+
about: Start a discussion to improve Vue Router
12+
- name: 🌟 GitHub Sponsors
713
url: https://github.com/sponsors/posva
814
about: Like this project? Please consider supporting the author.
915
- name: Open Collective

.github/contributing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ Hi! I'm really excited that you are interested in contributing to Vue Router. Be
3434

3535
- Make sure tests pass!
3636

37-
- Commit messages must follow the [commit message convention](./commit-convention.md) so that the changelog can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [yorkie](https://github.com/yyx990803/yorkie)).
37+
- Commit messages must follow the [commit message convention](./commit-convention.md) so that the changelog can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks)).
3838

39-
- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [yorkie](https://github.com/yyx990803/yorkie)).
39+
- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks)).
4040

4141
## Development Setup
4242

@@ -52,7 +52,7 @@ A high-level overview of tools used:
5252

5353
- [TypeScript](https://www.typescriptlang.org/) as the development language
5454
- [Rollup](https://rollupjs.org) for bundling
55-
- [Jest](https://jestjs.io/) for unit testing
55+
- [Vitest](https://vitest.dev/) for unit testing
5656
- [Prettier](https://prettier.io/) for code formatting
5757

5858
## Scripts
@@ -83,7 +83,7 @@ The `pnpm test` script runs all checks:
8383
$ pnpm test
8484

8585
# run unit tests in watch mode
86-
$ pnpm jest --watch
86+
$ pnpm test:unit --watch
8787
```
8888

8989
## Project Structure
@@ -102,7 +102,7 @@ Vue Router source code can be found in the `src` directory:
102102

103103
## Contributing Tests
104104

105-
Unit tests are located inside `__tests__`. Consult the [Jest docs](https://jestjs.io/docs/en/using-matchers) and existing test cases for how to write new test specs. Here are some additional guidelines:
105+
Unit tests are located inside `__tests__`. Consult the [Vitest docs](https://vitest.dev/guide/) and existing test cases for how to write new test specs. Here are some additional guidelines:
106106

107107
- Use the minimal API needed for a test case. For example, if a test can be written without involving the reactivity system or a component, it should be written so. This limits the test's exposure to changes in unrelated parts and makes it more stable.
108108
- Use the minimal API needed for a test case. For example, if a test concerns the `router-link` component, don't create a router instance, mock the required properties instead.

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ __build__
22
dist
33
coverage
44
tests_output
5+
packages/docs/.vitepress/cache

package.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424
"play": "pnpm run -r play",
2525
"build:size": "pnpm run -r build:size",
2626
"lint": "pnpm run lint:script && pnpm run lint:html",
27-
"lint:script": "prettier -c --parser typescript \"packages/*/{src,__tests__,e2e}/**/*.[jt]s?(x)\"",
27+
"lint:script": "prettier -c --parser typescript \"packages/**/*.?(m)[jt]s?(x)\" \"scripts/*.mjs\"",
2828
"lint:html": "prettier -c --parser html \"packages/**/*.html\"",
2929
"lint:fix": "pnpm run lint:script --write && pnpm run lint:html --write",
30-
"test": "pnpm run -r test"
30+
"test": "pnpm run -r test",
31+
"postinstall": "simple-git-hooks"
3132
},
3233
"devDependencies": {
3334
"@vitest/coverage-v8": "^2.1.5",
@@ -40,24 +41,27 @@
4041
"lint-staged": "^15.2.10",
4142
"minimist": "^1.2.8",
4243
"p-series": "^3.0.0",
43-
"prettier": "^2.8.8",
44+
"prettier": "^3.5.2",
4445
"semver": "^7.6.3",
46+
"simple-git-hooks": "^2.11.1",
4547
"typedoc": "^0.26.11",
4648
"typedoc-plugin-markdown": "^4.2.10",
4749
"typescript": "~5.6.3",
48-
"vitest": "^2.1.5",
49-
"yorkie": "^2.0.0"
50+
"vitest": "^2.1.5"
5051
},
51-
"gitHooks": {
52-
"pre-commit": "lint-staged",
52+
"simple-git-hooks": {
53+
"pre-commit": "pnpm lint-staged",
5354
"commit-msg": "node scripts/verifyCommit.mjs"
5455
},
5556
"lint-staged": {
56-
"*.js": [
57+
"*.?(m)js": [
5758
"prettier --write"
5859
],
59-
"*.ts?(x)": [
60+
"*.?(m)ts?(x)": [
6061
"prettier --parser=typescript --write"
62+
],
63+
"*.html": [
64+
"prettier --parser=html --write"
6165
]
6266
},
6367
"pnpm": {

packages/docs/.vitepress/config/index.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ export default defineConfig({
1010
root: { label: 'English', lang: 'en-US', link: '/', ...enConfig },
1111
zh: { label: '简体中文', lang: 'zh-CN', link: '/zh/', ...zhConfig },
1212
ko: { label: '한국어', lang: 'ko-KR', link: 'https://router.vuejs.kr/' },
13-
pt: { label: 'Português', lang: 'pt-PT', link: 'https://vue-router-docs-pt.netlify.app/' },
14-
ru: { label: 'Русский', lang: 'ru-RU', link: 'https://vue-router-ru.netlify.app' },
13+
pt: {
14+
label: 'Português',
15+
lang: 'pt-PT',
16+
link: 'https://vue-router-docs-pt.netlify.app/',
17+
},
18+
ru: {
19+
label: 'Русский',
20+
lang: 'ru-RU',
21+
link: 'https://vue-router-ru.netlify.app',
22+
},
1523
},
1624
})

packages/docs/.vitepress/config/shared.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ export const sharedConfig = defineConfig({
135135
],
136136

137137
footer: {
138-
copyright: 'Copyright © 2014-present Evan You, Eduardo San Martin Morote',
138+
copyright:
139+
'Copyright © 2014-present Evan You, Eduardo San Martin Morote',
139140
message: 'Released under the MIT License.',
140141
},
141142

packages/docs/.vitepress/theme/components/AsideSponsors.vue

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,30 @@ interface Sponsor {
1313
1414
const asideSponsors = computed(() => {
1515
return [
16+
...(sponsors.platinum.length
17+
? [
18+
{
19+
items: sponsors.platinum.map((sponsor: Sponsor) => ({
20+
name: sponsor.alt,
21+
url: sponsor.href,
22+
img: sponsor.imgSrcLight,
23+
})),
24+
},
25+
]
26+
: []),
1627
{
1728
size: 'mini',
18-
items: sponsors.platinum.length ? sponsors.platinum.map((sponsor: Sponsor) => ({
19-
name: sponsor.alt,
20-
url: sponsor.href,
21-
img: sponsor.imgSrcLight,
22-
})) : [
23-
{
29+
items: sponsors.gold
30+
.map((sponsor: Sponsor) => ({
31+
name: sponsor.alt,
32+
url: sponsor.href,
33+
img: sponsor.imgSrcLight,
34+
}))
35+
.concat({
2436
name: 'Become a sponsor',
2537
url: 'https://github.com/sponsors/posva',
26-
img: '/your-logo-here.svg'
27-
}
28-
],
38+
img: '/your-logo-here.svg',
39+
}),
2940
},
3041
{
3142
size: 'xmini',

0 commit comments

Comments
 (0)