Skip to content

chore: upgrade oxc packages and align wasm runtime setup. - #109

Merged
knightedcodemonkey merged 10 commits into
mainfrom
bananas
Nov 1, 2026
Merged

knightedcodemonkey merged 10 commits into
mainfrom
bananas

Conversation

@knightedcodemonkey

Copy link
Copy Markdown
Owner

Add a plan for addressing CDN drift with transitive deps. Publish a v2 alpha for development of the cdn drift plan.

Copilot AI balanced review requested due to automatic review settings October 31, 2026 17:32
@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.52632% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.82%. Comparing base (1ddad5c) to head (34b6002).

Files with missing lines Patch % Lines
src/cli/wasm-runtime-policy.ts 88.33% 2 Missing and 5 partials ⚠️
src/cli/init.ts 75.00% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #109      +/-   ##
==========================================
- Coverage   89.14%   88.82%   -0.33%     
==========================================
  Files          27       28       +1     
  Lines        2248     2272      +24     
  Branches      637      648      +11     
==========================================
+ Hits         2004     2018      +14     
- Misses         71       74       +3     
- Partials      173      180       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The publish workflow can release the alpha under latest, while dependency handling can overwrite host versions, discard the binding’s required dependencies, and leave saved versions unpinned.

4 open issues
What changed in this PR

Prepares @knighted/jsx for a v2 alpha by upgrading OXC and aligning WASM setup, while documenting a separate plan to prevent CDN dependency drift.

Changes:

  • Upgrades OXC to 0.156.0 and migrates binding references to wasm32-wasip1.
  • Adds runtime version checks, dependency pins, and updated tests and fixtures.
  • Sets version 2.0.0-alpha.0 and documents proposed CDN stability APIs without implementing them.
File Description
vite.config.ts Updates the WASM dependency exclusion.
tsup.config.ts Updates the external WASM binding name.
test/​loader.e2e.test.ts Updates the binding stub alias.
test/​fixtures/​next-app/​next.config.mjs Updates the Next.js binding alias.
test/​fixtures/​e2e.html Updates CDN versions and runtime URL mappings.
test/​cli-init.test.ts Tests runtime version detection and replacement.
test/​cdn-stable.test.ts Updates binding names and dependency-pin expectations.
src/​loader/​README.md Revises WASM installation guidance.
src/​cli/​init.ts Pins runtime versions and checks installed package metadata.
scripts/​setup-wasm.mjs Vendors the renamed OXC binding.
scripts/​generate-cdn-contract.mjs Adds EMNAPI versions and updates binding identifiers.
scripts/​build-rspack-fixture.mjs Updates the binding path and stub alias.
README.md Documents the upgraded binding and runtime installation.
package.json Sets the alpha version and upgrades dependencies.
package-lock.json Records the updated dependency graph.
docs/​runtime-helpers-overview.md Expands CDN pinning guidance to include EMNAPI.
docs/​cli.md Documents version-aware setup and renamed WASM assets.
docs/​cdn-stability-plan.md Proposes frozen browser dependencies, APIs, and release verification.

Review effort: Balanced

Comment thread package.json Resolved
Comment thread scripts/setup-wasm.mjs Resolved
Comment thread src/cli/init.ts Resolved
Comment thread src/cli/init.ts Resolved
Copilot AI balanced review requested due to automatic review settings October 31, 2026 20:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The WASM binding resolves beta dependencies instead of its declared alpha versions, and initialization can overwrite existing project dependencies.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity WASM dependency setup overwrites existing project dependencies

src/​cli/​init.ts:328

When a project already directly depends on @emnapi/core or @emnapi/runtime 1.x, these commands overwrite that dependency with 2.0.0-beta.2 in the project's manifest. That can break the project's existing consumers or fail peer-dependency resolution before the binding is installed. Keep the WASM runtime dependencies isolated from existing project dependencies instead of upgrading unrelated direct dependencies in place.

3 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 31, 2026 22:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical dependency-policy gaps can leave the WASM binding incompatible in workspaces, with non-exact version requests, or during fixture setup, and clean browser builds lack the transform binding.

7 open issues
1 resolved since last review

Review effort: Balanced

Comment thread package.json Resolved
Comment thread scripts/setup-wasm.mjs Resolved
Comment thread src/cli/init.ts Resolved
Comment thread src/cli/init.ts Resolved
Comment thread src/cli/init.ts Resolved
Comment thread src/cli/init.ts Resolved
Comment thread test/fixtures/e2e.html Resolved
Copilot AI balanced review requested due to automatic review settings October 31, 2026 22:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/cli/init.ts Resolved
Copilot AI balanced review requested due to automatic review settings October 31, 2026 23:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed to evaluate dependency compatibility and the risk of partial policy changes during setup failures.

4 open issues
1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 1, 2026 00:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

On a clean checkout, packing skips generation of the gitignored CDN contract, causing the end-to-end test to fail before the consumer build runs.

1 open issue
4 resolved since last review

Review effort: Balanced

Comment thread playwright/esm-demo.spec.ts Resolved
Copilot AI balanced review requested due to automatic review settings November 1, 2026 00:12
@knightedcodemonkey
knightedcodemonkey merged commit f8ac733 into main Nov 1, 2026
10 checks passed
@knightedcodemonkey
knightedcodemonkey deleted the bananas branch November 1, 2026 00:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The installer’s behavior across package managers, lockfiles, dependency aliases, and Plug’n’Play configurations warrants human assessment.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants