Skip to content

[codex] Split playground into workspace packages#1278

Merged
jderochervlk merged 18 commits intomasterfrom
vlk/playground-package-split
Apr 28, 2026
Merged

[codex] Split playground into workspace packages#1278
jderochervlk merged 18 commits intomasterfrom
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

@jderochervlk jderochervlk force-pushed the vlk/playground-package-split branch from cb52ca9 to 9788098 Compare April 27, 2026 16:40
@jderochervlk jderochervlk force-pushed the vlk/monorepo-foundation branch from d5b8df0 to 103ada5 Compare April 28, 2026 13:29
Base automatically changed from vlk/monorepo-foundation to master April 28, 2026 15:24
@jderochervlk jderochervlk changed the title Split playground into workspace packages [codex] Split playground into workspace packages Apr 28, 2026
…age-split

# Conflicts:
#	.gitignore
#	apps/docs/__tests__/LandingPage_.test.res
#	apps/docs/app/routes/LandingPage.res
#	apps/docs/package.json
#	apps/docs/plugins/cm6-reason-mode.js
#	apps/docs/rescript.json
#	apps/docs/src/bindings/Babel.res
#	apps/docs/src/bindings/RescriptCompilerApi.res
#	apps/docs/src/bindings/RescriptCompilerApi.resi
#	apps/docs/src/common/Ansi.res
#	apps/docs/src/common/Ansi.resi
#	apps/docs/src/common/HighlightJs.res
#	apps/docs/src/common/HighlightJs.resi
#	apps/docs/src/common/ScrollLockContext.res
#	apps/docs/src/common/Semver.res
#	apps/docs/src/common/Semver.resi
#	apps/docs/src/common/WarningFlagDescription.res
#	apps/docs/src/common/WarningFlagDescription.resi
#	apps/docs/src/components/AnsiPre.res
#	apps/docs/src/components/AnsiPre.resi
#	apps/docs/src/components/CodeMirror.res
#	apps/docs/src/components/CodeMirror.resi
#	apps/docs/src/components/Icon.res
#	apps/docs/src/components/Icon.resi
#	apps/docs/src/components/Text.res
#	apps/docs/src/components/Text.resi
#	apps/docs/src/components/ToggleButton.res
#	apps/docs/src/ffi/loadScript.js
#	apps/docs/src/playground/CompilerManagerHook.res
#	apps/docs/src/playground/CompilerManagerHook.resi
#	apps/docs/src/playground/ConsolePanel.res
#	apps/docs/src/playground/EvalIFrame.res
#	apps/docs/src/playground/LzString.res
#	apps/docs/src/playground/OutputPanel.res
#	apps/docs/src/playground/Playground.res
#	apps/docs/src/playground/Playground.resi
#	apps/docs/src/playground/PlaygroundLazy.res
#	apps/docs/src/playground/RenderPanel.res
#	apps/docs/src/playground/RenderPanel.resi
#	apps/docs/vitest.setup.mjs
#	packages/playground/ffi/loadScript.js
#	packages/playground/src/CompilerManagerHook.res
#	packages/playground/src/CompilerManagerHook.resi
#	packages/playground/src/ConsolePanel.res
#	packages/playground/src/EvalIFrame.res
#	packages/playground/src/LzString.res
#	packages/playground/src/OutputPanel.res
#	packages/playground/src/Playground.res
#	packages/playground/src/Playground.resi
#	packages/playground/src/PlaygroundLazy.res
#	packages/playground/src/RenderPanel.res
#	packages/playground/src/RenderPanel.resi
#	packages/playground/src/ToggleButton.res
#	packages/shared/plugins/cm6-reason-mode.js
#	packages/shared/src/Ansi.res
#	packages/shared/src/Ansi.resi
#	packages/shared/src/AnsiPre.res
#	packages/shared/src/AnsiPre.resi
#	packages/shared/src/Babel.res
#	packages/shared/src/CodeMirror.res
#	packages/shared/src/CodeMirror.resi
#	packages/shared/src/HighlightJs.res
#	packages/shared/src/HighlightJs.resi
#	packages/shared/src/Icon.res
#	packages/shared/src/Icon.resi
#	packages/shared/src/RescriptCompilerApi.res
#	packages/shared/src/RescriptCompilerApi.resi
#	packages/shared/src/ScrollLockContext.res
#	packages/shared/src/Semver.res
#	packages/shared/src/Semver.resi
#	packages/shared/src/Text.res
#	packages/shared/src/Text.resi
#	packages/shared/src/WarningFlagDescription.res
#	packages/shared/src/WarningFlagDescription.resi
#	plugins/cm6-reason-mode.js
#	rescript.json
#	src/bindings/Babel.res
#	src/bindings/RescriptCompilerApi.res
#	src/bindings/RescriptCompilerApi.resi
#	src/common/Ansi.res
#	src/common/Ansi.resi
#	src/common/HighlightJs.res
#	src/common/HighlightJs.resi
#	src/common/ScrollLockContext.res
#	src/common/Semver.res
#	src/common/Semver.resi
#	src/common/WarningFlagDescription.res
#	src/common/WarningFlagDescription.resi
#	src/components/AnsiPre.res
#	src/components/AnsiPre.resi
#	src/components/CodeMirror.res
#	src/components/CodeMirror.resi
#	src/components/Icon.res
#	src/components/Icon.resi
#	src/components/Text.res
#	src/components/Text.resi
#	src/components/ToggleButton.res
#	src/ffi/loadScript.js
#	src/playground/CompilerManagerHook.res
#	src/playground/CompilerManagerHook.resi
#	src/playground/ConsolePanel.res
#	src/playground/EvalIFrame.res
#	src/playground/LzString.res
#	src/playground/OutputPanel.res
#	src/playground/Playground.res
#	src/playground/Playground.resi
#	src/playground/PlaygroundLazy.res
#	src/playground/RenderPanel.res
#	src/playground/RenderPanel.resi
#	yarn.lock
@github-actions
Copy link
Copy Markdown

Cloudflare deployment

Deployement ID: a2124899-1a59-4ce3-be4c-106a589ffe2a
Deployment Environment: preview

⛅️ wrangler 4.85.0
───────────────────
✨ Compiled Worker successfully
Uploading... (7569/8042)
Uploading... (7727/8042)
Uploading... (7884/8042)
Uploading... (8042/8042)
✨ Success! Uploaded 473 files (7569 already uploaded) (8.12 sec)

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

@jderochervlk jderochervlk marked this pull request as ready for review April 28, 2026 16:04
@jderochervlk jderochervlk merged commit 47aafa1 into master Apr 28, 2026
6 checks passed
@jderochervlk jderochervlk deleted the vlk/playground-package-split branch April 28, 2026 16:30
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