Skip to content

Commit 880e6d7

Browse files
committed
Merge branch 'main' into insert-matcher-perf
2 parents 48db602 + 0901d1b commit 880e6d7

Some content is hidden

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

56 files changed

+2173
-1432
lines changed

.github/workflows/test.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ jobs:
4242
# e2e tests that that run locally
4343
- run: pnpm run -r test:e2e:ci
4444

45-
- uses: codecov/codecov-action@v2
45+
- uses: codecov/codecov-action@v4
46+
with:
47+
token: ${{ secrets.CODECOV_TOKEN }}
4648

4749
# - name: 'Start BrowserStackLocal Tunnel'
4850
# uses: 'browserstack/github-actions/setup-local@master'

SECURITY.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Reporting a Vulnerability
2+
3+
To report a vulnerability, please email [email protected].
4+
5+
While the discovery of new vulnerabilities is rare, we also recommend always using the latest versions of Vue and its official companion libraries to ensure your application remains as secure as possible.

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "@vue/router-root",
33
"private": true,
4-
"packageManager": "pnpm@8.10.2",
4+
"packageManager": "pnpm@8.15.3",
55
"engines": {
6-
"node": ">=18.14.0"
6+
"node": ">=20.9.0"
77
},
88
"workspaces": [
99
"packages/*"
@@ -33,13 +33,13 @@
3333
"chalk": "^5.3.0",
3434
"enquirer": "^2.4.1",
3535
"execa": "^8.0.1",
36-
"globby": "^14.0.0",
37-
"lint-staged": "^15.2.0",
36+
"globby": "^14.0.1",
37+
"lint-staged": "^15.2.2",
3838
"minimist": "^1.2.8",
3939
"p-series": "^3.0.0",
4040
"prettier": "^2.8.8",
41-
"semver": "^7.5.4",
42-
"typedoc": "^0.25.3",
41+
"semver": "^7.6.0",
42+
"typedoc": "^0.25.8",
4343
"typedoc-plugin-markdown": "^3.17.1",
4444
"typescript": "~5.3.3",
4545
"yorkie": "^2.0.0"
@@ -66,6 +66,6 @@
6666
}
6767
},
6868
"volta": {
69-
"node": "18.16.0"
69+
"node": "20.11.1"
7070
}
7171
}

