Repository: vercel/next.js
Pull request: Upgrade Lightning CSS

Changelog: https://github.com/parcel-bundler/lightningcss/releases/tag/v1.31.0

- [x] Blocked by https://github.com/parcel-bundler/lightningcss/issues/1137
- [ ] Found https://github.com/parcel-bundler/lightningcss/issues/1151

Changed files:
filename: Cargo.lock
patch: @@ -3791,9 +3791,9 @@ dependencies = [
 
 [[package]]
 name = "lightningcss"
-version = "1.0.0-alpha.68"
+version = "1.0.0-alpha.70"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b407ca668368d1d5a86cea58ac82d9f9f9ca4bac1e9dce6f16f875f0f081a911"
+checksum = "9efb6a77b2389e62735b0b8157be9cc10a159eb4d1c3b864e99db9f297ada1b0"
 dependencies = [
  "ahash 0.8.12",
  "bitflags 2.9.1",
@@ -3833,9 +3833,9 @@ dependencies = [
 
 [[package]]
 name = "lightningcss-napi"
-version = "0.4.5"
+version = "0.4.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be455e573ab952db95c4be34046b513dbbd2f5fee5e34206deb0a828d38d4ba1"
+checksum = "f92fa166487749530838b46903116f90b4aad0edd3d829d2a4164a9f3edf6866"
 dependencies = [
  "cssparser",
  "lightningcss",

filename: Cargo.toml
patch: @@ -399,13 +399,13 @@ indexmap = "2.7.1"
 indoc = "2.0.0"
 inventory = "0.3.21"
 itertools = "0.10.5"
-lightningcss = { version = "1.0.0-alpha.68", features = [
+lightningcss = { version = "1.0.0-alpha.70", features = [
   "serde",
   "visitor",
   "into_owned",
   "browserslist",
 ] }
-lightningcss-napi = { version = "0.4.5", default-features = false, features = [
+lightningcss-napi = { version = "0.4.6", default-features = false, features = [
   "visitor",
 ] }
 markdown = "1.0.0-alpha.18"

filename: test/integration/css/test/css-compilation.test.ts
patch: @@ -85,15 +85,15 @@ module.exports = {
 
               if (process.env.IS_TURBOPACK_TEST && useLightningcss) {
                 expect(cssContentWithoutSourceMap).toMatchInlineSnapshot(
-                  `"@media (min-width:480px) and (not (min-width:768px)){::placeholder{color:green}}.flex-parsing{flex:0 0 calc(50% - var(--vertical-gutter))}.transform-parsing{transform:translate3d(0px,0px)}.css-grid-shorthand{grid-column:span 2}.g-docs-sidenav .filter::-webkit-input-placeholder{opacity:.8}"`
+                  `"@media (min-width:480px) and (not (min-width:768px)){::placeholder{color:green}}.flex-parsing{flex:0 0 calc(50% - var(--vertical-gutter))}.transform-parsing{transform:translate3d(0px, 0px)}.css-grid-shorthand{grid-column:span 2}.g-docs-sidenav .filter::-webkit-input-placeholder{opacity:.8}"`
                 )
               } else if (process.env.IS_TURBOPACK_TEST && !useLightningcss) {
                 expect(cssContentWithoutSourceMap).toMatchInlineSnapshot(
-                  `"@media (min-width:480px) and (not (min-width:768px)){::placeholder{color:green}}.flex-parsing{flex:0 0 calc(50% - var(--vertical-gutter))}.transform-parsing{transform:translate3d(0px,0px)}.css-grid-shorthand{grid-column:span 2}.g-docs-sidenav .filter::-webkit-input-placeholder{opacity:.8}"`
+                  `"@media (min-width:480px) and (not (min-width:768px)){::placeholder{color:green}}.flex-parsing{flex:0 0 calc(50% - var(--vertical-gutter))}.transform-parsing{transform:translate3d(0px, 0px)}.css-grid-shorthand{grid-column:span 2}.g-docs-sidenav .filter::-webkit-input-placeholder{opacity:.8}"`
                 )
               } else if (process.env.NEXT_RSPACK && useLightningcss) {
                 expect(cssContentWithoutSourceMap).toMatchInlineSnapshot(
-                  `"@media (min-width:480px) and (not (min-width:768px)){::placeholder{color:green}}.flex-parsing{flex:0 0 calc(50% - var(--vertical-gutter))}.transform-parsing{transform:translate3d(0px,0px)}.css-grid-shorthand{grid-column:span 2}.g-docs-sidenav .filter::-webkit-input-placeholder{opacity:.8}"`
+                  `"@media (min-width:480px) and (not (min-width:768px)){::placeholder{color:green}}.flex-parsing{flex:0 0 calc(50% - var(--vertical-gutter))}.transform-parsing{transform:translate3d(0px, 0px)}.css-grid-shorthand{grid-column:span 2}.g-docs-sidenav .filter::-webkit-input-placeholder{opacity:.8}"`
                 )
               } else if (useLightningcss) {
                 expect(cssContentWithoutSourceMap).toMatchInlineSnapshot(
@@ -129,36 +129,36 @@ module.exports = {
               if (process.env.IS_TURBOPACK_TEST) {
                 // Turbopack always uses lightningcss
                 expect(sourceMapContentParsed).toMatchInlineSnapshot(`
-                 {
-                   "mappings": "AAAA,qDACE,2BAKF,0DAIA,kDAIA,uCAIA",
-                   "names": [],
-                   "sourcesContent": [
-                     "@media (480px <= width < 768px) {
-                   ::placeholder {
-                     color: green;
-                   }
-                 }
-
-                 .flex-parsing {
-                   flex: 0 0 calc(50% - var(--vertical-gutter));
-                 }
-
-                 .transform-parsing {
-                   transform: translate3d(0px, 0px);
-                 }
-
-                 .css-grid-shorthand {
-                   grid-column: span 2;
-                 }
-
-                 .g-docs-sidenav .filter::-webkit-input-placeholder {
-                   opacity: 80%;
+               {
+                 "mappings": "AAAA,qDACE,2BAKF,0DAIA,mDAIA,uCAIA",
+                 "names": [],
+                 "sourcesContent": [
+                   "@media (480px <= width < 768px) {
+                 ::placeholder {
+                   color: green;
                  }
-                 ",
-                   ],
-                   "version": 3,
-                 }
-                `)
+               }
+
+               .flex-parsing {
+                 flex: 0 0 calc(50% - var(--vertical-gutter));
+               }
+
+               .transform-parsing {
+                 transform: translate3d(0px, 0px);
+               }
+
+               .css-grid-shorthand {
+                 grid-column: span 2;
+               }
+
+               .g-docs-sidenav .filter::-webkit-input-placeholder {
+                 opacity: 80%;
+               }
+               ",
+                 ],
+                 "version": 3,
+               }
+              `)
               } else if (process.env.NEXT_RSPACK && !useLightningcss) {
                 expect(sourceMapContentParsed).toMatchInlineSnapshot(`
                  {