Skip to content

Commit

Permalink
Merge branch 'main' into hmr-reload-sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Dec 22, 2023
2 parents de658aa + 19e3c9a commit 47bc3a9
Show file tree
Hide file tree
Showing 77 changed files with 1,627 additions and 893 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@1c938490c880156b746568a518594309cfb3f66b # v40.2.1
uses: tj-actions/changed-files@94549999469dbfa032becf298d95c87a14c34394 # v40.2.2
with:
files: |
docs/**
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"ci-docs": "run-s build docs-build"
},
"devDependencies": {
"@babel/types": "^7.23.5",
"@babel/types": "^7.23.6",
"@eslint-types/import": "^2.29.0-1",
"@eslint-types/typescript-eslint": "^6.12.0",
"@rollup/plugin-typescript": "^11.1.5",
Expand All @@ -56,20 +56,20 @@
"@types/json-stable-stringify": "^1.0.36",
"@types/less": "^3.0.6",
"@types/micromatch": "^4.0.6",
"@types/node": "^20.10.3",
"@types/node": "^20.10.4",
"@types/picomatch": "^2.3.3",
"@types/semver": "^7.5.6",
"@types/sass": "~1.43.1",
"@types/stylus": "^0.48.42",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/release-scripts": "^1.3.1",
"conventional-changelog-cli": "^4.1.0",
"eslint": "^8.55.0",
"eslint-define-config": "^2.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-n": "^16.3.1",
"eslint-plugin-n": "^16.4.0",
"eslint-plugin-regexp": "^2.1.2",
"execa": "^8.0.1",
"feed": "^4.2.2",
Expand All @@ -78,7 +78,7 @@
"npm-run-all2": "^6.1.1",
"picocolors": "^1.0.0",
"playwright-chromium": "^1.40.1",
"prettier": "3.1.0",
"prettier": "3.1.1",
"rimraf": "^5.0.5",
"rollup": "^4.2.0",
"semver": "^7.5.4",
Expand All @@ -89,8 +89,8 @@
"unbuild": "^2.0.0",
"vite": "workspace:*",
"vitepress": "1.0.0-rc.31",
"vitest": "^1.0.0-beta.6",
"vue": "^3.3.9"
"vitest": "^1.0.4",
"vue": "^3.3.11"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged --concurrent false"
Expand All @@ -109,7 +109,7 @@
"eslint --cache --fix"
]
},
"packageManager": "pnpm@8.11.0",
"packageManager": "pnpm@8.12.0",
"pnpm": {
"overrides": {
"vite": "workspace:*"
Expand Down
9 changes: 9 additions & 0 deletions packages/create-vite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 5.1.0 (2023-12-12)

* fix(deps): update all non-major dependencies (#15233) ([ad3adda](https://github.com/vitejs/vite/commit/ad3adda)), closes [#15233](https://github.com/vitejs/vite/issues/15233)
* fix(deps): update all non-major dependencies (#15304) ([bb07f60](https://github.com/vitejs/vite/commit/bb07f60)), closes [#15304](https://github.com/vitejs/vite/issues/15304)
* feat(cli): allow initializing non-empty directory (#15272) ([00669e1](https://github.com/vitejs/vite/commit/00669e1)), closes [#15272](https://github.com/vitejs/vite/issues/15272)
* chore(deps): update all non-major dependencies (#15145) ([7ff2c0a](https://github.com/vitejs/vite/commit/7ff2c0a)), closes [#15145](https://github.com/vitejs/vite/issues/15145)



## 5.0.0 (2023-11-16)

* feat(create-vite): update templates for vite 5 (#15007) ([e208697](https://github.com/vitejs/vite/commit/e208697)), closes [#15007](https://github.com/vitejs/vite/issues/15007)
Expand Down
2 changes: 1 addition & 1 deletion packages/create-vite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-vite",
"version": "5.0.0",
"version": "5.1.0",
"type": "module",
"license": "MIT",
"author": "Evan You",
Expand Down
25 changes: 20 additions & 5 deletions packages/create-vite/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,32 @@ async function init() {
},
{
type: () =>
!fs.existsSync(targetDir) || isEmpty(targetDir) ? null : 'confirm',
!fs.existsSync(targetDir) || isEmpty(targetDir) ? null : 'select',
name: 'overwrite',
message: () =>
(targetDir === '.'
? 'Current directory'
: `Target directory "${targetDir}"`) +
` is not empty. Remove existing files and continue?`,
` is not empty. Please choose how to proceed:`,
initial: 0,
choices: [
{
title: 'Remove existing files and continue',
value: 'yes',
},
{
title: 'Cancel operation',
value: 'no',
},
{
title: 'Ignore files and continue',
value: 'ignore',
},
],
},
{
type: (_, { overwrite }: { overwrite?: boolean }) => {
if (overwrite === false) {
type: (_, { overwrite }: { overwrite?: string }) => {
if (overwrite === 'no') {
throw new Error(red('✖') + ' Operation cancelled')
}
return null
Expand Down Expand Up @@ -342,7 +357,7 @@ async function init() {

const root = path.join(cwd, targetDir)

if (overwrite) {
if (overwrite === 'yes') {
emptyDir(root)
} else if (!fs.existsSync(root)) {
fs.mkdirSync(root, { recursive: true })
Expand Down
2 changes: 1 addition & 1 deletion packages/create-vite/template-lit-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
},
"devDependencies": {
"typescript": "^5.2.2",
"vite": "^5.0.4"
"vite": "^5.0.8"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"lit": "^3.1.0"
},
"devDependencies": {
"vite": "^5.0.4"
"vite": "^5.0.8"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-preact-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"preview": "vite preview"
},
"dependencies": {
"preact": "^10.19.2"
"preact": "^10.19.3"
},
"devDependencies": {
"@preact/preset-vite": "^2.7.0",
"typescript": "^5.2.2",
"vite": "^5.0.4"
"vite": "^5.0.8"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"preview": "vite preview"
},
"dependencies": {
"preact": "^10.19.2"
"preact": "^10.19.3"
},
"devDependencies": {
"@preact/preset-vite": "^2.7.0",
"vite": "^5.0.4"
"vite": "^5.0.8"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-qwik-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"devDependencies": {
"typescript": "^5.2.2",
"vite": "^5.0.4"
"vite": "^5.0.8"
},
"dependencies": {
"@builder.io/qwik": "^1.2.19"
"@builder.io/qwik": "^1.3.0"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-qwik/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"devDependencies": {
"typescript": "^5.2.2",
"vite": "^5.0.4"
"vite": "^5.0.8"
},
"dependencies": {
"@builder.io/qwik": "^1.2.19"
"@builder.io/qwik": "^1.3.0"
}
}
10 changes: 5 additions & 5 deletions packages/create-vite/template-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.2.41",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@vitejs/plugin-react": "^4.2.0",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"typescript": "^5.2.2",
"vite": "^5.0.4"
"vite": "^5.0.8"
}
}
6 changes: 3 additions & 3 deletions packages/create-vite/template-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.2.41",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@vitejs/plugin-react": "^4.2.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.55.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"vite": "^5.0.4"
"vite": "^5.0.8"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-solid-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"typescript": "^5.2.2",
"vite": "^5.0.4",
"vite-plugin-solid": "^2.7.2"
"vite": "^5.0.8",
"vite-plugin-solid": "^2.8.0"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"solid-js": "^1.8.7"
},
"devDependencies": {
"vite": "^5.0.4",
"vite-plugin-solid": "^2.7.2"
"vite": "^5.0.8",
"vite-plugin-solid": "^2.8.0"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-svelte-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"svelte-check": "^3.6.2",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^5.0.4"
"vite": "^5.0.8"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"svelte": "^4.2.8",
"vite": "^5.0.4"
"vite": "^5.0.8"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-vanilla-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"typescript": "^5.2.2",
"vite": "^5.0.4"
"vite": "^5.0.8"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-vanilla/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "vite preview"
},
"devDependencies": {
"vite": "^5.0.4"
"vite": "^5.0.8"
}
}
8 changes: 4 additions & 4 deletions packages/create-vite/template-vue-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.3.9"
"vue": "^3.3.11"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.5.1",
"@vitejs/plugin-vue": "^4.5.2",
"typescript": "^5.2.2",
"vite": "^5.0.4",
"vue-tsc": "^1.8.24"
"vite": "^5.0.8",
"vue-tsc": "^1.8.25"
}
}
6 changes: 3 additions & 3 deletions packages/create-vite/template-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.3.9"
"vue": "^3.3.11"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.5.1",
"vite": "^5.0.4"
"@vitejs/plugin-vue": "^4.5.2",
"vite": "^5.0.8"
}
}
6 changes: 3 additions & 3 deletions packages/plugin-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme",
"funding": "https://github.com/vitejs/vite?sponsor=1",
"dependencies": {
"@babel/core": "^7.23.5",
"@babel/preset-env": "^7.23.5",
"@babel/core": "^7.23.6",
"@babel/preset-env": "^7.23.6",
"browserslist": "^4.22.2",
"core-js": "^3.33.3",
"core-js": "^3.34.0",
"magic-string": "^0.30.5",
"regenerator-runtime": "^0.14.0",
"systemjs": "^6.14.2"
Expand Down
42 changes: 42 additions & 0 deletions packages/vite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
## <small>5.0.10 (2023-12-15)</small>

* fix: omit protocol does not require pre-transform (#15355) ([d9ae1b2](https://github.com/vitejs/vite/commit/d9ae1b2)), closes [#15355](https://github.com/vitejs/vite/issues/15355)
* fix(build): use base64 for inline SVG if it contains both single and double quotes (#15271) ([1bbff16](https://github.com/vitejs/vite/commit/1bbff16)), closes [#15271](https://github.com/vitejs/vite/issues/15271)



## <small>5.0.9 (2023-12-14)</small>

* fix: htmlFallbackMiddleware for favicon (#15301) ([c902545](https://github.com/vitejs/vite/commit/c902545)), closes [#15301](https://github.com/vitejs/vite/issues/15301)
* fix: more stable hash calculation for depsOptimize (#15337) ([2b39fe6](https://github.com/vitejs/vite/commit/2b39fe6)), closes [#15337](https://github.com/vitejs/vite/issues/15337)
* fix(scanner): catch all external files for glob imports (#15286) ([129d0d0](https://github.com/vitejs/vite/commit/129d0d0)), closes [#15286](https://github.com/vitejs/vite/issues/15286)
* fix(server): avoid chokidar throttling on startup (#15347) ([56a5740](https://github.com/vitejs/vite/commit/56a5740)), closes [#15347](https://github.com/vitejs/vite/issues/15347)
* fix(worker): replace `import.meta` correctly for IIFE worker (#15321) ([08d093c](https://github.com/vitejs/vite/commit/08d093c)), closes [#15321](https://github.com/vitejs/vite/issues/15321)
* feat: log re-optimization reasons (#15339) ([b1a6c84](https://github.com/vitejs/vite/commit/b1a6c84)), closes [#15339](https://github.com/vitejs/vite/issues/15339)
* chore: temporary typo (#15329) ([7b71854](https://github.com/vitejs/vite/commit/7b71854)), closes [#15329](https://github.com/vitejs/vite/issues/15329)
* perf: avoid computing paths on each request (#15318) ([0506812](https://github.com/vitejs/vite/commit/0506812)), closes [#15318](https://github.com/vitejs/vite/issues/15318)
* perf: temporary hack to avoid fs checks for /@react-refresh (#15299) ([b1d6211](https://github.com/vitejs/vite/commit/b1d6211)), closes [#15299](https://github.com/vitejs/vite/issues/15299)



## <small>5.0.8 (2023-12-12)</small>

* perf: cached fs utils (#15279) ([c9b61c4](https://github.com/vitejs/vite/commit/c9b61c4)), closes [#15279](https://github.com/vitejs/vite/issues/15279)
* fix: missing warmupRequest in transformIndexHtml (#15303) ([103820f](https://github.com/vitejs/vite/commit/103820f)), closes [#15303](https://github.com/vitejs/vite/issues/15303)
* fix: public files map will be updated on add/unlink in windows (#15317) ([921ca41](https://github.com/vitejs/vite/commit/921ca41)), closes [#15317](https://github.com/vitejs/vite/issues/15317)
* fix(build): decode urls in CSS files (fix #15109) (#15246) ([ea6a7a6](https://github.com/vitejs/vite/commit/ea6a7a6)), closes [#15109](https://github.com/vitejs/vite/issues/15109) [#15246](https://github.com/vitejs/vite/issues/15246)
* fix(deps): update all non-major dependencies (#15304) ([bb07f60](https://github.com/vitejs/vite/commit/bb07f60)), closes [#15304](https://github.com/vitejs/vite/issues/15304)
* fix(ssr): check esm file with normal file path (#15307) ([1597170](https://github.com/vitejs/vite/commit/1597170)), closes [#15307](https://github.com/vitejs/vite/issues/15307)



## <small>5.0.7 (2023-12-08)</small>

* fix: suppress terser warning if minify disabled (#15275) ([3e42611](https://github.com/vitejs/vite/commit/3e42611)), closes [#15275](https://github.com/vitejs/vite/issues/15275)
* fix: symbolic links in public dir (#15264) ([ef2a024](https://github.com/vitejs/vite/commit/ef2a024)), closes [#15264](https://github.com/vitejs/vite/issues/15264)
* fix(html): skip inlining icon and manifest links (#14958) ([8ad81b4](https://github.com/vitejs/vite/commit/8ad81b4)), closes [#14958](https://github.com/vitejs/vite/issues/14958)
* chore: remove unneeded condition in getRealPath (#15267) ([8e4655c](https://github.com/vitejs/vite/commit/8e4655c)), closes [#15267](https://github.com/vitejs/vite/issues/15267)
* perf: cache empty optimizer result (#15245) ([8409b66](https://github.com/vitejs/vite/commit/8409b66)), closes [#15245](https://github.com/vitejs/vite/issues/15245)



## <small>5.0.6 (2023-12-06)</small>

* perf: in-memory public files check (#15195) ([0f9e1bf](https://github.com/vitejs/vite/commit/0f9e1bf)), closes [#15195](https://github.com/vitejs/vite/issues/15195)
Expand Down
Loading

0 comments on commit 47bc3a9

Please sign in to comment.