packages/docs/.vitepress/config/en.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
4646
},
4747
{
4848
text: 'Vue.js Certification',
49-
link: 'https://certification.vuejs.org/?friend=VUEROUTER',
49+
link: 'https://certificates.dev/vuejs/?friend=VUEROUTER&utm_source=router_vuejs&utm_medium=link&utm_campaign=router_vuejs_links&utm_content=navbar',
5050
},
5151
],
5252
},
@@ -70,7 +70,6 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
7070
},
7171
{
7272
text: 'Essentials',
73-
collapsible: false,
7473
items: [
7574
{
7675
text: 'Getting Started',
@@ -84,6 +83,10 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
8483
text: "Routes' Matching Syntax",
8584
link: '/guide/essentials/route-matching-syntax.html',
8685
},
86+
{
87+
text: 'Named Routes',
88+
link: '/guide/essentials/named-routes.html',
89+
},
8790
{
8891
text: 'Nested Routes',
8992
link: '/guide/essentials/nested-routes.html',
@@ -92,10 +95,6 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
9295
text: 'Programmatic Navigation',
9396
link: '/guide/essentials/navigation.html',
9497
},
95-
{
96-
text: 'Named Routes',
97-
link: '/guide/essentials/named-routes.html',
98-
},
9998
{
10099
text: 'Named Views',
101100
link: '/guide/essentials/named-views.html',
@@ -108,6 +107,10 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
108107
text: 'Passing Props to Route Components',
109108
link: '/guide/essentials/passing-props.html',
110109
},
110+
{
111+
text: 'Active links',
112+
link: '/guide/essentials/active-links.html',
113+
},
111114
{
112115
text: 'Different History modes',
113116
link: '/guide/essentials/history-mode.html',
@@ -116,7 +119,6 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
116119
},
117120
{
118121
text: 'Advanced',
119-
collapsible: false,
120122
items: [
121123
{
122124
text: 'Navigation guards',

packages/docs/.vitepress/config/zh.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
5050
},
5151
{
5252
text: 'Vue.js 认证',
53-
link: 'https://certification.vuejs.org/?friend=VUEROUTER',
53+
link: 'https://certificates.dev/vuejs/?friend=VUEROUTER&utm_source=router_vuejs&utm_medium=link&utm_campaign=router_vuejs_links&utm_content=navbar',
5454
},
5555
],
5656
},
@@ -79,7 +79,6 @@ export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
7979
},
8080
{
8181
text: '基础',
82-
collapsible: false,
8382
items: [
8483
{
8584
text: '入门',
@@ -125,7 +124,6 @@ export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
125124
},
126125
{
127126
text: '进阶',
128-
collapsible: false,
129127
items: [
130128
{
131129
text: '导航守卫',

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

+89-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,50 @@
1+
<script setup lang="ts">
2+
import { computed } from 'vue'
3+
import { VPDocAsideSponsors } from 'vitepress/theme'
4+
import sponsors from './sponsors.json'
5+
6+
// to avoid the never[] type in json
7+
interface Sponsor {
8+
alt: string
9+
href: string
10+
imgSrcDark: string
11+
imgSrcLight: string
12+
}
13+
14+
const asideSponsors = computed(() => {
15+
return [
16+
{
17+
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+
{
24+
name: 'Become a sponsor',
25+
url: 'https://github.com/sponsors/posva',
26+
img: '/your-logo-here.svg'
27+
}
28+
],
29+
},
30+
{
31+
size: 'xmini',
32+
// TODO: use gold instead once I have some
33+
items: sponsors.silver.map((sponsor: Sponsor) => ({
34+
name: sponsor.alt,
35+
url: sponsor.href,
36+
img: sponsor.imgSrcLight,
37+
})),
38+
},
39+
]
40+
})
41+
</script>
42+
143
<template>
44+
<VPDocAsideSponsors :data="asideSponsors" />
45+
246
<a
3-
class="mp-banner"
47+
class="banner mp"
448
href="https://masteringpinia.com/?utm_source=affiliate&utm_medium=vuerouter&utm_campaign=VueRouter_MP&utm_content=sidebar"
549
target="_blank"
650
>
@@ -13,21 +57,35 @@
1357
</a>
1458

1559
<a
16-
class="banner"
17-
href="https://certificates.dev/vuejs/?friend=VUEROUTER&utm_source=affiliate&utm_medium=vuerouter&utm_campaign=VueRouter_CERT&utm_content=sidebar"
60+
class="banner cert"
61+
href="https://certificates.dev/vuejs/?friend=VUEROUTER&utm_source=router_vuejs&utm_medium=link&utm_campaign=router_vuejs_links&utm_content=sidebar"
1862
target="_blank"
1963
>
20-
<img src="/banners/vuejs-certification.svg" alt="Vue.js Certification" />
64+
<img width="22" height="22" src="/vue-cert-logo.svg" />
65+
<span>
66+
<p class="extra-info">The official</p>
67+
<p class="heading">Vue.js Certification</p>
68+
<p class="extra-info">Get certified!</p>
69+
</span>
2170
</a>
2271
</template>
2372

2473
<style scoped>
25-
.banner {
26-
margin-bottom: 0.5rem;
74+
.VPDocAsideSponsors {
75+
margin-top: 8px !important;
76+
}
77+
78+
:deep(.vp-sponsor-grid.mini .vp-sponsor-grid-image) {
79+
max-width: 158px;
80+
max-height: 48px;
81+
}
82+
:deep(.vp-sponsor-grid.xmini .vp-sponsor-grid-image) {
83+
max-width: 80px;
84+
max-height: 32px;
2785
}
2886
29-
.mp-banner {
30-
margin: 1rem 0;
87+
.banner {
88+
margin: 0.25rem 0;
3189
padding: 0.4rem 0;
3290
border-radius: 14px;
3391
position: relative;
@@ -44,27 +102,35 @@
44102
transition: border-color 0.5s;
45103
}
46104
47-
.mp-banner:hover {
105+
.banner:last-of-type {
106+
margin-bottom: 1rem;
107+
}
108+
109+
.banner:hover {
48110
border: 2px solid var(--vp-c-brand-1);
49111
}
50112
51-
.mp-banner img {
113+
.banner.cert:hover {
114+
border: 2px solid var(--vp-c-green-1);
115+
}
116+
117+
.banner img {
52118
transition: transform 0.5s;
53119
transform: scale(1.25);
54120
}
55-
.mp-banner:hover img {
121+
.banner:hover img {
56122
transform: scale(1.75);
57123
}
58124
59-
.mp-banner .extra-info {
125+
.banner .extra-info {
60126
color: var(--vp-c-text-1);
61127
opacity: 0;
62128
font-size: 0.7rem;
63129
padding-left: 0.1rem;
64130
transition: opacity 0.5s;
65131
}
66132
67-
.mp-banner .heading {
133+
.banner .heading {
68134
background-image: linear-gradient(
69135
120deg,
70136
var(--vp-c-brand-3) 16%,
@@ -76,7 +142,16 @@
76142
-webkit-text-fill-color: transparent;
77143
}
78144
79-
.mp-banner:hover .extra-info {
145+
.banner.cert .heading {
146+
background-image: linear-gradient(
147+
120deg,
148+
var(--vp-c-green-3) 16%,
149+
var(--vp-c-green-2),
150+
var(--vp-c-green-1)
151+
);
152+
}
153+
154+
.banner:hover .extra-info {
80155
opacity: 0.9;
81156
}
82157
</style>

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

+25-27
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
<script setup lang="ts">
2+
import sponsors from './sponsors.json'
3+
import { computed } from 'vue'
4+
import { useData } from 'vitepress'
5+
6+
const props = withDefaults(
7+
defineProps<{
8+
name: 'Gold' | 'Platinum' | 'Silver' | 'Bronze'
9+
size?: number | string
10+
}>(),
11+
{
12+
size: 140,
13+
}
14+
)
15+
16+
const { isDark } = useData()
17+
18+
const list = computed(() =>
19+
sponsors[props.name.toLowerCase()].map(sponsor => ({
20+
...sponsor,
21+
imgSrc: isDark.value ? sponsor.imgSrcDark : sponsor.imgSrcLight,
22+
}))
23+
)
24+
</script>
25+
126
<template>
227
<h3>{{ name }} Sponsors</h3>
328

@@ -28,33 +53,6 @@
2853
</p>
2954
</template>
3055

31-
<script setup lang="ts">
32-
import sponsors from './sponsors.json'
33-
import { computed } from 'vue'
34-
import type { PropType } from 'vue'
35-
import { useData } from 'vitepress'
36-
37-
const { isDark } = useData()
38-
39-
const props = defineProps({
40-
name: {
41-
type: String as PropType<'Gold' | 'Platinum' | 'Silver' | 'Bronze'>,
42-
required: true,
43-
},
44-
size: {
45-
type: [Number, String],
46-
default: 140,
47-
},
48-
})
49-
50-
const list = computed(() =>
51-
sponsors[props.name.toLowerCase()].map((sponsor) => ({
52-
...sponsor,
53-
imgSrc: isDark.value ? sponsor.imgSrcDark : sponsor.imgSrcLight,
54-
}))
55-
)
56-
</script>
57-
5856
<style scoped>
5957
.sponsor_wrapper {
6058
padding: 5px;

0 commit comments

Comments
 (0)