v1.7.0
The headline of this release is experimental Vue 3 SFC recovery β wakaru can now reconstruct .vue-style single-file components from compiled render modules. It's backed by a big wave of correctness fixes that make the everyday decompile path safer, plus new execution-equivalence testing that verifies recovered code actually runs the same as the original.
β¨ Experimental: Vue 3 SFC recovery (--vue-sfc)
wakaru bundle.js --unpack --vue-sfc -o out/wakaru can now recover template-shaped SFC artifacts from compiled Vue 3 render code across webpack, Vite, and SystemJS outputs. It reconstructs templates, components and slots, directives (v-model, v-for, v-html, v-memo, event handlers with modifiers), conditional branches, and setup-block bindings β and there's a live Vue SFC preview in the playground now too.
This is experimental and there are still gaps, but it already handles a wide range of real-world compiler output.
π New recovery
- Nullish assignment (
??=) recovery. - Expanded AMD and repro-edge recovery.
π‘οΈ Correctness & semantics
A large set of fixes to guarantee decompiled output preserves the original program's behavior:
constvsletβ no longer emitsconstfor bindings that are later reassigned (avoids runtimeTypeErrors): mutated IIFE args/loop targets, wrapped binding writes, and mutable destructuring are all preserved as mutable.- Object rest & destructuring β correct recovery of computed object-rest keys, computed parameter destructuring, and adjacent-pick requirements; preserves rest semantics.
- IIFE & eval β preserves IIFE and method shapes around
evaland duplicate parameters; tighter arrow eval scope guards. - esbuild / TS helpers β tightened mangled spread matching, gated object-alias detection, and cleanup of consumed TS helpers.
- DCE safety β preserves TDZ reads, deferred lexical reads, observable no-op reads, and import-link checks during transform-only DCE.
- Misc β signed numeric
switchcases.
π§ͺ Testing & CI
- Execution-equivalence checks added to the reproduction matrices (template, enum, and array matrices) β recovered code is now verified to run equivalently, not just look right.
- Hardened Test262 correctness harness: baseline identity preflight, metadata semantics, candidate freshness, and decompile-timeout failures.
Full changelog: v1.6.0...v1.7.0