Skip to content

Commit

Permalink
Merge branch 'vitejs:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
BhanuVikram committed Jun 12, 2024
2 parents 08bb517 + d72fdab commit 3b80e94
Show file tree
Hide file tree
Showing 66 changed files with 8,208 additions and 6,536 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- os: macos-latest
node_version: 20
- os: windows-latest
node_version: 20
node_version: 20.13.1 # 20.14.0 keeps causing a native `node::SetCppgcReference+18123` error in Vitest
fail-fast: false

name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}"
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/publish-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Any Commit

env:
# install playwright binary manually (because pnpm only runs install script once)
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"

on:
push:
branches:
- main
- v6/environment-api
pull_request_review:
types: [submitted]

jobs:
build:
if: github.event_name == 'push' || github.event.review.state == 'APPROVED'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/[email protected]

- name: Install dependencies
run: pnpm install

- name: Build
working-directory: ./packages/vite
run: pnpm build

- run: pnpm dlx [email protected] publish --compact --pnpm ./packages/vite
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ hoist-pattern[]=postcss # package/vite
hoist-pattern[]=pug # playground/tailwind: @vue/compiler-sfc
shell-emulator=true
auto-install-peers=false
package-manager-strict=false
dedupe-injected-deps=false
10 changes: 10 additions & 0 deletions docs/.vitepress/theme/composables/sponsor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ const viteSponsors: Pick<Sponsors, 'special' | 'gold'> = {
img: '/transloadit.svg',
hasDark: true,
},
{
name: 'Huly',
url: 'https://huly.io/',
img: '/huly.svg',
},
{
name: 'Handsontable',
url: 'https://handsontable.com/docs/react-data-grid/?utm_source=vite_docs&utm_medium=sponsorship&utm_campaign=library_sponsorship_2024',
img: '/handsontable.svg',
},
],
}

Expand Down
27 changes: 27 additions & 0 deletions docs/guide/api-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,3 +424,30 @@ async function loadConfigFromFile(
```

Load a Vite config file manually with esbuild.

## `preprocessCSS`

- **Experimental:** [Give Feedback](https://github.com/vitejs/vite/discussions/13815)

**Type Signature:**

```ts
async function preprocessCSS(
code: string,
filename: string,
config: ResolvedConfig,
): Promise<PreprocessCSSResult>
interface PreprocessCSSResult {
code: string
map?: SourceMapInput
modules?: Record<string, string>
deps?: Set<string>
}
```

Pre-processes `.css`, `.scss`, `.sass`, `.less`, `.styl` and `.stylus` files to plain CSS so it can be used in browsers or parsed by other tools. Similar to the [built-in CSS pre-processing support](/guide/features#css-pre-processors), the corresponding pre-processor must be installed if used.

The pre-processor used is inferred from the `filename` extension. If the `filename` ends with `.module.{ext}`, it is inferred as a [CSS module](https://github.com/css-modules/css-modules) and the returned result will include a `modules` object mapping the original class names to the transformed ones.

Note that pre-processing will not resolve URLs in `url()` or `image-set()`.
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"docs-serve": "vitepress serve"
},
"devDependencies": {
"@shikijs/vitepress-twoslash": "^1.6.2",
"@shikijs/vitepress-twoslash": "^1.6.3",
"@types/express": "^4.17.21",
"feed": "^4.2.2",
"vitepress": "1.2.2",
"vitepress": "1.2.3",
"vue": "^3.4.27"
}
}
1 change: 1 addition & 0 deletions docs/public/handsontable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/public/huly.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
},
"devDependencies": {
"@eslint/js": "^9.4.0",
"@rollup/plugin-typescript": "^11.1.6",
"@types/babel__core": "^7.20.5",
"@types/babel__preset-env": "^7.9.6",
"@types/convert-source-map": "^2.0.3",
Expand All @@ -52,33 +51,34 @@
"@types/fs-extra": "^11.0.4",
"@types/less": "^3.0.6",
"@types/micromatch": "^4.0.7",
"@types/node": "^20.14.0",
"@types/node": "^20.14.2",
"@types/picomatch": "^2.3.3",
"@types/stylus": "^0.48.42",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
"@vitejs/release-scripts": "^1.3.1",
"conventional-changelog-cli": "^5.0.0",
"eslint": "^8.57.0",
"eslint-plugin-i": "^2.29.1",
"eslint-plugin-n": "^17.7.0",
"eslint-plugin-n": "^17.8.1",
"eslint-plugin-regexp": "^2.6.0",
"execa": "^9.1.0",
"execa": "^9.2.0",
"fs-extra": "^11.2.0",
"globals": "^15.3.0",
"globals": "^15.4.0",
"lint-staged": "^15.2.5",
"npm-run-all2": "^6.2.0",
"picocolors": "^1.0.1",
"playwright-chromium": "^1.44.1",
"prettier": "3.3.0",
"prettier": "3.3.1",
"rimraf": "^5.0.7",
"rollup": "^4.13.0",
"rollup-plugin-esbuild": "^6.1.1",
"simple-git-hooks": "^2.11.1",
"tslib": "^2.6.2",
"tsx": "^4.11.2",
"tslib": "^2.6.3",
"tsx": "^4.15.1",
"typescript": "^5.2.2",
"typescript-eslint": "^7.11.0",
"typescript-eslint": "^7.12.0",
"vite": "workspace:*",
"vitest": "^1.6.0"
},
Expand All @@ -99,7 +99,7 @@
"eslint --cache --fix"
]
},
"packageManager": "pnpm@8.15.8",
"packageManager": "pnpm@9.3.0",
"pnpm": {
"overrides": {
"vite": "workspace:*"
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-lit-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"preview": "vite preview"
},
"dependencies": {
"lit": "^3.1.3"
"lit": "^3.1.4"
},
"devDependencies": {
"typescript": "^5.2.2",
"vite": "^5.2.12"
"vite": "^5.2.13"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
"lit": "^3.1.3"
"lit": "^3.1.4"
},
"devDependencies": {
"vite": "^5.2.12"
"vite": "^5.2.13"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-preact-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"devDependencies": {
"@preact/preset-vite": "^2.8.2",
"typescript": "^5.2.2",
"vite": "^5.2.12"
"vite": "^5.2.13"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
},
"devDependencies": {
"@preact/preset-vite": "^2.8.2",
"vite": "^5.2.12"
"vite": "^5.2.13"
}
}
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 @@ -11,9 +11,9 @@
"devDependencies": {
"serve": "^14.2.3",
"typescript": "^5.2.2",
"vite": "^5.2.12"
"vite": "^5.2.13"
},
"dependencies": {
"@builder.io/qwik": "^1.5.5"
"@builder.io/qwik": "^1.5.6"
}
}
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": {
"serve": "^14.2.3",
"vite": "^5.2.12"
"vite": "^5.2.13"
},
"dependencies": {
"@builder.io/qwik": "^1.5.5"
"@builder.io/qwik": "^1.5.6"
}
}
8 changes: 4 additions & 4 deletions packages/create-vite/template-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"@vitejs/plugin-react": "^4.3.0",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"typescript": "^5.2.2",
"vite": "^5.2.12"
"vite": "^5.2.13"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"vite": "^5.2.12"
"vite": "^5.2.13"
}
}
2 changes: 1 addition & 1 deletion 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.2.12",
"vite": "^5.2.13",
"vite-plugin-solid": "^2.10.2"
}
}
2 changes: 1 addition & 1 deletion 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.17"
},
"devDependencies": {
"vite": "^5.2.12",
"vite": "^5.2.13",
"vite-plugin-solid": "^2.10.2"
}
}
6 changes: 3 additions & 3 deletions packages/create-vite/template-svelte-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"@tsconfig/svelte": "^5.0.4",
"svelte": "^4.2.17",
"svelte": "^4.2.18",
"svelte-check": "^3.8.0",
"tslib": "^2.6.2",
"tslib": "^2.6.3",
"typescript": "^5.2.2",
"vite": "^5.2.12"
"vite": "^5.2.13"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"svelte": "^4.2.17",
"vite": "^5.2.12"
"svelte": "^4.2.18",
"vite": "^5.2.13"
}
}
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.2.12"
"vite": "^5.2.13"
}
}
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.2.12"
"vite": "^5.2.13"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-vue-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.5",
"typescript": "^5.2.2",
"vite": "^5.2.12",
"vue-tsc": "^2.0.19"
"vite": "^5.2.13",
"vue-tsc": "^2.0.21"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.5",
"vite": "^5.2.12"
"vite": "^5.2.13"
}
}
6 changes: 3 additions & 3 deletions packages/plugin-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
"homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme",
"funding": "https://github.com/vitejs/vite?sponsor=1",
"dependencies": {
"@babel/core": "^7.24.6",
"@babel/preset-env": "^7.24.6",
"browserslist": "^4.23.0",
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"browserslist": "^4.23.1",
"browserslist-to-esbuild": "^2.1.1",
"core-js": "^3.37.1",
"magic-string": "^0.30.10",
Expand Down
24 changes: 24 additions & 0 deletions packages/vite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## 5.3.0-beta.2 (2024-06-10)

* fix: gracefully shutdown preview server on `SIGTERM` (fix #12990) (#17333) ([2207a68](https://github.com/vitejs/vite/commit/2207a68)), closes [#12990](https://github.com/vitejs/vite/issues/12990) [#17333](https://github.com/vitejs/vite/issues/17333)
* fix(css): ensure order of extracted CSS (#16588) ([a52ed1d](https://github.com/vitejs/vite/commit/a52ed1d)), closes [#16588](https://github.com/vitejs/vite/issues/16588)
* fix(deps): update all non-major dependencies (#17430) ([4453d35](https://github.com/vitejs/vite/commit/4453d35)), closes [#17430](https://github.com/vitejs/vite/issues/17430)
* build: use esbuild to speedup building vite package (#17299) ([6db2515](https://github.com/vitejs/vite/commit/6db2515)), closes [#17299](https://github.com/vitejs/vite/issues/17299)
* chore: add error recovery option to LightningCSSOptions (#17420) ([e04193f](https://github.com/vitejs/vite/commit/e04193f)), closes [#17420](https://github.com/vitejs/vite/issues/17420)
* chore(deps): update dependency @rollup/plugin-commonjs to v26 (#17431) ([507b3de](https://github.com/vitejs/vite/commit/507b3de)), closes [#17431](https://github.com/vitejs/vite/issues/17431)



## 5.3.0-beta.1 (2024-06-07)

* fix(build): allow dynamic import treeshaking when injecting preload (#14221) ([f43f71f](https://github.com/vitejs/vite/commit/f43f71f)), closes [#14221](https://github.com/vitejs/vite/issues/14221)
* fix(css): handle lightningcss minification in Deno (#17372) ([b3f5bd1](https://github.com/vitejs/vite/commit/b3f5bd1)), closes [#17372](https://github.com/vitejs/vite/issues/17372)
* fix(css): handle url replacing when preprocessing with lightningcss (#17364) ([6fbb5e0](https://github.com/vitejs/vite/commit/6fbb5e0)), closes [#17364](https://github.com/vitejs/vite/issues/17364)
* fix(ssr): remove pure CSS dynamic import (#17371) ([67ff94b](https://github.com/vitejs/vite/commit/67ff94b)), closes [#17371](https://github.com/vitejs/vite/issues/17371)
* fix(ssr): resolve interlocking circular dependency issues (#15395) ([687c38b](https://github.com/vitejs/vite/commit/687c38b)), closes [#15395](https://github.com/vitejs/vite/issues/15395)
* chore: add region comment (#17370) ([a8c7083](https://github.com/vitejs/vite/commit/a8c7083)), closes [#17370](https://github.com/vitejs/vite/issues/17370)
* chore(deps): update all non-major dependencies (#17373) ([f2d52f1](https://github.com/vitejs/vite/commit/f2d52f1)), closes [#17373](https://github.com/vitejs/vite/issues/17373)
* feat(typescript): update tsconfck to add support for `${configDir}` replacement in ts 5.5 (#17350) ([4835e2b](https://github.com/vitejs/vite/commit/4835e2b)), closes [#17350](https://github.com/vitejs/vite/issues/17350)



## 5.3.0-beta.0 (2024-05-30)

* fix: adjust import analysis behavior to match Node (#16738) ([f599ab4](https://github.com/vitejs/vite/commit/f599ab4)), closes [#16738](https://github.com/vitejs/vite/issues/16738)
Expand Down
Loading

0 comments on commit 3b80e94

Please sign in to comment.