Skip to content

Split playground into workspace packages#1278

Draft
jderochervlk wants to merge 1 commit intovlk/monorepo-foundationfrom
vlk/playground-package-split
Draft

Split playground into workspace packages#1278
jderochervlk wants to merge 1 commit intovlk/monorepo-foundationfrom
vlk/playground-package-split

Conversation

@jderochervlk
Copy link
Copy Markdown
Collaborator

@jderochervlk jderochervlk commented Apr 27, 2026

Context

This is stacked on top of vlk/monorepo-foundation and prepares the docs/playground split needed for guide.rescript-lang.org.

Summary

  • Add packages/shared for reusable editor/compiler helpers such as CodeMirror, HighlightJs, Semver, icons, text components, and compiler API bindings.
  • Add packages/playground for the current playground implementation and its direct runtime/editor dependencies.
  • Wire apps/docs to depend on @rescript-lang/shared and @rescript-lang/playground through the workspace graph.
  • Keep playground browser storage reads safe during prerendering so /try does not access window at build time.
  • Align the Cloudflare deploy workflows with the installed Wrangler version so the deploy action does not run npm inside a workspace package with workspace:* dependencies.

Verification

  • yarn build:res
  • yarn build:scripts
  • yarn build:update-index
  • yarn build:vite
  • yarn ci:format
  • yarn vitest --browser.headless --run
  • yarn test outside the sandbox
  • GitHub PR checks: Format, Site_Checks, Vitest, Deploy, E2E Tests

Move shared editor/compiler helpers into @rescript-lang/shared and the playground implementation into @rescript-lang/playground.

Wire the docs app to consume both workspace packages and keep playground browser storage access safe during prerendering.
@github-actions
Copy link
Copy Markdown

Cloudflare deployment

Deployement ID: 96e51657-991d-4c3c-b130-4aa8308d8a70
Deployment Environment: preview

⛅️ wrangler 4.85.0
───────────────────
✨ Compiled Worker successfully
Uploading... (7544/8029)
Uploading... (7706/8029)
Uploading... (7868/8029)
Uploading... (8029/8029)
✨ Success! Uploaded 485 files (7544 already uploaded) (4.60 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://96e51657.rescript-lang.pages.dev
✨ Deployment alias URL: https://vlk-playground-package-split.rescript-lang.pages.dev

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.

1 participant