@swc/plugin-styled-jsx 1.5.2 → 1.5.5

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.3.0"
7
+ version = "0.5.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.29.10", features = [
20
+ swc_core = { version = "0.32.8", features = [
21
21
  "common",
22
22
  "css_ast",
23
23
  "css_codegen",
@@ -32,6 +32,6 @@ swc_core = { version = "0.29.10", features = [
32
32
 
33
33
  [dev-dependencies]
34
34
  testing = "0.31.5"
35
- swc_core = { features = [
35
+ swc_core = { features = [
36
36
  "testing_transform"
37
- ], version = "0.29.10" }
37
+ ], version = "0.32.8" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/plugin-styled-jsx",
3
- "version": "1.5.2",
3
+ "version": "1.5.5",
4
4
  "description": "SWC plugin for styled-jsx",
5
5
  "main": "swc_plugin_styled_jsx.wasm",
6
6
  "scripts": {
Binary file
@@ -1,5 +1,5 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
- function NavigationItem({ active , className , }) {
2
+ function NavigationItem({ active , className }) {
3
3
  return <span className={"jsx-2342aae4628612c6" + " " + (cn({
4
4
  active
5
5
  }, className, 'navigation-item') || "")}>
@@ -1,5 +1,5 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
- export const Red = ({ Component ='button' , })=>{
2
+ export const Red = ({ Component ='button' })=>{
3
3
  return <Component className={_JSXStyle.dynamic([
4
4
  [
5
5
  "1a9f9e2fa701f7ec",
package/tests/fixture.rs CHANGED
@@ -6,7 +6,7 @@ use swc_core::{
6
6
  parser::{EsConfig, Syntax},
7
7
  transforms::{
8
8
  base::resolver,
9
- testing::{test_fixture, test_fixture_allowing_error},
9
+ testing::{test_fixture, FixtureTestConfig},
10
10
  },
11
11
  },
12
12
  };
@@ -36,6 +36,7 @@ fn styled_jsx_fixture(input: PathBuf) {
36
36
  },
37
37
  &input,
38
38
  &output,
39
+ Default::default(),
39
40
  );
40
41
 
41
42
  test_fixture(
@@ -60,6 +61,7 @@ fn styled_jsx_fixture(input: PathBuf) {
60
61
  },
61
62
  &input,
62
63
  &output,
64
+ Default::default(),
63
65
  );
64
66
  }
65
67
 
@@ -78,10 +80,14 @@ fn styled_jsx_errors(input: PathBuf) {
78
80
  false => FileName::Real(PathBuf::from("/some-project/src/some-file.js")),
79
81
  };
80
82
 
81
- test_fixture_allowing_error(
83
+ test_fixture(
82
84
  syntax(),
83
85
  &|t| styled_jsx(t.cm.clone(), file_name.clone()),
84
86
  &input,
85
87
  &output,
88
+ FixtureTestConfig {
89
+ allow_error: true,
90
+ ..Default::default()
91
+ },
86
92
  );
87
93
  }