github Anber/wyw-in-js @wyw-in-js/processor-utils@2.0.0-alpha.0

Major Changes

  • bd2a46a: WyW-in-JS packages are now ESM-only and require Node.js >= 22.0.0.

    Breaking changes in v2:

    • CJS require() package entrypoints were removed; migrate configs/tooling to ESM (import() / .mjs).
    • Eval moved to the async ESM runner-based pipeline (vm.SourceTextModule + broker RPC), which is now the default path in v2.
    • Eval IPC and Babel preset config handling are stricter:
      • unsupported values in __wywPreval now fail explicitly instead of being silently coerced through JSON
      • function-valued preset/plugin options are supported when loaded from config files, while inline non-serializable options now error with migration guidance
      • eval.globals encoding and invalidation are more predictable and reject unsupported values earlier
    • require() inside eval now follows fallback semantics controlled by eval.require (warn-and-run / error / off).

    This release also updates the published bundler integrations, adapter coverage,
    and migration/docs around the v2 evaluator contract, and includes cache and
    warm-runner reuse fixes to keep the new evaluator on the expected performance
    path.

    Migration guide: https://wyw-in-js.dev/migration/v2

  • d553b68: Complete the v2 Oxc migration across the core transform and evaluator pipeline.

    This cutover moves the runtime transform path to the Oxc-backed implementation, including module analysis, preeval rewrites, dangerous-code removal, processor application, template dependency extraction, shaker, collect, emit, and the async ESM evaluator flow.

    The public configuration contract is now Oxc-first, with oxcOptions, EvalRule.oxcOptions, and the hybrid resolver mode available across the updated packages. Processor integrations now rely on the engine-neutral AstService surface, and the migration includes cache, concurrency, and hot-path performance fixes needed to keep downstream behavior stable after the cutover. @wyw-in-js/babel-preset stays available only as a deprecated compatibility wrapper around the Oxc pipeline.

Minor Changes

  • 69004e7: Add a supported processor diagnostics seam that lets library-owned processors emit structured non-fatal warnings through WyW.

    This adds:

    • BaseProcessor.addDiagnostic() and typed diagnostics helpers in @wyw-in-js/processor-utils
    • normalized diagnostics output from @wyw-in-js/transform
    • diagnostics reporting in @wyw-in-js/vite and @wyw-in-js/cli

    Existing hard failures and metadata sidecar behavior stay intact.

Patch Changes

  • Updated dependencies
    • @wyw-in-js/shared@2.0.0-alpha.0

Don't miss a new wyw-in-js release

NewReleases is sending notifications on new releases.