swc/crates
Levi 88a2186ba4
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
feat(es/minifier): Support unary negate in cast_to_number (#9642)
**Description:**

Adds support for `-` in `cast_to_number`. Before it only worked if `arg` is `Infinity`. Now it uses a recursive call on `arg` so it works for expressions like `-5`, `-[]` etc.

This change is important because negative number literals (e.g. `-5`) are a `UnaryExpr` with `op`=`-` & `arg`=`5`, unless you apply `expr_simplifier` pass or something else that uses it.
2024-10-15 08:00:39 +09:00
..
ast_node
better_scoped_tls
binding_macros
dbg-swc
from_variant
jsdoc
preset_env_base
string_enum
swc fix(es/minifier): Check type of assignment target before merging assignments (#9617) 2024-10-14 09:55:53 +09:00
swc_allocator
swc_atoms
swc_bundler
swc_cached
swc_cli_impl
swc_common
swc_compiler_base
swc_config
swc_config_macro
swc_core
swc_css
swc_css_ast
swc_css_codegen
swc_css_codegen_macros
swc_css_compat
swc_css_lints
swc_css_minifier
swc_css_modules
swc_css_parser
swc_css_prefixer
swc_css_utils
swc_css_visit
swc_ecma_ast
swc_ecma_codegen
swc_ecma_codegen_macros
swc_ecma_compat_bugfixes
swc_ecma_compat_common
swc_ecma_compat_es3
swc_ecma_compat_es2015
swc_ecma_compat_es2016
swc_ecma_compat_es2017
swc_ecma_compat_es2018
swc_ecma_compat_es2019
swc_ecma_compat_es2020
swc_ecma_compat_es2021
swc_ecma_compat_es2022
swc_ecma_ext_transforms
swc_ecma_lints
swc_ecma_loader
swc_ecma_minifier fix(es/minifier): Check type of assignment target before merging assignments (#9617) 2024-10-14 09:55:53 +09:00
swc_ecma_parser
swc_ecma_preset_env
swc_ecma_quote
swc_ecma_quote_macros
swc_ecma_testing
swc_ecma_transforms
swc_ecma_transforms_base
swc_ecma_transforms_classes
swc_ecma_transforms_compat
swc_ecma_transforms_macros
swc_ecma_transforms_module
swc_ecma_transforms_optimization
swc_ecma_transforms_proposal
swc_ecma_transforms_react
swc_ecma_transforms_testing
swc_ecma_transforms_typescript
swc_ecma_usage_analyzer fix(es/minifier): Check type of assignment target before merging assignments (#9617) 2024-10-14 09:55:53 +09:00
swc_ecma_utils feat(es/minifier): Support unary negate in cast_to_number (#9642) 2024-10-15 08:00:39 +09:00
swc_ecma_visit
swc_ecmascript
swc_eq_ignore_macros
swc_error_reporters
swc_estree_ast
swc_estree_compat
swc_fast_graph
swc_fast_ts_strip
swc_graph_analyzer
swc_html
swc_html_ast
swc_html_codegen
swc_html_codegen_macros
swc_html_minifier
swc_html_parser
swc_html_utils
swc_html_visit
swc_macros_common
swc_malloc
swc_node_bundler
swc_node_comments
swc_nodejs_common
swc_plugin
swc_plugin_macro
swc_plugin_proxy
swc_plugin_runner
swc_plugin_testing
swc_timer
swc_trace_macro
swc_transform_common
swc_typescript
swc_visit
swc_x_optimizer
swc_xml
swc_xml_ast
swc_xml_codegen
swc_xml_codegen_macros
swc_xml_parser
swc_xml_visit
testing
testing_macros