@swc/plugin-styled-jsx 1.5.6 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Cargo.toml CHANGED
@@ -4,7 +4,7 @@ description = "SWC plugin for styled-jsx"
4
4
  edition = "2021"
5
5
  license = "Apache-2.0"
6
6
  name = "swc_plugin_styled_jsx"
7
- version = "0.6.0"
7
+ version = "0.7.0"
8
8
 
9
9
  [lib]
10
10
  crate-type = ["cdylib", "rlib"]
@@ -17,7 +17,7 @@ custom_transform = ["swc_core/common_concurrent"]
17
17
  easy-error = "1.0.0"
18
18
  tracing = "0.1.32"
19
19
 
20
- swc_core = { version = "0.34.1", features = [
20
+ swc_core = { version = "0.38.1", features = [
21
21
  "common",
22
22
  "ecma_ast",
23
23
  "css_ast",
@@ -32,7 +32,7 @@ swc_core = { version = "0.34.1", features = [
32
32
  ] }
33
33
 
34
34
  [dev-dependencies]
35
- testing = "0.31.5"
35
+ testing = "0.31.8"
36
36
  swc_core = { features = [
37
37
  "testing_transform"
38
- ], version = "0.34.1" }
38
+ ], version = "0.38.1" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/plugin-styled-jsx",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "description": "SWC plugin for styled-jsx",
5
5
  "main": "swc_plugin_styled_jsx.wasm",
6
6
  "scripts": {
@@ -12,7 +12,10 @@ use swc_core::{
12
12
  writer::basic::{BasicCssWriter, BasicCssWriterConfig},
13
13
  CodeGenerator, CodegenConfig, Emit,
14
14
  },
15
- parser::{parse_str, parse_tokens, parser::ParserConfig},
15
+ parser::{
16
+ parse_str, parse_tokens,
17
+ parser::{input::Tokens, ParserConfig},
18
+ },
16
19
  prefixer::prefixer,
17
20
  visit::{VisitMut, VisitMutWith},
18
21
  },
@@ -42,6 +45,7 @@ pub fn transform_css(
42
45
  style_info.css_span.hi,
43
46
  ParserConfig {
44
47
  allow_wrong_line_comments: true,
48
+ ..Default::default()
45
49
  },
46
50
  // We ignore errors because we inject placeholders for expressions which is
47
51
  // not a valid css.
@@ -234,6 +238,7 @@ impl Namespacer {
234
238
  PseudoClassSelectorChildren::ForgivingRelativeSelectorList(v) => {
235
239
  to_tokens(v).tokens
236
240
  }
241
+ PseudoClassSelectorChildren::ComplexSelector(v) => to_tokens(v).tokens,
237
242
  })
238
243
  .collect::<Vec<_>>();
239
244
 
@@ -286,6 +291,7 @@ impl Namespacer {
286
291
  &args,
287
292
  ParserConfig {
288
293
  allow_wrong_line_comments: true,
294
+ ..Default::default()
289
295
  },
290
296
  // TODO(kdy1): We might be able to report syntax errors.
291
297
  &mut vec![],
@@ -523,6 +529,7 @@ where
523
529
  StringInput::new(&s, span.lo, span.hi),
524
530
  ParserConfig {
525
531
  allow_wrong_line_comments: true,
532
+ ..Default::default()
526
533
  },
527
534
  );
528
535
 
Binary file