test: expand swc_es_parser snapshot suites (ecma-style) (#11621)
- Expand
swc_es_parserfixture tests to ECMA-style split suites (js/jsx/typescript/errors/comments/span/test262) without adding a runtime dependency onswc_ecma_parser.- Replace legacy
.es-debugsnapshots with JSON snapshots and keep stderr/comment/span snapshots for error-oriented suites.- Add test262 pass/fail coverage with pass-vs-pass-explicit canonical equivalence checks.
- Remove old aggregate snapshot entry tests (
snapshot_core,snapshot_tsc,comments_snapshot,span_snapshot) to avoid duplicate execution.Verification
git submodule update --init --recursiveUPDATE=1 cargo test -p swc_es_parser --test js --test jsx --test typescript --test errors --test comments --test span --test test262cargo test -p swc_es_parsercargo test -p swc_es_parser --test no_ecma_dependencycargo fmt --allcargo clippy --all --all-targets -- -D warnings
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
Make the web (development) faster.
SWC (stands for
Speedy Web Compiler) is a super-fast TypeScript / JavaScript compiler written in Rust. It’s a library for Rust and JavaScript at the same time. If you are using SWC from Rust, see rustdoc and for most users, your entry point for using the library will be parser.Also, SWC tries to ensure that
for rust users.
MSRV of crates is currently
1.73.To update all SWC crates you use, you can run
curl https://raw.githubusercontent.com/swc-project/swc/main/scripts/update-all-swc-crates.sh | bash -s. This script will update all dependencies to the latest version and runcargo buildto ensure that everything works. Note that you needjqcargo upgradecommand to run the script.
Supported Node Versions:
If you are using SWC from JavaScript, please refer to docs on the website.
Documentation
Check out the documentation in the website.
Features
Please see comparison with babel.
Performance
Please see benchmark results on the website.
Supporting development
Supporting swc
Star History
Powered by
Sponsors
SWC is a community-driven project, and is maintained by a group of volunteers. If you’d like to help support the future of the project, please consider:
Contributing
See CONTRIBUTING.md. You may also find the architecture documentation useful (ARCHITECTURE.md).
License
SWC is primarily distributed under the terms of the Apache License (Version 2.0).
See LICENSE for details.