Skip to content

Commit

Permalink
Merge branch 'vuejs:main' into fix-catch-all-slash
Browse files Browse the repository at this point in the history
  • Loading branch information
ll3006 authored Nov 28, 2024
2 parents 2c0168a + 2370820 commit e683d7e
Show file tree
Hide file tree
Showing 110 changed files with 2,698 additions and 8,344 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
id: reproduction
attributes:
label: Reproduction
description: "If possible, provide a boiled down editable reproduction using a service like [JSFiddle](https://jsfiddle.net/posva/3yq6ojLv), Codepen, [CodeSandbox](https://codesandbox.io/s/vue-router-4-reproduction-s1sqc), or a GitHub repository. A failing unit test is even better! Otherwise provide as much information as possible to reproduce the problem. If we can't reproduce the problem, we won't be able to give it a look **and the issue will be converted into a question and moved to discussions**."
description: "If possible, provide a boiled down editable reproduction with the [Vue.js Playground](https://play.vuejs.org/#eNqlVG1P2zAQ/iu3bFKLRuNSEB+yUMEQGpv2gti0L8s+pInbGhLbsp1SVPW/72znrVD4MlVp7Lvn7p67x/EmKFPGwzsdRAErpVAGNpApmhp6ISVsYa5ECYNVRQcJbwFKVIaq1hsSb+ggNrbxpVKGPj7hbeYhPgcJBwgrTYc+3O9LUXEzHLzFsMFBcBjU4cgvNrSUBcZPLTBeHk2vaVEIW+xNTHDrzNK9cKGNEnwxvayUotx4ziBTs4xiUvtgs4F3zhHOq6K4QSdsty4N8Xlinq6ahLeO5VfG78GIsyQgSTD9JHAN16KkMen8L0akM7S0YRd29ywuJk3N2Gqzm+s3ow9Aalztjkk7GJyXn2Vo9ij6jZZCPV4zbfB1WBt93r7So1bNVk/boCvdiNoYamUb2W1DO7jW0h4BunbQTHBdi6LgbIfLcGPbW3qa0T7uw4NDC3HROoI/fkQbry4MyACbE0iJo/BRR37rovpAp8cuuuvBw//i/xaPJo6237Q9jzpTTBrQ1FQSipQvUGKjUV6riXfiEjdPDu5k2mTCYzt5puDOzP6vTptqbyGv2qhMJV4AgmMpN/mkdmCFCJzF2rqDYc1JsDRG6oiQisv7RYgDJB3i/CQ8DsckR7V61pDqcjRT4kHj+g6z13IkwTmCSE5XRohCj1LJXirxDHh+Gp6GR6RgM4LZCeM5XbvcNjV+yVts02g8bHO2eNKk1ZwVVP2QhuFh3Gk2xXvl4YuzGVXRlmi2pNn9HvudXnvKN4pidyvaa86kakHxo7fuq5/f6RrXrbMUeVUg+hXnLdWiqCxHD/tY8Rxp93CO7WenGeOLX/pqbSjXTVOWqJuGwzshL19pvaN7HJ70pqjNY0F1mGl7seANdQj2+vFxM6FyqiKYyDUgWZbD2/F4/MG6SkzH+GgmjBFlBEdjuXZ2meY5km0tWCXhmBamkMJ7fFziOrqgc/wy+8jlpF+5S98RyLKsRyCCMf4mdYZg+w+goli8), or an **editable** and **up to date** [CodeSandbox](https://codesandbox.io/s/vue-router-4-reproduction-s1sqc), Stackblitz, or a GitHub repository. A failing unit test is even better! Otherwise provide as much information as possible to reproduce the problem. If we can't reproduce the problem, we won't be able to give it a look **and the issue will be converted into a question and moved to discussions**."
placeholder: Reproduction
validations:
required: true
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish Any Commit

on:
pull_request:
branches: main
paths-ignore:
- 'packages/docs/**'
- 'packages/playground/**'

push:
branches:
- '**'
tags:
- '!**'
paths-ignore:
- 'packages/docs/**'
- 'packages/playground/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm

- name: Install
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm -C packages/router build

- name: Build DTS
run: pnpm -C packages/router build:dts

- name: Release
run: pnpm dlx pkg-pr-new publish --compact --pnpm './packages/*'
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Vue Router is part of the Vue Ecosystem and is an MIT-licensed open source proje

