Skip to content

Commit

Permalink
Merge branch 'main' into fork
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisl9029 committed May 29, 2023
2 parents 6dac31f + 81a413b commit 7632bf8
Show file tree
Hide file tree
Showing 22 changed files with 807 additions and 647 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,26 @@



- **(css/modules)** Don't drop the correct selector (#7450) ([d370324](https://github.com/swc-project/swc/commit/d370324cfd251af49853fe887644fcaa8d811431))


- **(es/parser)** Fix parsing of generic jsx element name (#7449) ([77850dd](https://github.com/swc-project/swc/commit/77850dd8f01f51af1e9dda3eabddd07b7e39c841))


- **(plugin/runner)** Disable `wasi_env` cleanup (#7458) ([1868d36](https://github.com/swc-project/swc/commit/1868d36cfed54e48c3439ec4547251e45731c93a))

### Features



- **(es/minifier)** Inline for loop variables (#7445) ([0cd2b61](https://github.com/swc-project/swc/commit/0cd2b61b054031f1a49cae25a82925d52dff0a73))

### Miscellaneous Tasks



- **(es/preset-env)** Update data (#7459) ([e15adaf](https://github.com/swc-project/swc/commit/e15adaf6eaada62b6a3c1b8447fb39612dee7946))

## [1.3.60] - 2023-05-25

### Bug Fixes
Expand Down
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/binding_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
license = "Apache-2.0"
name = "binding_macros"
repository = "https://github.com/swc-project/swc.git"
version = "0.50.27"
version = "0.50.29"

[lib]
bench = false
Expand Down Expand Up @@ -33,7 +33,7 @@ binding_wasm = [

[dependencies]
# Common deps for the SWC imports
swc = { optional = true, version = "0.261.27", path = "../swc" }
swc = { optional = true, version = "0.261.29", path = "../swc" }
swc_common = { optional = true, version = "0.31.11", path = "../swc_common" }
swc_ecma_ast = { optional = true, version = "0.104.4", path = "../swc_ecma_ast" }
swc_ecma_transforms = { optional = true, version = "0.218.18", path = "../swc_ecma_transforms" }
Expand Down
6 changes: 3 additions & 3 deletions crates/swc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include = ["Cargo.toml", "src/**/*.rs"]
license = "Apache-2.0"
name = "swc"
repository = "https://github.com/swc-project/swc.git"
version = "0.261.27"
version = "0.261.29"

[lib]
bench = false
Expand Down Expand Up @@ -85,7 +85,7 @@ swc_ecma_loader = { version = "0.43.13", path = "../swc_ecma_loader", features =
] }
swc_ecma_minifier = { version = "0.181.21", path = "../swc_ecma_minifier" }
swc_ecma_parser = { version = "0.134.11", path = "../swc_ecma_parser" }
swc_ecma_preset_env = { version = "0.195.19", path = "../swc_ecma_preset_env" }
swc_ecma_preset_env = { version = "0.195.20", path = "../swc_ecma_preset_env" }
swc_ecma_transforms = { version = "0.218.18", path = "../swc_ecma_transforms", features = [
"compat",
"module",
Expand All @@ -102,7 +102,7 @@ swc_ecma_visit = { version = "0.90.4", path = "../swc_ecma_visit" }
swc_error_reporters = { version = "0.15.11", path = "../swc_error_reporters" }
swc_node_comments = { version = "0.18.11", path = "../swc_node_comments" }
swc_plugin_proxy = { version = "0.33.4", path = "../swc_plugin_proxy", optional = true }
swc_plugin_runner = { version = "0.95.14", path = "../swc_plugin_runner", optional = true, default-features = false }
swc_plugin_runner = { version = "0.95.15", path = "../swc_plugin_runner", optional = true, default-features = false }
swc_timer = { version = "0.19.12", path = "../swc_timer" }
swc_visit = { version = "0.5.6", path = "../swc_visit" }

Expand Down
14 changes: 7 additions & 7 deletions crates/swc_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
license = "Apache-2.0"
name = "swc_core"
repository = "https://github.com/swc-project/swc.git"
version = "0.76.32"
version = "0.76.35"
[package.metadata.docs.rs]
features = [
"common_perf",
Expand Down Expand Up @@ -322,8 +322,8 @@ __visit = ["__ecma", "swc_ecma_visit"]
once_cell = { optional = true, version = "1.13.0" }

# swc_* dependencies
binding_macros = { optional = true, version = "0.50.27", path = "../binding_macros" }
swc = { optional = true, version = "0.261.27", path = "../swc" }
binding_macros = { optional = true, version = "0.50.29", path = "../binding_macros" }
swc = { optional = true, version = "0.261.29", path = "../swc" }
swc_atoms = { optional = true, version = "0.5.6", path = "../swc_atoms" }
swc_bundler = { optional = true, version = "0.214.21", path = "../swc_bundler" }
swc_cached = { optional = true, version = "0.3.15", path = "../swc_cached" }
Expand All @@ -332,7 +332,7 @@ swc_css_ast = { optional = true, version = "0.137.11", path
swc_css_codegen = { optional = true, version = "0.147.12", path = "../swc_css_codegen" }
swc_css_compat = { optional = true, version = "0.23.12", path = "../swc_css_compat" }
swc_css_minifier = { optional = true, version = "0.112.12", path = "../swc_css_minifier" }
swc_css_modules = { optional = true, version = "0.25.12", path = "../swc_css_modules" }
swc_css_modules = { optional = true, version = "0.25.13", path = "../swc_css_modules" }
swc_css_parser = { optional = true, version = "0.146.12", path = "../swc_css_parser" }
swc_css_prefixer = { optional = true, version = "0.149.13", path = "../swc_css_prefixer" }
swc_css_utils = { optional = true, version = "0.134.11", path = "../swc_css_utils/" }
Expand All @@ -342,7 +342,7 @@ swc_ecma_codegen = { optional = true, version = "0.139.13", path
swc_ecma_loader = { optional = true, version = "0.43.13", path = "../swc_ecma_loader" }
swc_ecma_minifier = { optional = true, version = "0.181.21", path = "../swc_ecma_minifier" }
swc_ecma_parser = { optional = true, version = "0.134.11", path = "../swc_ecma_parser" }
swc_ecma_preset_env = { optional = true, version = "0.195.19", path = "../swc_ecma_preset_env" }
swc_ecma_preset_env = { optional = true, version = "0.195.20", path = "../swc_ecma_preset_env" }
swc_ecma_quote_macros = { optional = true, version = "0.45.11", path = "../swc_ecma_quote_macros" }
swc_ecma_transforms_base = { optional = true, version = "0.127.14", path = "../swc_ecma_transforms_base" }
swc_ecma_transforms_compat = { optional = true, version = "0.153.16", path = "../swc_ecma_transforms_compat" }
Expand All @@ -356,15 +356,15 @@ swc_ecma_usage_analyzer = { optional = true, version = "0.13.14", path
swc_ecma_utils = { optional = true, version = "0.117.12", path = "../swc_ecma_utils" }
swc_ecma_visit = { optional = true, version = "0.90.4", path = "../swc_ecma_visit" }
swc_node_base = { optional = true, version = "0.5.8", path = "../swc_node_base" }
swc_node_bundler = { optional = true, version = "0.48.27", path = "../swc_node_bundler" }
swc_node_bundler = { optional = true, version = "0.48.29", path = "../swc_node_bundler" }
swc_nodejs_common = { optional = true, version = "0.0.6", path = "../swc_nodejs_common" }
swc_plugin = { optional = true, version = "0.90.0", path = "../swc_plugin" }
swc_plugin_macro = { optional = true, version = "0.9.13", path = "../swc_plugin_macro" }
swc_plugin_proxy = { optional = true, version = "0.33.4", path = "../swc_plugin_proxy" }
swc_trace_macro = { optional = true, version = "0.1.2", path = "../swc_trace_macro" }
testing = { optional = true, version = "0.33.12", path = "../testing" }
# TODO: eventually swc_plugin_runner needs to remove default features
swc_plugin_runner = { optional = true, version = "0.95.14", path = "../swc_plugin_runner", default-features = false }
swc_plugin_runner = { optional = true, version = "0.95.15", path = "../swc_plugin_runner", default-features = false }

[build-dependencies]
vergen = { version = "7.3.2", default-features = false, features = ["cargo"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/swc_css/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
license = "Apache-2.0"
name = "swc_css"
repository = "https://github.com/swc-project/swc.git"
version = "0.153.13"
version = "0.153.14"

[package.metadata.docs.rs]
all-features = true
Expand All @@ -26,7 +26,7 @@ swc_css_ast = { version = "0.137.11", path = "../swc_css_ast" }
swc_css_codegen = { version = "0.147.12", path = "../swc_css_codegen" }
swc_css_compat = { version = "0.23.12", path = "../swc_css_compat", optional = true }
swc_css_minifier = { version = "0.112.12", path = "../swc_css_minifier", optional = true }
swc_css_modules = { version = "0.25.12", path = "../swc_css_modules", optional = true }
swc_css_modules = { version = "0.25.13", path = "../swc_css_modules", optional = true }
swc_css_parser = { version = "0.146.12", path = "../swc_css_parser" }
swc_css_prefixer = { version = "0.149.13", path = "../swc_css_prefixer", optional = true }
swc_css_utils = { version = "0.134.11", path = "../swc_css_utils/" }
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_css_modules/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"]
license = "Apache-2.0"
name = "swc_css_modules"
repository = "https://github.com/swc-project/swc.git"
version = "0.25.12"
version = "0.25.13"

[lib]
bench = false
Expand Down
21 changes: 9 additions & 12 deletions crates/swc_css_modules/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,7 @@ where
complex_selector.children.clone();
prepend_left_subclass_selectors(
&mut complex_selector_children,
selector
.subclass_selectors
.split_at(sel_index)
.0
.to_vec(),
selector.subclass_selectors.split_at(sel_index),
);
new_children.extend(complex_selector_children);

Expand All @@ -529,11 +525,7 @@ where
complex_selector.children.clone();
prepend_left_subclass_selectors(
&mut complex_selector_children,
selector
.subclass_selectors
.split_at(sel_index)
.0
.to_vec(),
selector.subclass_selectors.split_at(sel_index),
);
new_children.extend(complex_selector_children);
}
Expand Down Expand Up @@ -651,11 +643,16 @@ fn process_local<C>(

fn prepend_left_subclass_selectors(
complex_selector_children: &mut [ComplexSelectorChildren],
left_sels: Vec<SubclassSelector>,
sels: (&[SubclassSelector], &[SubclassSelector]),
) {
if let Some(ComplexSelectorChildren::CompoundSelector(first)) =
complex_selector_children.get_mut(0)
{
first.subclass_selectors = [left_sels, first.subclass_selectors.take()].concat();
first.subclass_selectors = [
sels.0.to_vec(),
first.subclass_selectors.take(),
sels.1[1..].to_vec(),
]
.concat();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.a:hover {
color: blue;
}
.__local__a.b {
color: red;
}
7 changes: 7 additions & 0 deletions crates/swc_css_modules/tests/fixture/issues/issuse-7447.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:global(.a):hover {
color: blue;
}

:local(.a).b{
color: red;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"a": [
{
"type": "local",
"name": "__local__a"
}
]
}
2 changes: 1 addition & 1 deletion crates/swc_ecma_preset_env/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"]
license = "Apache-2.0"
name = "swc_ecma_preset_env"
version = "0.195.19"
version = "0.195.20"

[lib]
bench = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@
"electron": "1.2"
},
"transform-block-scoping": {
"chrome": "49",
"opera": "36",
"chrome": "50",
"opera": "37",
"edge": "14",
"firefox": "51",
"firefox": "53",
"safari": "10",
"node": "6",
"deno": "1",
"ios": "10",
"samsung": "5",
"electron": "0.37"
"electron": "1.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"transform-unicode-sets-regex": {
"chrome": "112",
"opera": "98",
"edge": "112"
},
"transform-class-static-block": {
"chrome": "94",
"opera": "80",
Expand Down Expand Up @@ -566,16 +571,16 @@
"electron": "1.2"
},
"transform-block-scoping": {
"chrome": "49",
"opera": "36",
"chrome": "50",
"opera": "37",
"edge": "14",
"firefox": "51",
"firefox": "53",
"safari": "11",
"node": "6",
"deno": "1",
"ios": "11",
"samsung": "5",
"electron": "0.37"
"electron": "1.1"
},
"transform-typeof-symbol": {
"chrome": "38",
Expand Down
Loading

0 comments on commit 7632bf8

Please sign in to comment.