From 7a1f032570fb984d56ea57eceac3063f1b55f0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Markb=C3=A5ge?= Date: Thu, 9 Jan 2025 16:08:39 -0500 Subject: [PATCH] Update lightningcss (#74695) This has the View Transitions fix for CSS modules. --- Cargo.lock | 19 ++--- Cargo.toml | 6 +- .../css/test/css-compilation.test.js | 76 +++++++++---------- 3 files changed, 51 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e2f6a79162b5e..6ba937b45fca0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2761,7 +2761,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.6", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -3399,9 +3399,9 @@ dependencies = [ [[package]] name = "lightningcss" -version = "1.0.0-alpha.61" +version = "1.0.0-alpha.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c9e1f991b3861d25bf872ecca2eb6a73f7a9fe671da047cd1f9b49c65cbc40" +checksum = "8a75fcbcdbcc84fc1ae7c60c31f99337560b620757a9bfc1c9f84df3cff8ac24" dependencies = [ "ahash 0.8.11", "bitflags 2.5.0", @@ -3439,9 +3439,9 @@ dependencies = [ [[package]] name = "lightningcss-napi" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f76d2c3181b0c8c499a629034f141177fef173af08aa19c8b7dab4268ca61e30" +checksum = "8f5e41d371670417f71b779fe6d66959a68c21fbda563a747d795ac525f72450" dependencies = [ "cssparser", "lightningcss", @@ -4484,9 +4484,9 @@ dependencies = [ [[package]] name = "parcel_selectors" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7645c578d3a5c4cdf667af1ad39765f5f751c4883d251e050d5e1204b5cad0a9" +checksum = "dccbc6fb560df303a44e511618256029410efbc87779018f751ef12c488271fe" dependencies = [ "bitflags 2.5.0", "cssparser", @@ -6195,10 +6195,11 @@ dependencies = [ [[package]] name = "static-self" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "253e76c8c993a7b1b201b0539228b334582153cd4364292822d2c30776d469c7" +checksum = "f6635404b73efc136af3a7956e53c53d4f34b2f16c95a15c438929add0f69412" dependencies = [ + "indexmap 2.5.0", "smallvec", "static-self-derive", ] diff --git a/Cargo.toml b/Cargo.toml index 73d1d287cfe1c..ca78b97a68aca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -151,12 +151,12 @@ indoc = "2.0.0" itertools = "0.10.5" lazy_static = "1.4.0" log = "0.4.17" -lightningcss = { version = "1.0.0-alpha.61", features = [ +lightningcss = { version = "1.0.0-alpha.63", features = [ "serde", "visitor", "into_owned", ] } -lightningcss-napi = { version = "0.4.0", default-features = false, features = [ +lightningcss-napi = { version = "0.4.3", default-features = false, features = [ "visitor" ]} markdown = "1.0.0-alpha.18" @@ -165,7 +165,7 @@ nohash-hasher = "0.2.0" notify = "6.1.1" once_cell = "1.17.1" owo-colors = "3.5.0" -parcel_selectors = "0.28.0" +parcel_selectors = "0.28.1" parking_lot = "0.12.1" pathdiff = "0.2.1" petgraph = "0.6.3" diff --git a/test/integration/css/test/css-compilation.test.js b/test/integration/css/test/css-compilation.test.js index effef08e4e037..dc383a710628f 100644 --- a/test/integration/css/test/css-compilation.test.js +++ b/test/integration/css/test/css-compilation.test.js @@ -87,7 +87,7 @@ module.exports = { ) } else if (useLightningcss) { expect(cssContentWithoutSourceMap).toMatchInlineSnapshot( - `"@media (min-width:480px) and (max-width:767.999px){::placeholder{color:green}}.flex-parsing{flex:0 0 calc(50% - var(--vertical-gutter))}.transform-parsing{transform:translate3d(0,0)}.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(0,0)}.css-grid-shorthand{grid-column:span 2}.g-docs-sidenav .filter::-webkit-input-placeholder{opacity:.8}"` ) } else { expect(cssContentWithoutSourceMap).toMatchInlineSnapshot( @@ -234,37 +234,37 @@ module.exports = { `) } else if (useLightningcss) { expect(sourceMapContentParsed).toMatchInlineSnapshot(` - { - "mappings": "AAAA,mDACE,cACE,WACF,CACF,CAEA,cACE,2CACF,CAEA,mBACE,0BACF,CAEA,oBACE,kBACF,CAEA,mDACE,UACF", - "names": [], - "sourceRoot": "", - "sourcesContent": [ - "@media (min-width: 480px) and (max-width: 767.999px) { - ::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; - } - - ", - ], - "version": 3, - } + { + "mappings": "AAAA,qDACE,cACE,WACF,CACF,CAEA,cACE,2CACF,CAEA,mBACE,0BACF,CAEA,oBACE,kBACF,CAEA,mDACE,UACF", + "names": [], + "sourceRoot": "", + "sourcesContent": [ + "@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; + } + + ", + ], + "version": 3, + } `) } else { expect(sourceMapContentParsed).toMatchInlineSnapshot(` @@ -549,19 +549,19 @@ module.exports = { if (process.env.TURBOPACK && useLightningcss) { expect(cssContent.replace(/\/\*.*?\*\//g, '').trim()) .toMatchInlineSnapshot(` -".other{color:#00f} + ".other{color:#00f} -.test{color:red}" -`) + .test{color:red}" + `) } else if (process.env.TURBOPACK && !useLightningcss) { expect(cssContent.replace(/\/\*.*?\*\//g, '').trim()) .toMatchInlineSnapshot(` -".other{color:#00f} + ".other{color:#00f} -.test{color:red}" -`) + .test{color:red}" + `) } else if (useLightningcss) { expect( cssContent.replace(/\/\*.*?\*\//g, '').trim()