CodeVetter · Repo Unpack · Contributor handoff
swc-project/swc
Begin with the public API and the smallest corresponding binding/compiler/configuration files, then follow the exact input and output branches. Preserve pass ordering, source-context ownership, generated artifacts, and feature-dependent behavior. Tests and CI were inspected, not executed, and this brief provides bounded onboarding evidence rather than a whole-repository audit. The commands below describe repository verification expectations for separately authorized implementation work.
- For Node compiler changes, read index.ts, the relevant native operation module, Compiler::process_js_with_custom_pass, and Options/config construction together; raw text, raw AST, and context-bearing AST inputs take different paths.
- Root conventions prefer documented English code, typed enums, small files, structured tracing, and borrowed strings when creating Atoms; inspect local source conventions before changing a pass or binding.
- Generated Rust visitors must be changed through code generation; cargo codegen is a configured alias, and helper generation supports --check against packages/helpers/esm and generated Rust helpers.
- Use existing fixture suites: swc and swc_ecma_parser document their roots and UPDATE=1 commands, followed by the same crate tests without UPDATE; root instructions prohibit removing or modifying existing tests when fixing them.
- Tests and CI here were inspected, not executed; authorized implementation verification normally initializes submodules, runs touched-crate cargo tests, cargo fmt/clippy, and core build:dev plus pnpm test when Node integration changes.
- Resolve toolchain drift before running checks: README states MSRV 1.73, agent rules prohibit nightly-only production features, .cargo/config.toml contains -Zshare-generics, and parser conformance tests use unstable libtest.
- For carrier changes, preserve final stripped raw bytes, target allowlisting, private payload/integrity sections, and verification before loading; documented checks include native Node contracts and cargo tests for swc_native_addon, its packer, and binding_native_addon.
- Check runtime parity explicitly: native defaults enable swc_v1/plugins, @swc/wasm async interfaces do not perform actual async work, WASM plugin transforms may be skipped, and CLI watch requires an output file or directory.