<h4 align="center">Silver Sponsors</h4>
<p align="center">
<a href="https://www.vuemastery.com/" target="_blank" rel="noopener noreferrer">
<a href="https://route4me.com" target="_blank" rel="noopener noreferrer">
<picture>
<source srcset="https://posva-sponsors.pages.dev/logos/vuemastery-dark.png" media="(prefers-color-scheme: dark)" height="42px" alt="VueMastery" />
<img src="https://posva-sponsors.pages.dev/logos/vuemastery-light.svg" height="42px" alt="VueMastery" />
<source srcset="https://posva-sponsors.pages.dev/logos/route4me.png" media="(prefers-color-scheme: dark)" height="42px" alt="Route Optimizer and Route Planner Software" />
<img src="https://posva-sponsors.pages.dev/logos/route4me.png" height="42px" alt="Route Optimizer and Route Planner Software" />
</picture>
</a>
<a href="https://www.prefect.io/" target="_blank" rel="noopener noreferrer">
Expand All @@ -26,32 +26,38 @@ Vue Router is part of the Vue Ecosystem and is an MIT-licensed open source proje
<img src="https://posva-sponsors.pages.dev/logos/prefectlogo-light.svg" height="42px" alt="Prefect" />
</picture>
</a>
<a href="https://www.vuemastery.com/" target="_blank" rel="noopener noreferrer">
<picture>
<source srcset="https://posva-sponsors.pages.dev/logos/vuemastery-dark.png" media="(prefers-color-scheme: dark)" height="42px" alt="VueMastery" />
<img src="https://posva-sponsors.pages.dev/logos/vuemastery-light.svg" height="42px" alt="VueMastery" />
</picture>
</a>
</p>

<h4 align="center">Bronze Sponsors</h4>
<p align="center">
<a href="https://stormier.ninja" target="_blank" rel="noopener noreferrer">
<a href="https://storyblok.com" target="_blank" rel="noopener noreferrer">
<picture>
<source srcset="https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59&v=4" media="(prefers-color-scheme: dark)" height="26px" alt="Stanislas Ormières" />
<img src="https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59&v=4" height="26px" alt="Stanislas Ormières" />
<source srcset="https://posva-sponsors.pages.dev/logos/storyblok.png" media="(prefers-color-scheme: dark)" height="26px" alt="Storyblok" />
<img src="https://posva-sponsors.pages.dev/logos/storyblok.png" height="26px" alt="Storyblok" />
</picture>
</a>
<a href="https://www.vuejs.de" target="_blank" rel="noopener noreferrer">
<a href="https://ui.nuxt.com/pro" target="_blank" rel="noopener noreferrer">
<picture>
<source srcset="https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4" media="(prefers-color-scheme: dark)" height="26px" alt="Antony Konstantinidis" />
<img src="https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4" height="26px" alt="Antony Konstantinidis" />
<source srcset="https://posva-sponsors.pages.dev/logos/nuxt-dark.svg" media="(prefers-color-scheme: dark)" height="26px" alt="Nuxt UI Pro Templates" />
<img src="https://posva-sponsors.pages.dev/logos/nuxt-light.svg" height="26px" alt="Nuxt UI Pro Templates" />
</picture>
</a>
<a href="https://storyblok.com" target="_blank" rel="noopener noreferrer">
<a href="https://www.vuejs.de" target="_blank" rel="noopener noreferrer">
<picture>
<source srcset="https://posva-sponsors.pages.dev/logos/storyblok.png" media="(prefers-color-scheme: dark)" height="26px" alt="Storyblok" />
<img src="https://posva-sponsors.pages.dev/logos/storyblok.png" height="26px" alt="Storyblok" />
<source srcset="https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4" media="(prefers-color-scheme: dark)" height="26px" alt="Antony Konstantinidis" />
<img src="https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4" height="26px" alt="Antony Konstantinidis" />
</picture>
</a>
<a href="https://ui.nuxt.com/pro" target="_blank" rel="noopener noreferrer">
<a href="https://stormier.ninja" target="_blank" rel="noopener noreferrer">
<picture>
<source srcset="https://avatars.githubusercontent.com/u/81570812?v=4" media="(prefers-color-scheme: dark)" height="26px" alt="Nuxt UI Pro Templates" />
<img src="https://avatars.githubusercontent.com/u/81570812?v=4" height="26px" alt="Nuxt UI Pro Templates" />
<source srcset="https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59&v=4" media="(prefers-color-scheme: dark)" height="26px" alt="Stanislas Ormières" />
<img src="https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59&v=4" height="26px" alt="Stanislas Ormières" />
</picture>
</a>
</p>
Expand Down
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
coverage:
status:
patch: off
project:
default:
threshold: 2%
20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "@vue/router-root",
"private": true,
"packageManager": "[email protected]",
"packageManager": "[email protected]",
"type": "module",
"engines": {
"node": ">=20.9.0"
},
Expand Down Expand Up @@ -29,19 +30,22 @@
"test": "pnpm run -r test"
},
"devDependencies": {
"@vitest/coverage-v8": "^2.1.5",
"@vitest/ui": "^2.1.5",
"brotli": "^1.3.3",
"chalk": "^5.3.0",
"enquirer": "^2.4.1",
"execa": "^9.2.0",
"globby": "^14.0.1",
"lint-staged": "^15.2.7",
"execa": "^9.5.1",
"globby": "^14.0.2",
"lint-staged": "^15.2.10",
"minimist": "^1.2.8",
"p-series": "^3.0.0",
"prettier": "^2.8.8",
"semver": "^7.6.2",
"typedoc": "^0.25.8",
"typedoc-plugin-markdown": "^3.17.1",
"typescript": "~5.3.3",
"semver": "^7.6.3",
"typedoc": "^0.26.11",
"typedoc-plugin-markdown": "^4.2.10",
"typescript": "~5.6.3",
"vitest": "^2.1.5",
"yorkie": "^2.0.0"
},
"gitHooks": {
Expand Down
50 changes: 38 additions & 12 deletions packages/docs/.vitepress/theme/components/HomeSponsors.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<script setup lang="ts">
import HomeSponsorsGroup from './HomeSponsorsGroup.vue'
import sponsors from './sponsors.json'
import { useData } from 'vitepress'
const { site } = useData()
const translations = {
en: 'Become a sponsor',
'en-US': 'Become a Sponsor!',
'zh-CN': '成为赞助者!',
}
</script>

<template>
<div class="sponsors_outer">
<div>
Expand All @@ -24,24 +37,37 @@
</div>
</template>

<script setup lang="ts">
import HomeSponsorsGroup from './HomeSponsorsGroup.vue'
import sponsors from './sponsors.json'
import { useData } from 'vitepress'

const { site } = useData()
const translations = {
en: 'Become a sponsor',
'en-US': 'Become a Sponsor!',
'zh-CN': '成为赞助者!',
<style scoped>
.become-sponsor {
font-size: 0.9em;
font-weight: 700;
width: auto;
text-align: center;
background-color: transparent;
padding: 0.75em 2em;
border-radius: 2em;
transition: all 0.30s ease;
box-sizing: border-box;
border: 2px solid var(--vp-button-brand-hover-bg);
text-decoration: none;
}
.become-sponsor:hover {
background-color: var(--vp-button-brand-hover-bg);
color: var(--vp-button-brand-text) !important;
}
.sponsors-top .become-sponsor {
font-size: 0.75em;
padding: 0.2em;
width: auto;
max-width: 150px;
}
</script>
<style scoped>
.sponsors_outer {
text-align: center;
padding: 35px 40px 45px;
background-color: var(--vp-c-bg-accent);
/* transition when toggling dark mode */
transition: background-color 300ms ease-in-out, color 300ms ease-in-out;
}
Expand Down
11 changes: 3 additions & 8 deletions packages/docs/.vitepress/theme/components/HomeSponsorsGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@ import sponsors from './sponsors.json'
import { computed } from 'vue'
import { useData } from 'vitepress'
const props = withDefaults(
defineProps<{
const { name, size = 140 } = defineProps<{
name: 'Gold' | 'Platinum' | 'Silver' | 'Bronze'
size?: number | string
}>(),
{
size: 140,
}
)
}>()
const { isDark } = useData()
const list = computed(() =>
sponsors[props.name.toLowerCase()].map(sponsor => ({
sponsors[name.toLowerCase()].map(sponsor => ({
...sponsor,
imgSrc: isDark.value ? sponsor.imgSrcDark : sponsor.imgSrcLight,
}))
Expand Down
31 changes: 21 additions & 10 deletions packages/docs/.vitepress/theme/components/VuejsdeConfBanner.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<template>
<div class="banner banner-vuejsconf" v-if="isVisible">
<a href="https://conf.vuejs.de/?utm_source=vuejs&utm_medium=referral&utm_campaign=banner-placement&utm_content=banner"
<a href="https://conf.vuejs.de/tickets/?voucher=COMMUNITY&utm_source=vuejs&utm_medium=referral&utm_campaign=banner-placement&utm_content=banner"
target="_blank">
<picture>
<source media="(min-width:1200px)" srcset="/vuejsde-conf/vuejsdeconf_banner_large.png" />
<source media="(min-width:920px)" srcset="/vuejsde-conf/vuejsdeconf_banner_medium.png" />
<img src="/vuejsde-conf/vuejsdeconf_banner_small.png" alt="" />
<source media="(min-width:1260px)"
srcset="/vuejsde-conf/vuejsdeconf_banner_large.png, /vuejsde-conf/vuejsdeconf_banner_large_2x.png 2x" />
<source media="(min-width:970px)"
srcset="/vuejsde-conf/vuejsdeconf_banner_medium.png, /vuejsde-conf/vuejsdeconf_banner_medium_2x.png 2x" />
<source media="(min-width:576px)"
srcset="/vuejsde-conf/vuejsdeconf_banner_small.png, /vuejsde-conf/vuejsdeconf_banner_small_2x.png 2x" />
<source media="(min-width:320px)"
srcset="/vuejsde-conf/vuejsdeconf_banner_smallest.png, /vuejsde-conf/vuejsdeconf_banner_smallest_2x.png 2x"
alt="" />
<img src="/vuejsde-conf/vuejsdeconf_banner_smallest_2x.png" alt="" />
</picture>
</a>
<div class="close-btn" @click.stop.prevent="closeBanner">
Expand All @@ -19,7 +26,7 @@ import { ref, onMounted } from 'vue'
const isVisible = ref(false)
const nameStorage = 'VUEJSDECONF-BANNER-JUNE-2024'
const nameStorage = 'VUEJSDECONF-BANNER-SEPTEMBER-2024'
const resetLayoutTopHeight = () => {
document.documentElement.classList.add('banner-dismissed')
Expand All @@ -43,7 +50,7 @@ onMounted(() => {
</script>
<style>
html:not(.banner-dismissed) {
--vp-layout-top-height: 60px;
--vp-layout-top-height: 72px;
}
</style>
<style scoped>
Expand All @@ -59,7 +66,7 @@ html:not(.banner-dismissed) {
text-align: center;
font-size: 12px;
font-weight: 600;
color: #fff;
color: #000;
}
.banner-dismissed .banner {
Expand All @@ -70,8 +77,12 @@ a {
text-decoration: underline;
}
.close {
font-size: 24px;
}
.banner-vuejsconf {
background: linear-gradient(90deg, #fff 50%, #43b883 50%);
background: linear-gradient(90deg, #fff 50%, #6f97c4 50%);
}
.banner-vuejsconf a {
Expand All @@ -80,8 +91,8 @@ a {
}
.banner-vuejsconf .close-btn {
top: 10px;
right: 10px;
top: 0px;
left: 0px;
z-index: 99;
position: absolute;
border-radius: 50%;
Expand Down
42 changes: 24 additions & 18 deletions packages/docs/.vitepress/theme/components/sponsors.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,25 @@
"gold": [],
"silver": [
{
"alt": "VueMastery",
"href": "https://www.vuemastery.com/",
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/vuemastery-dark.png",
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/vuemastery-light.svg"
"alt": "Route Optimizer and Route Planner Software",
"href": "https://route4me.com",
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/route4me.png",
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/route4me.png"
},
{
"alt": "Prefect",
"href": "https://www.prefect.io/",
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/prefectlogo-dark.svg",
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/prefectlogo-light.svg"
},
{
"alt": "VueMastery",
"href": "https://www.vuemastery.com/",
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/vuemastery-dark.png",
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/vuemastery-light.svg"
}
],
"bronze": [
{
"alt": "Stanislas Ormières",
"href": "https://stormier.ninja",
"imgSrcDark": "https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59&v=4",
"imgSrcLight": "https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59&v=4"
},
{
"alt": "Antony Konstantinidis",
"href": "https://www.vuejs.de",
"imgSrcDark": "https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4",
"imgSrcLight": "https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4"
},
{
"alt": "Storyblok",
"href": "https://storyblok.com",
Expand All @@ -37,8 +31,20 @@
{
"alt": "Nuxt UI Pro Templates",
"href": "https://ui.nuxt.com/pro",
"imgSrcDark": "https://avatars.githubusercontent.com/u/81570812?v=4",
"imgSrcLight": "https://avatars.githubusercontent.com/u/81570812?v=4"
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/nuxt-dark.svg",
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/nuxt-light.svg"
},
{
"alt": "Antony Konstantinidis",
"href": "https://www.vuejs.de",
"imgSrcDark": "https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4",
"imgSrcLight": "https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4"
},
{
"alt": "Stanislas Ormières",
"href": "https://stormier.ninja",
"imgSrcDark": "https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59&v=4",
"imgSrcLight": "https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59&v=4"
}
]
}
Loading

0 comments on commit e683d7e

Please sign in to comment.