Unverified Commit 4991d120 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Bump lightningcss (#97159)

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

We encourage you to use AI to assist you in researching, creating, and
reviewing changes. However, you must review and deeply understand the
contributions you are making. For this reason, **pull request
descriptions from external contributors must be written by a human**.

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Signed commits

- This repository requires verified commit signatures on protected
branches.
- If this pull request is blocked for unsigned commits, re-sign the
commits and force-push the branch.
- A `Signed-off-by` line in the commit message is not enough.

## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
parent 40503aae
...@@ -643,7 +643,7 @@ dependencies = [ ...@@ -643,7 +643,7 @@ dependencies = [
"bitflags 2.9.1", "bitflags 2.9.1",
"cexpr", "cexpr",
"clang-sys", "clang-sys",
"itertools 0.10.5", "itertools 0.13.0",
"log", "log",
"prettyplease", "prettyplease",
"proc-macro2", "proc-macro2",
...@@ -1515,23 +1515,9 @@ dependencies = [ ...@@ -1515,23 +1515,9 @@ dependencies = [
[[package]] [[package]]
name = "const-str" name = "const-str"
version = "0.3.2" version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21077772762a1002bb421c3af42ac1725fa56066bfc53d9a55bb79905df2aaf3"
dependencies = [
"const-str-proc-macro",
]
[[package]]
name = "const-str-proc-macro"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e1e0fdd2e5d3041e530e1b21158aeeef8b5d0e306bc5c1e3d6cf0930d10e25a" checksum = "18f12cc9948ed9604230cdddc7c86e270f9401ccbe3c2e98a4378c5e7632212f"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]] [[package]]
name = "const_format" name = "const_format"
...@@ -1975,32 +1961,32 @@ dependencies = [ ...@@ -1975,32 +1961,32 @@ dependencies = [
[[package]] [[package]]
name = "cssparser" name = "cssparser"
version = "0.33.0" version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9be934d936a0fbed5bcdc01042b770de1398bf79d0e192f49fa7faea0e99281e" checksum = "8c9cdaae01d5ed7882b04d795e7f752f46ff52d2fa3b50a20d28c464510bba98"
dependencies = [ dependencies = [
"cssparser-macros", "cssparser-macros",
"dtoa-short", "dtoa-short",
"itoa", "itoa",
"phf", "phf 0.13.1",
"serde", "serde",
"smallvec", "smallvec",
] ]
[[package]] [[package]]
name = "cssparser-color" name = "cssparser-color"
version = "0.1.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "556c099a61d85989d7af52b692e35a8d68a57e7df8c6d07563dc0778b3960c9f" checksum = "bbaa233e1dcd9c13a5d3e3a8a2c0f5a727bac380398345dbcb31db4597edc86b"
dependencies = [ dependencies = [
"cssparser", "cssparser",
] ]
[[package]] [[package]]
name = "cssparser-macros" name = "cssparser-macros"
version = "0.6.1" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" checksum = "10a2a99df6e410a8ff4245aa2006499ea662245f967cc7c0a38c83ef8eb44dbf"
dependencies = [ dependencies = [
"quote", "quote",
"syn 2.0.104", "syn 2.0.104",
...@@ -4308,9 +4294,9 @@ dependencies = [ ...@@ -4308,9 +4294,9 @@ dependencies = [
[[package]] [[package]]
name = "lightningcss" name = "lightningcss"
version = "1.0.0-alpha.70" version = "1.0.0-alpha.72"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9efb6a77b2389e62735b0b8157be9cc10a159eb4d1c3b864e99db9f297ada1b0" checksum = "d31b760f96e8fdfe1d0c295e4bf76c503d6f15d2d470d53bd8cd1f7aa8c7d934"
dependencies = [ dependencies = [
"ahash 0.8.12", "ahash 0.8.12",
"bitflags 2.9.1", "bitflags 2.9.1",
...@@ -4350,9 +4336,9 @@ dependencies = [ ...@@ -4350,9 +4336,9 @@ dependencies = [
[[package]] [[package]]
name = "lightningcss-napi" name = "lightningcss-napi"
version = "0.4.6" version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f92fa166487749530838b46903116f90b4aad0edd3d829d2a4164a9f3edf6866" checksum = "145b0efb05f7676c9e7d44f80e3d58b9ecca46a18fd0f1f47189536b9aa497ee"
dependencies = [ dependencies = [
"cssparser", "cssparser",
"lightningcss", "lightningcss",
...@@ -4980,7 +4966,7 @@ dependencies = [ ...@@ -4980,7 +4966,7 @@ dependencies = [
"codspeed-criterion-compat", "codspeed-criterion-compat",
"insta", "insta",
"memchr", "memchr",
"phf", "phf 0.11.2",
"regex", "regex",
"regex-automata", "regex-automata",
"serde", "serde",
...@@ -5007,7 +4993,7 @@ dependencies = [ ...@@ -5007,7 +4993,7 @@ dependencies = [
"next-custom-transforms", "next-custom-transforms",
"next-taskless", "next-taskless",
"percent-encoding", "percent-encoding",
"phf", "phf 0.11.2",
"qstring", "qstring",
"react_remove_properties", "react_remove_properties",
"regex", "regex",
...@@ -5564,14 +5550,14 @@ dependencies = [ ...@@ -5564,14 +5550,14 @@ dependencies = [
[[package]] [[package]]
name = "parcel_selectors" name = "parcel_selectors"
version = "0.28.2" version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54fd03f1ad26cb6b3ec1b7414fa78a3bd639e7dbb421b1a60513c96ce886a196" checksum = "d05f71e01edca03d245ab0a9f7ce13a974ceb79baaae8faf2ba0b11de6b90913"
dependencies = [ dependencies = [
"bitflags 2.9.1", "bitflags 2.9.1",
"cssparser", "cssparser",
"log", "log",
"phf", "phf 0.11.2",
"phf_codegen", "phf_codegen",
"precomputed-hash", "precomputed-hash",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
...@@ -5736,8 +5722,19 @@ version = "0.11.2" ...@@ -5736,8 +5722,19 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
dependencies = [ dependencies = [
"phf_macros", "phf_macros 0.11.2",
"phf_shared", "phf_shared 0.11.2",
]
[[package]]
name = "phf"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"
dependencies = [
"phf_macros 0.13.1",
"phf_shared 0.13.1",
"serde",
] ]
[[package]] [[package]]
...@@ -5746,8 +5743,8 @@ version = "0.11.2" ...@@ -5746,8 +5743,8 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a"
dependencies = [ dependencies = [
"phf_generator", "phf_generator 0.11.2",
"phf_shared", "phf_shared 0.11.2",
] ]
[[package]] [[package]]
...@@ -5756,18 +5753,41 @@ version = "0.11.2" ...@@ -5756,18 +5753,41 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0"
dependencies = [ dependencies = [
"phf_shared", "phf_shared 0.11.2",
"rand 0.8.5", "rand 0.8.5",
] ]
[[package]]
name = "phf_generator"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"
dependencies = [
"fastrand",
"phf_shared 0.13.1",
]
[[package]] [[package]]
name = "phf_macros" name = "phf_macros"
version = "0.11.2" version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
dependencies = [ dependencies = [
"phf_generator", "phf_generator 0.11.2",
"phf_shared", "phf_shared 0.11.2",
"proc-macro2",
"quote",
"syn 2.0.104",
]
[[package]]
name = "phf_macros"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef"
dependencies = [
"phf_generator 0.13.1",
"phf_shared 0.13.1",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.104", "syn 2.0.104",
...@@ -5779,7 +5799,16 @@ version = "0.11.2" ...@@ -5779,7 +5799,16 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b"
dependencies = [ dependencies = [
"siphasher", "siphasher 0.3.11",
]
[[package]]
name = "phf_shared"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
dependencies = [
"siphasher 1.0.3",
] ]
[[package]] [[package]]
...@@ -6080,7 +6109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" ...@@ -6080,7 +6109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"itertools 0.10.5", "itertools 0.13.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.104", "syn 2.0.104",
...@@ -7527,6 +7556,12 @@ version = "0.3.11" ...@@ -7527,6 +7556,12 @@ version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
[[package]]
name = "siphasher"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649"
[[package]] [[package]]
name = "slab" name = "slab"
version = "0.4.9" version = "0.4.9"
...@@ -7889,7 +7924,7 @@ dependencies = [ ...@@ -7889,7 +7924,7 @@ dependencies = [
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
"serde", "serde",
"shrink-to-fit", "shrink-to-fit",
"siphasher", "siphasher 0.3.11",
"swc_atoms", "swc_atoms",
"swc_eq_ignore_macros", "swc_eq_ignore_macros",
"swc_sourcemap", "swc_sourcemap",
...@@ -8130,7 +8165,7 @@ dependencies = [ ...@@ -8130,7 +8165,7 @@ dependencies = [
"is-macro", "is-macro",
"num-bigint", "num-bigint",
"once_cell", "once_cell",
"phf", "phf 0.11.2",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
"serde", "serde",
"shrink-to-fit", "shrink-to-fit",
...@@ -8354,7 +8389,7 @@ version = "34.0.0" ...@@ -8354,7 +8389,7 @@ version = "34.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffc2e49ad776b5d0315ae2e0bb5fe70a218ee468ac70f7bb472dc2ab4386f420" checksum = "ffc2e49ad776b5d0315ae2e0bb5fe70a218ee468ac70f7bb472dc2ab4386f420"
dependencies = [ dependencies = [
"phf", "phf 0.11.2",
"swc_common", "swc_common",
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_utils", "swc_ecma_utils",
...@@ -8431,7 +8466,7 @@ dependencies = [ ...@@ -8431,7 +8466,7 @@ dependencies = [
"par-core", "par-core",
"par-iter", "par-iter",
"parking_lot", "parking_lot",
"phf", "phf 0.11.2",
"radix_fmt", "radix_fmt",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
"ryu-js", "ryu-js",
...@@ -8461,7 +8496,7 @@ dependencies = [ ...@@ -8461,7 +8496,7 @@ dependencies = [
"compact_str", "compact_str",
"either", "either",
"num-bigint", "num-bigint",
"phf", "phf 0.11.2",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
"seq-macro", "seq-macro",
"serde", "serde",
...@@ -8542,7 +8577,7 @@ version = "0.14.0" ...@@ -8542,7 +8577,7 @@ version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "005fabc950f92781ba0e18c7065daccc4353cf0ab94186b3b2098cb94f94083c" checksum = "005fabc950f92781ba0e18c7065daccc4353cf0ab94186b3b2098cb94f94083c"
dependencies = [ dependencies = [
"phf", "phf 0.11.2",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
...@@ -8645,7 +8680,7 @@ dependencies = [ ...@@ -8645,7 +8680,7 @@ dependencies = [
"indexmap 2.13.0", "indexmap 2.13.0",
"once_cell", "once_cell",
"par-core", "par-core",
"phf", "phf 0.11.2",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
"serde", "serde",
"swc_atoms", "swc_atoms",
...@@ -10630,7 +10665,7 @@ dependencies = [ ...@@ -10630,7 +10665,7 @@ dependencies = [
"num-traits", "num-traits",
"parking_lot", "parking_lot",
"petgraph 0.8.3", "petgraph 0.8.3",
"phf", "phf 0.11.2",
"regex", "regex",
"rstest", "rstest",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
...@@ -10738,7 +10773,7 @@ dependencies = [ ...@@ -10738,7 +10773,7 @@ dependencies = [
"bincode 2.0.1", "bincode 2.0.1",
"image", "image",
"mime", "mime",
"phf", "phf 0.11.2",
"regex", "regex",
"serde", "serde",
"turbo-bincode", "turbo-bincode",
......
...@@ -282,13 +282,13 @@ image = { version = "0.25.8", default-features = false } ...@@ -282,13 +282,13 @@ image = { version = "0.25.8", default-features = false }
indexmap = "2.13.0" indexmap = "2.13.0"
indoc = "2.0.0" indoc = "2.0.0"
itertools = "0.10.5" itertools = "0.10.5"
lightningcss = { version = "1.0.0-alpha.70", features = [ lightningcss = { version = "1.0.0-alpha.72", features = [
"serde", "serde",
"visitor", "visitor",
"into_owned", "into_owned",
"browserslist", "browserslist",
] } ] }
lightningcss-napi = { version = "0.4.6", default-features = false, features = [ lightningcss-napi = { version = "0.4.9", default-features = false, features = [
"visitor", "visitor",
] } ] }
lzzzz = "2.0.0" lzzzz = "2.0.0"
......
...@@ -3,14 +3,9 @@ use lightningcss::{ ...@@ -3,14 +3,9 @@ use lightningcss::{
traits::IntoOwned, traits::IntoOwned,
}; };
pub fn stylesheet_into_static<'i, 'o>( pub fn stylesheet_into_static<'i>(ss: &StyleSheet, options: ParserOptions<'i>) -> StyleSheet<'i> {
ss: &StyleSheet,
options: ParserOptions<'o, 'i>,
) -> StyleSheet<'i, 'o> {
let sources = ss.sources.clone(); let sources = ss.sources.clone();
let rules = ss.rules.clone().into_owned(); let rules = ss.rules.clone().into_owned();
//
StyleSheet::new(sources, rules, options) StyleSheet::new(sources, rules, options)
} }
use std::sync::{Arc, RwLock}; use std::{
borrow::Cow,
sync::{Arc, RwLock},
};
use anyhow::{Result, bail}; use anyhow::{Result, bail};
use async_trait::async_trait; use async_trait::async_trait;
...@@ -98,7 +101,7 @@ async fn get_lightningcss_browser_targets( ...@@ -98,7 +101,7 @@ async fn get_lightningcss_browser_targets(
} }
async fn stylesheet_to_css( async fn stylesheet_to_css(
ss: &StyleSheet<'_, '_>, ss: &StyleSheet<'_>,
code: &str, code: &str,
minify_type: MinifyType, minify_type: MinifyType,
enable_srcmap: bool, enable_srcmap: bool,
...@@ -158,14 +161,14 @@ pub enum ParseCssResult { ...@@ -158,14 +161,14 @@ pub enum ParseCssResult {
code: ResolvedVc<FileContent>, code: ResolvedVc<FileContent>,
#[turbo_tasks(trace_ignore)] #[turbo_tasks(trace_ignore)]
stylesheet: StyleSheet<'static, 'static>, stylesheet: StyleSheet<'static>,
references: ResolvedVc<ModuleReferences>, references: ResolvedVc<ModuleReferences>,
url_references: ResolvedVc<UnresolvedUrlReferences>, url_references: ResolvedVc<UnresolvedUrlReferences>,
#[turbo_tasks(trace_ignore)] #[turbo_tasks(trace_ignore)]
options: ParserOptions<'static, 'static>, options: ParserOptions<'static>,
}, },
Unparsable, Unparsable,
NotFound, NotFound,
...@@ -430,12 +433,12 @@ fn source_pos_for_loc(loc: &lightningcss::error::ErrorLocation, code_had_bom: bo ...@@ -430,12 +433,12 @@ fn source_pos_for_loc(loc: &lightningcss::error::ErrorLocation, code_had_bom: bo
/// ///
/// Does not handle parser warnings — the caller is responsible for configuring /// Does not handle parser warnings — the caller is responsible for configuring
/// the `warnings` field in `config` and processing collected warnings. /// the `warnings` field in `config` and processing collected warnings.
fn parse_css_stylesheet<'a, 'o>( fn parse_css_stylesheet<'a>(
code: &'a str, code: &'a str,
config: ParserOptions<'o, 'a>, config: ParserOptions<'a>,
ty: CssModuleType, ty: CssModuleType,
source: ResolvedVc<Box<dyn Source>>, source: ResolvedVc<Box<dyn Source>>,
) -> Result<StyleSheet<'a, 'o>, lightningcss::error::Error<lightningcss::error::ParserError<'a>>> { ) -> Result<StyleSheet<'a>, lightningcss::error::Error<lightningcss::error::ParserError<'a>>> {
// Lightning CSS tokenizes a leading byte-order mark as content instead of // Lightning CSS tokenizes a leading byte-order mark as content instead of
// skipping it, which misaligns the parser and rejects the first token. // skipping it, which misaligns the parser and rejects the first token.
let code = strip_bom(code); let code = strip_bom(code);
...@@ -465,7 +468,7 @@ async fn process_content( ...@@ -465,7 +468,7 @@ async fn process_content(
feature_flags: LightningCssFeatureFlags, feature_flags: LightningCssFeatureFlags,
) -> Result<Vc<ParseCssResult>> { ) -> Result<Vc<ParseCssResult>> {
#[allow(clippy::needless_lifetimes)] #[allow(clippy::needless_lifetimes)]
fn without_warnings<'o, 'i>(config: ParserOptions<'o, 'i>) -> ParserOptions<'o, 'static> { fn without_warnings<'i>(config: ParserOptions<'i>) -> ParserOptions<'static> {
ParserOptions { ParserOptions {
filename: config.filename, filename: config.filename,
css_modules: config.css_modules, css_modules: config.css_modules,
...@@ -496,9 +499,9 @@ async fn process_content( ...@@ -496,9 +499,9 @@ async fn process_content(
pattern: Pattern { pattern: Pattern {
segments: smallvec![ segments: smallvec![
Segment::Name, Segment::Name,
Segment::Literal("__"), Segment::Literal(Cow::Borrowed("__")),
Segment::Hash, Segment::Hash,
Segment::Literal("__"), Segment::Literal(Cow::Borrowed("__")),
Segment::Local, Segment::Local,
], ],
}, },
......
...@@ -38,7 +38,7 @@ pub type AnalyzedRefs = ( ...@@ -38,7 +38,7 @@ pub type AnalyzedRefs = (
/// Returns `(all_references, urls)`. /// Returns `(all_references, urls)`.
pub async fn analyze_references( pub async fn analyze_references(
stylesheet: &mut StyleSheet<'static, 'static>, stylesheet: &mut StyleSheet<'static>,
source: ResolvedVc<Box<dyn Source>>, source: ResolvedVc<Box<dyn Source>>,
origin: ResolvedVc<Box<dyn ResolveOrigin>>, origin: ResolvedVc<Box<dyn ResolveOrigin>>,
import_context: Option<ResolvedVc<ImportContext>>, import_context: Option<ResolvedVc<ImportContext>>,
......
...@@ -132,7 +132,7 @@ pub async fn resolve_url_reference( ...@@ -132,7 +132,7 @@ pub async fn resolve_url_reference(
Ok(Vc::cell(None)) Ok(Vc::cell(None))
} }
pub fn replace_url_references<'i, 'o>(ss: &mut StyleSheet<'i, 'o>, urls: &FxHashMap<RcStr, RcStr>) { pub fn replace_url_references<'i>(ss: &mut StyleSheet<'i>, urls: &FxHashMap<RcStr, RcStr>) {
let mut replacer = AssetReferenceReplacer { urls }; let mut replacer = AssetReferenceReplacer { urls };
ss.visit(&mut replacer).unwrap(); ss.visit(&mut replacer).unwrap();
} }
......
warning - [parse] /turbopack/crates/turbopack-tests/tests/snapshot/css/css-parse-error/input/style.css:13:12 Parsing CSS source code failed
9 | .after {
10 | color: green;
11 | }
12 |
+ v
13 + ::highlight(highlight-test) {
+ ^
14 | color: white;
15 | }
16 |
17 | .carousel {
'highlight' is not recognized as a valid pseudo-element. Did you mean ':highlight' (pseudo-class) or is this a typo?
Import trace:
test:
./turbopack/crates/turbopack-tests/tests/snapshot/css/css-parse-error/input/style.css
./turbopack/crates/turbopack-tests/tests/snapshot/css/css-parse-error/input/index.js
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment