Skip to content

chore(monorepo): break out platform-specific code - #9029

Open
avivkeller wants to merge 8 commits into
mainfrom
refactor/platform-packages
Open

chore(monorepo): break out platform-specific code#9029
avivkeller wants to merge 8 commits into
mainfrom
refactor/platform-packages

Conversation

@avivkeller

@avivkeller avivkeller commented Jul 28, 2026

Copy link
Copy Markdown
Member

Vercel is failing due to the vercel.json being moved. Refer to the OpenNext CI successes.

Copilot AI review requested due to automatic review settings July 28, 2026 19:34
@avivkeller
avivkeller requested review from a team as code owners July 28, 2026 19:34
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nodejs-org Skipped Skipped Jul 29, 2026 1:07am

Request Review

@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

PR Summary

High Risk
This refactor changes how every production target builds and resolves platform code; Vercel already regressed from moving vercel.json, and Cloudflare/CI paths now depend on the new packages and Node import conditions.

Overview
Splits Vercel, Cloudflare, and default/self-hosted deployment concerns out of apps/site into new workspace packages (@node-core/platform-vercel, @node-core/platform-cloudflare, @node-core/platform-default) under platforms/, with pnpm-workspace and CODEOWNERS updated accordingly.

The site app now resolves shared hooks through #platform/* conditional imports (cloudflare / vercel / default) for analytics, instrumentation, Next config fragments, Shiki/Twoslash options, and Playwright web-server settings. Layout and MDX wiring consume those abstractions instead of inline Vercel components or OPEN_NEXT_CLOUDFLARE branching.

Cloudflare OpenNext build, Wrangler config, worker entrypoint (Sentry), image loader, and Twoslash VFS generation move into @node-core/platform-cloudflare; CI deploy and Playwright workflows call turbo build --filter=@node-core/platform-cloudflare and pnpm --filter=@node-core/platform-cloudflare for build/deploy/e2e. Vercel install/build settings move to platforms/vercel/vercel.json with NODE_OPTIONS=--conditions=vercel and a filtered install; preview BASE_URL behavior is applied via the Vercel platform Next config env block rather than VERCEL_URL in next.constants.mjs.

Root pnpm build / deploy and site turbo.json are scoped to @node-core/website; Cloudflare-specific turbo tasks and cloudflare:* scripts are removed from the site package. next is pinned via the workspace catalog to 16.3.0-preview.9 (noted for import-condition support).

Reviewed by Cursor Bugbot for commit 02d56f2. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.07%. Comparing base (c086c54) to head (02d56f2).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9029      +/-   ##
==========================================
- Coverage   75.10%   75.07%   -0.04%     
==========================================
  Files         102      102              
  Lines        9109     9090      -19     
  Branches      372      370       -2     
==========================================
- Hits         6841     6824      -17     
+ Misses       2264     2262       -2     
  Partials        4        4              

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

Comment thread platforms/vercel/vercel.json
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

📦 Build Size Comparison

Summary

Metric Value
Old Total First Load JS 10.65 MB
New Total First Load JS 7.10 MB
Delta -3.56 MB (-33.38%)

Changes

🔄 Modified Routes (5)
Route Old First Load JS New First Load JS Delta
/[locale] 2.54 MB 1.67 MB 📉 -894.05 KB (-34.36%)
/[locale]/[...path] 2.54 MB 1.67 MB 📉 -894.05 KB (-34.36%)
/[locale]/blog/[...path] 2.54 MB 1.67 MB 📉 -894.05 KB (-34.36%)
/[locale]/download/archive/[version] 2.54 MB 1.67 MB 📉 -894.05 KB (-34.36%)
/_not-found 503.27 KB 437.41 KB 📉 -65.85 KB (-13.09%)

Copilot AI review requested due to automatic review settings July 28, 2026 20:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 28, 2026 20:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread apps/site/package.json
Copilot AI review requested due to automatic review settings July 28, 2026 20:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 28, 2026 20:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@avivkeller

Copy link
Copy Markdown
Member Author

(Vercel is failing since vercel.json moved to a different directory)

Copilot AI review requested due to automatic review settings July 28, 2026 20:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 28, 2026 20:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread platforms/vercel/next.config.mjs
Copilot AI review requested due to automatic review settings July 29, 2026 01:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 02d56f2. Configure here.

Comment thread platforms/cloudflare/turbo.json
Comment thread apps/site/turbo.json
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.

2 participants