Skip to content

Commit

Permalink
Merge branch 'main' into fix-normalize-url-in-fetchModule
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Dec 10, 2024
2 parents a6d6e77 + ef7a6a3 commit 0f39deb
Show file tree
Hide file tree
Showing 373 changed files with 10,065 additions and 9,140 deletions.
2 changes: 2 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"node",
"typescript",
"eslint-plugin-react-hooks", // prevent bumping to messy -rc-<hash>-<date>
"@rollup/plugin-dynamic-import-vars", // prefer version using tinyglobby
"@types/express", // express latest is still on v4, so types should also be v4

// pinned
"slash3",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@c3a1bb2c992d77180ae65be6ae6c166cf40f857c # v45.0.3
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366 # v45.0.5
with:
files: |
docs/**
Expand All @@ -69,9 +69,9 @@ jobs:
include:
# Active LTS + other OS
- os: macos-latest
node_version: 20
node_version: 22
- os: windows-latest
node_version: 20
node_version: 22
fail-fast: false

name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ecosystem-ci-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ jobs:
return {
num: context.issue.number,
branchName: pr.head.ref,
repo: pr.head.repo.full_name
repo: pr.head.repo.full_name,
commit: pr.head.sha
}
- id: generate-token
uses: tibdex/github-app-token@v2
Expand Down Expand Up @@ -88,6 +89,7 @@ jobs:
prNumber: '' + prData.num,
branchName: prData.branchName,
repo: prData.repo,
commit: prData.commit,
suite: suite === '' ? '-' : suite
}
})
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
packages/*/CHANGELOG.md
packages/vite/src/node/ssr/runtime/__tests__/fixtures
packages/vite/src/node/ssr/__tests__/fixtures/errors
playground-temp/
dist/
temp/
Expand Down
84 changes: 61 additions & 23 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ You may wish to test your locally modified copy of Vite against another package
```json
{
"dependencies": {
"vite": "^5.0.0"
"vite": "^6.0.0"
},
"pnpm": {
"overrides": {
Expand Down Expand Up @@ -207,42 +207,80 @@ You can set the `--debug` option to turn on debugging logs (e.g. `vite --debug r

```mermaid
flowchart TD
start{Followed issue\ntemplate?}
start --NO--> close1[Close and ask to\nfollow template]
start{Followed issue
template?}
start --NO--> close1["Close and ask to
follow template"]
start --YES--> dupe{Is duplicate?}
dupe --YES--> close2[Close and point\nto duplicate]
dupe --NO--> repro{Has proper\nreproduction?}
repro --NO--> close3[Label: 'needs reproduction'\nbot will auto close if no update\nhas been made in 3 days]
dupe --YES--> close2[Close and point
to duplicate]
dupe --NO--> repro{Has proper
reproduction?}
repro --NO--> close3[Label: 'needs reproduction'
bot will auto close if no update
has been made in 3 days]
repro --YES--> real{Is actually a bug?}
real --NO--> intended{Is the intended\nbehaviour?}
intended --YES--> explain[Explain and close\npoint to docs if needed]
intended --NO--> open[Keep open for discussion\nRemove 'pending triage' label]
real --YES--> real2["1. Remove 'pending triage' label\n2. Add related feature label if\napplicable (e.g. 'feat: ssr')\n3. Add priority and meta labels (see below)"]
real2 --> unusable{Does the\nbug make Vite\nunusable?}
unusable --YES--> maj{Does the bug\naffect the majority\nof Vite users?}
real --NO--> intended{Is the intended
behaviour?}
intended --YES--> explain[Explain and close
point to docs if needed]
intended --NO--> open[Keep open for discussion
Remove 'pending triage' label]
real --YES--> real2["① Remove 'pending triage' label
② Add related feature label if applicable
(e.g. 'feat: ssr')
③ Add priority and meta labels (see below)"]
real2 --> unusable{Does the
bug make Vite
unusable?}
unusable --YES--> maj{Does the bug
affect the majority
of Vite users?}
maj --YES--> p5[p5: urgent]
maj --NO--> p4[p4: important]
unusable --NO--> workarounds{Are there\nworkarounds for\nthe bug?}
unusable --NO--> workarounds{Are there
workarounds for
the bug?}
workarounds --NO--> p3[p3: minor bug]
workarounds --YES--> p2[p2: edge case\nhas workaround]
workarounds --YES--> p2[p2: edge case
has workaround]
```

### Pull Request Review Workflow

```mermaid
flowchart TD
start{Bug fix\nor\nfeature}
start --BUG FIX--> strict_bug{"Is this a 'strict fix'?\ni.e. fixes an obvious\noversight with no\nside effects"}
start --FEATURE--> feature[- Discuss feature necessity\n- Is there a better way\nto address the need?\n- Review code quality\n- Add labels\n- Add to milestone\n- Add to Team Board]
feature -.-> approve_non_strict[- Run vite-ecosystem-ci if needed\n- Approve if you feel strongly\nthat the PR is needed\nand add to milestone]
strict_bug --YES--> strict[- Verify the fix locally\n- Review code quality\n- Require test case if applicable\n- Request changes if necessary\n- Add labels]
strict_bug --NO--> non_strict[Discuss the potential side\neffects of the fix, e.g.\n- Could it introduce implicit\nbehavior changes in other cases?\n- Does it introduce too much changes?\n- Add labels\n- Add to Team Board]
start{Bug fix
or
feature}
start --BUG FIX--> strict_bug{"Is this a 'strict fix'?
i.e. fixes an obvious oversight with no side effects"}
start --FEATURE--> feature[• Discuss feature necessity
• Is there a better way to address the need?
• Review code quality
• Add labels
• Add to milestone
• Add to Team Board]
feature -.-> approve_non_strict[• Run vite-ecosystem-ci if needed
• Approve if you feel strongly that the PR is needed and add to milestone]
strict_bug --YES--> strict[• Verify the fix locally
• Review code quality
• Require test case if applicable
• Request changes if necessary
• Add labels]
strict_bug --NO--> non_strict[Discuss the potential side effects of the fix, e.g.
• Could it introduce implicit behavior changes in other cases?
• Does it introduce too much changes?
• Add labels
• Add to Team Board]
non_strict -.-> approve_non_strict
strict --> approve_strict[Approve if ready to be merged]
approve_strict --> merge_strict[Merge if approved by 2 or\nmore team members]
approve_non_strict -.-> merge_non_strict[Merge if approved by 2 or\nmore team members\nand the PR has been discussed\n in a team meeting]
approve_strict --> merge_strict[Merge if approved by 2 or more team members]
approve_non_strict -.-> merge_non_strict[Merge if approved by 2 or more team members and the PR has been discussed in a team meeting]
merge_non_strict -.-> merge_extra
merge_strict --> merge_extra["- Use 'Squash and Merge'\n- Edit commit message to follow convention\n- In commit message body, list\nrelevant issues being fixed\ne.g. 'fix #1234, fix #1235'"]
merge_strict --> merge_extra["• Use 'Squash and Merge'
• Edit commit message to follow convention
• In commit message body, list relevant issues being fixed e.g. 'fix #1234, fix #1235'"]
```

## Notes on Dependencies
Expand Down
17 changes: 13 additions & 4 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ const additionalTitle = ((): string => {
})()
const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
const oldVersions: DefaultTheme.NavItemWithLink[] = [
{
text: 'Vite 5 Docs',
link: 'https://v5.vite.dev',
},
{
text: 'Vite 4 Docs',
link: 'https://v4.vite.dev',
Expand All @@ -57,7 +61,7 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
case 'local':
return [
{
text: 'Vite 5 Docs (release)',
text: 'Vite 6 Docs (release)',
link: 'https://vite.dev',
},
...oldVersions,
Expand Down Expand Up @@ -141,8 +145,9 @@ export default defineConfig({
},

socialLinks: [
{ icon: 'bluesky', link: 'https://bsky.app/profile/vite.dev' },
{ icon: 'mastodon', link: 'https://elk.zone/m.webtoo.ls/@vite' },
{ icon: 'twitter', link: 'https://twitter.com/vite_js' },
{ icon: 'x', link: 'https://x.com/vite_js' },
{ icon: 'discord', link: 'https://chat.vite.dev' },
{ icon: 'github', link: 'https://github.com/vitejs/vite' },
],
Expand Down Expand Up @@ -178,13 +183,17 @@ export default defineConfig({
{ text: 'Releases', link: '/releases' },
{
items: [
{
text: 'Bluesky',
link: 'https://bsky.app/profile/vite.dev',
},
{
text: 'Mastodon',
link: 'https://elk.zone/m.webtoo.ls/@vite',
},
{
text: 'Twitter',
link: 'https://twitter.com/vite_js',
text: 'X',
link: 'https://x.com/vite_js',
},
{
text: 'Discord Chat',
Expand Down
11 changes: 6 additions & 5 deletions docs/.vitepress/theme/components/AsideSponsors.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<script setup lang="ts">
import { computed } from 'vue'
import { VPDocAsideSponsors } from 'vitepress/theme'
import { useSponsor } from '../composables/sponsor'
import { useSponsor, voidZero } from '../composables/sponsor'
const { data } = useSponsor()
const sponsors = computed(() => {
return (
data?.value.map((sponsor) => {
return [
{ size: 'small', items: [voidZero] },
...(data?.value.map((sponsor) => {
return {
size: sponsor.size === 'big' ? 'mini' : 'xmini',
items: sponsor.items,
}
}) ?? []
)
}) ?? []),
]
})
</script>

Expand Down
37 changes: 37 additions & 0 deletions docs/.vitepress/theme/components/YouTubeVideo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script setup>
defineProps({
videoId: String,
})
</script>

<template>
<div class="full-width-youtube-video">
<iframe
width="560"
height="315"
:src="`https://www.youtube.com/embed/${videoId}`"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
</div>
</template>

<style scoped>
.full-width-youtube-video {
position: relative;
padding-bottom: 56.25%;
height: 0;
}
.full-width-youtube-video iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
border-radius: 0.5rem;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ SolidJS in mind, they should scale from our simplest template to opinionated sta
name: 'Christoph Nakazawa',
handle: '@cpojer',
avatar:
'https://pbs.twimg.com/profile_images/1189537722286952449/OrscO0bD_400x400.jpg',
'https://pbs.twimg.com/profile_images/1854151427595407360/4GyUCgEH_400x400.jpg',
comment: ['Vite is gonna eat the (JavaScript) world.'],
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { useSponsor } from '../../../composables/sponsor'
import { useSponsor, voidZero } from '../../../composables/sponsor'
import { VPSponsors } from 'vitepress/theme'
const { data } = useSponsor()
Expand Down Expand Up @@ -54,8 +54,8 @@ const { data } = useSponsor()

<h4>Brought to you by</h4>
<div class="voidzero">
<a href="https://voidzero.dev" target="_blank">
<img src="./voidzero.svg" />
<a :href="voidZero.url" target="_blank">
<img :src="voidZero.img" />
</a>
</div>

Expand Down Expand Up @@ -121,6 +121,7 @@ const { data } = useSponsor()
position: relative;
display: inline-block;
max-width: 260px;
filter: grayscale(1) invert(1);
}
}
Expand Down
6 changes: 6 additions & 0 deletions docs/.vitepress/theme/composables/sponsor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ const data = ref()
const dataHost = 'https://sponsors.vuejs.org'
const dataUrl = `${dataHost}/vite.json`

export const voidZero = {
name: 'VoidZero',
url: 'https://voidzero.dev',
img: '/voidzero.svg',
} satisfies Sponsor

const viteSponsors: Pick<Sponsors, 'special' | 'gold'> = {
special: [
// sponsors patak-dev
Expand Down
2 changes: 2 additions & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import './styles/vars.css'
import './styles/landing.css'
import AsideSponsors from './components/AsideSponsors.vue'
import SvgImage from './components/SvgImage.vue'
import YouTubeVideo from './components/YouTubeVideo.vue'
import 'virtual:group-icons.css'

export default {
Expand All @@ -18,6 +19,7 @@ export default {
},
enhanceApp({ app }) {
app.component('SvgImage', SvgImage)
app.component('YouTubeVideo', YouTubeVideo)
app.use(TwoslashFloatingVue)
},
} satisfies Theme
12 changes: 11 additions & 1 deletion docs/.vitepress/theme/styles/landing.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
/* /////////////////////// */

html:has(.landing) {
background-color: #101010;
--vp-c-bg: #101010;

background-color: #101010;

body {
background-color: #101010;
}
Expand Down Expand Up @@ -37,9 +38,14 @@ html:has(.landing) {

.content-body {
background: none !important;
transition: none;
}
}

.VPNavBar *:not(.wrapper *) {
transition: none;
}

.VPFooter {
border-top: 1px solid #262626 !important;
background: radial-gradient(circle at top center, #0f151a 30%, #000000 80%);
Expand All @@ -58,6 +64,10 @@ html:has(.landing) {
display: none;
}

.VPMenu .translations + .group {
display: none;
}

.VPNavScreenAppearance {
visibility: hidden;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "Bundler",
"moduleResolution": "bundler",
"strict": true,
"noImplicitOverride": true,
"noUnusedLocals": true,
Expand Down
Loading

0 comments on commit 0f39deb

Please sign in to comment.