Skip to content

transformer: untangle @oxc-project/runtime version from the transformer version #20278

@sapphi-red

Description

@sapphi-red

Currently @oxc-project/runtime's version is synced with the transformer's version. This has some downsides:

  1. the user need to sync the version of @oxc-project/runtime and oxc-transform
  2. the runtime helper is bundled multiple times when a user uses multiple libraries that used different versions of oxc to transform the code

By untangling these (i.e. having a separate version for @oxc-project/runtime), we can solve these downsides.

  1. @oxc-project/runtime version will not be bumped frequently so it'd be easier to bump oxc-transform version (and Rolldown / tsdown version)
  2. Since @oxc-project/runtime 1.1.x will be compatible with 1.0.x, a single 1.1.x can be bundled inside of multilpe versions.

That said, there's one problem with doing this. Bumping the required @oxc-project/runtime version in oxc-transform is technically a breaking change. I guess that is fine as that's the way tslib (TypeScript) handles. Babel handles this by inlining the missing newer helper functions if the installed helper package does not have them.

refs oxc-project/website#986

Metadata

Metadata

Assignees

Labels

A-transformerArea - Transformer / Transpiler

Priority

None yet

Start date

None yet

Target date

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions