Skip to content

Commit

Permalink
Merge branch 'main' into feat-resolve-file-url-2
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Oct 28, 2024
2 parents 582719f + 1ac22de commit 2f25e8b
Show file tree
Hide file tree
Showing 40 changed files with 462 additions and 408 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Preview release

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

permissions:
pull-requests: write

on:
push:
branches:
- main
pull_request:
types: [labeled]

jobs:
preview:
if: >
github.repository == 'vitejs/vite' &&
(github.event_name == 'push' ||
(github.event.issue.pull_request && contains(github.event.pull_request.labels.*.name, 'trigger: preview')))
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- 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

- if: github.event_name != 'push'
run: |
gh issue edit ${{ github.event.issue.number }} --remove-label "trigger: preview" --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71 changes: 0 additions & 71 deletions .github/workflows/publish-commit.yml

This file was deleted.

1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
hoist-pattern[]=ts-node # package/vite: postcss-load-config
hoist-pattern[]=postcss # package/vite
hoist-pattern[]=pug # playground/tailwind: @vue/compiler-sfc
shell-emulator=true
Expand Down
20 changes: 7 additions & 13 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,19 +456,13 @@ export default defineConfig({
},
}),
],
environments: {
client: {
dev: {
optimizeDeps: {
include: [
'@shikijs/vitepress-twoslash/client',
'gsap',
'gsap/dist/ScrollTrigger',
'gsap/dist/MotionPathPlugin',
],
},
},
},
optimizeDeps: {
include: [
'@shikijs/vitepress-twoslash/client',
'gsap',
'gsap/dist/ScrollTrigger',
'gsap/dist/MotionPathPlugin',
],
},
},
buildEnd,
Expand Down
6 changes: 2 additions & 4 deletions docs/guide/api-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export default {
},
},
ssr: {
dev: {
optimizeDeps: {}, // configure the SSR environment
},
optimizeDeps: {}, // configure the SSR environment
},
rsc: {
resolve: {
Expand All @@ -61,7 +59,7 @@ export default {
}
```

The `EnvironmentOptions` interface exposes all the per-environment options. There are `SharedEnvironmentOptions` that apply to both `build` and `dev`, like `resolve`. And there are `DevEnvironmentOptions` and `BuildEnvironmentOptions` for dev and build specific options (like `dev.optimizeDeps` or `build.outDir`).
The `EnvironmentOptions` interface exposes all the per-environment options. There are `SharedEnvironmentOptions` that apply to both `build` and `dev`, like `resolve`. And there are `DevEnvironmentOptions` and `BuildEnvironmentOptions` for dev and build specific options (like `optimizeDeps` or `build.outDir`).

```ts
interface EnvironmentOptions extends SharedEnvironmentOptions {
Expand Down
8 changes: 4 additions & 4 deletions docs/guide/backend-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ If you need a custom integration, you can follow the steps in this guide to conf

```json [.vite/manifest.json]
{
"_shared-!~{003}~.js": {
"file": "assets/shared-ChJ_j-JJ.css",
"src": "_shared-!~{003}~.js"
},
"_shared-B7PI925R.js": {
"file": "assets/shared-B7PI925R.js",
"name": "shared",
"css": ["assets/shared-ChJ_j-JJ.css"]
},
"_shared-ChJ_j-JJ.css": {
"file": "assets/shared-ChJ_j-JJ.css",
"src": "_shared-ChJ_j-JJ.css"
},
"baz.js": {
"file": "assets/baz-B2H3sXNv.js",
"name": "baz",
Expand Down
6 changes: 6 additions & 0 deletions docs/guide/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ From Vite 6, even when `json.stringify: true` is set, `json.namedExports` is not

Vite 6 also introduces a new default value for `json.stringify` which is `'auto'`, which will only stringify large JSON files. To disable this behavior, set `json.stringify: false`.

### postcss-load-config

[`postcss-load-config`](https://npmjs.com/package/postcss-load-config) has been updated to v6 from v4. [`tsx`](https://www.npmjs.com/package/tsx) or [`jiti`](https://www.npmjs.com/package/jiti) is now required to load TypeScript postcss config files instead of [`ts-node`](https://www.npmjs.com/package/ts-node). Also [`yaml`](https://www.npmjs.com/package/yaml) is now required to load YAML postcss config files.

### Sass now uses modern API by default

In Vite 5, the legacy API was used by default for Sass. Vite 5.4 added support for the modern API.
Expand All @@ -36,6 +40,8 @@ There are other breaking changes which only affect few users.
- [`build.cssMinify`](/config/build-options#build-cssminify) is now enabled by default even for SSR builds.
- [[#18209] refactor!: bump minimal terser version to 5.16.0](https://github.com/vitejs/vite/pull/18209)
- Minimal supported terser version for [`build.minify: 'terser'`](/config/build-options#build-minify) was bumped to 5.16.0 from 5.4.0.
- [[#18231] chore(deps): update dependency @rollup/plugin-commonjs to v28](https://github.com/vitejs/vite/pull/18231)
- [`commonjsOptions.strictRequires`](https://github.com/rollup/plugins/blob/master/packages/commonjs/README.md#strictrequires) is now `true` by default (was `'auto'` before).
- [[#18243] chore(deps)!: migrate `fast-glob` to `tinyglobby`](https://github.com/vitejs/vite/pull/18243)
- Range braces (`{01..03}``['01', '02', '03']`) and incremental braces (`{2..8..2}``['2', '4', '6', '8']`) are no longer supported in globs.

Expand Down
11 changes: 9 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,15 @@ export default tseslint.config(
'n/no-extraneous-import': [
'error',
{
allowModules: ['vite', 'less', 'sass', 'vitest', 'unbuild'],
allowModules: [
'vite',
'less',
'sass',
'sass-embedded',
'lightningcss',
'vitest',
'unbuild',
],
},
],
'n/no-extraneous-require': [
Expand Down Expand Up @@ -196,7 +204,6 @@ export default tseslint.config(
'playground/**/*dep*/**',
'playground/resolve/browser-module-field2/index.web.js',
'playground/resolve/browser-field/**',
'playground/tailwind/**', // blocked by https://github.com/postcss/postcss-load-config/issues/239
],
rules: {
'import-x/no-commonjs': 'error',
Expand Down
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@
"postcss",
"search-insights"
]
},
"packageExtensions": {
"sass-embedded": {
"peerDependencies": {
"source-map-js": "*"
},
"peerDependenciesMeta": {
"source-map-js": {
"optional": true
}
}
}
}
},
"stackblitz": {
Expand Down
16 changes: 16 additions & 0 deletions packages/plugin-legacy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## <small>5.4.3 (2024-10-25)</small>

* chore: enable some eslint rules (#18084) ([e9a2746](https://github.com/vitejs/vite/commit/e9a2746ca77473b1814fd05db3d299c074135fe5)), closes [#18084](https://github.com/vitejs/vite/issues/18084)
* chore: remove stale TODOs (#17866) ([e012f29](https://github.com/vitejs/vite/commit/e012f296df583bd133d26399397bd4ae49de1497)), closes [#17866](https://github.com/vitejs/vite/issues/17866)
* chore: update license copyright (#18278) ([56eb869](https://github.com/vitejs/vite/commit/56eb869a67551a257d20cba00016ea59b1e1a2c4)), closes [#18278](https://github.com/vitejs/vite/issues/18278)
* chore(deps): update all non-major dependencies (#17945) ([cfb621e](https://github.com/vitejs/vite/commit/cfb621e7a5a3e24d710a9af156e6855e73caf891)), closes [#17945](https://github.com/vitejs/vite/issues/17945)
* chore(deps): update all non-major dependencies (#18050) ([7cac03f](https://github.com/vitejs/vite/commit/7cac03fa5197a72d2e2422bd0243a85a9a18abfc)), closes [#18050](https://github.com/vitejs/vite/issues/18050)
* chore(deps): update all non-major dependencies (#18404) ([802839d](https://github.com/vitejs/vite/commit/802839d48335a69eb15f71f2cd816d0b6e4d3556)), closes [#18404](https://github.com/vitejs/vite/issues/18404)
* fix(deps): update all non-major dependencies (#18170) ([c8aea5a](https://github.com/vitejs/vite/commit/c8aea5ae0af90dc6796ef3bdd612d1eb819f157b)), closes [#18170](https://github.com/vitejs/vite/issues/18170)
* fix(deps): update all non-major dependencies (#18292) ([5cac054](https://github.com/vitejs/vite/commit/5cac0544dca2764f0114aac38e9922a0c13d7ef4)), closes [#18292](https://github.com/vitejs/vite/issues/18292)
* fix(deps): update all non-major dependencies (#18345) ([5552583](https://github.com/vitejs/vite/commit/5552583a2272cd4208b30ad60e99d984e34645f0)), closes [#18345](https://github.com/vitejs/vite/issues/18345)
* fix(legacy): generate sourcemap for polyfill chunks (#18250) ([f311ff3](https://github.com/vitejs/vite/commit/f311ff3c2b19636457c3023095ef32ab9a96b84a)), closes [#18250](https://github.com/vitejs/vite/issues/18250)
* perf: use `crypto.hash` when available (#18317) ([2a14884](https://github.com/vitejs/vite/commit/2a148844cf2382a5377b75066351f00207843352)), closes [#18317](https://github.com/vitejs/vite/issues/18317)



## <small>5.4.2 (2024-08-15)</small>

* chore: extend commit hash (#17709) ([4fc9b64](https://github.com/vitejs/vite/commit/4fc9b6424c27aca8004c368b69991a56264e4fdb)), closes [#17709](https://github.com/vitejs/vite/issues/17709)
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-legacy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitejs/plugin-legacy",
"version": "5.4.2",
"version": "5.4.3",
"license": "MIT",
"author": "Evan You",
"files": [
Expand Down
21 changes: 0 additions & 21 deletions packages/vite/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2518,24 +2518,3 @@ Repository: git+https://github.com/websockets/ws.git
> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------

## yaml
License: ISC
By: Eemeli Aro
Repository: github:eemeli/yaml

> Copyright Eemeli Aro <[email protected]>
>
> Permission to use, copy, modify, and/or distribute this software for any purpose
> with or without fee is hereby granted, provided that the above copyright notice
> and this permission notice appear in all copies.
>
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
> REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
> FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
> INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
> OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
> TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
> THIS SOFTWARE.
19 changes: 16 additions & 3 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"./types/*": {
"types": "./types/*"
},
"./types/internal/*": null,
"./package.json": "./package.json"
},
"typesVersions": {
Expand Down Expand Up @@ -135,7 +136,7 @@
"picocolors": "^1.1.1",
"picomatch": "^4.0.2",
"postcss-import": "^16.1.0",
"postcss-load-config": "^4.0.2",
"postcss-load-config": "^6.0.1",
"postcss-modules": "^6.0.0",
"resolve.exports": "^2.0.2",
"rollup-plugin-dts": "^6.1.1",
Expand All @@ -147,7 +148,7 @@
"source-map-support": "^0.5.21",
"strip-ansi": "^7.1.0",
"strip-literal": "^2.1.0",
"tinyglobby": "^0.2.9",
"tinyglobby": "^0.2.10",
"tsconfck": "^3.1.4",
"tslib": "^2.8.0",
"types": "link:./types",
Expand All @@ -156,18 +157,24 @@
},
"peerDependencies": {
"@types/node": "^18.0.0 || >=20.0.0",
"jiti": ">=1.21.0",
"less": "*",
"lightningcss": "^1.21.0",
"sass": "*",
"sass-embedded": "*",
"stylus": "*",
"sugarss": "*",
"terser": "^5.16.0"
"terser": "^5.16.0",
"tsx": "^4.8.1",
"yaml": "^2.4.2"
},
"peerDependenciesMeta": {
"@types/node": {
"optional": true
},
"jiti": {
"optional": true
},
"sass": {
"optional": true
},
Expand All @@ -188,6 +195,12 @@
},
"terser": {
"optional": true
},
"tsx": {
"optional": true
},
"yaml": {
"optional": true
}
}
}
Loading

0 comments on commit 2f25e8b

Please sign in to comment.