Skip to content

feat(craft): convert craft-lab to Vite/vitest/TypeScript workspace#73618

Draft
stephenliang wants to merge 1 commit into
stephen/craft-subtree-importfrom
stephen/craft-package-buildout
Draft

feat(craft): convert craft-lab to Vite/vitest/TypeScript workspace#73618
stephenliang wants to merge 1 commit into
stephen/craft-subtree-importfrom
stephen/craft-package-buildout

Conversation

@stephenliang

Copy link
Copy Markdown
Member

Summary

  • Convert the subtree-imported craft game engine into a conformant frontend/ workspace package (@code-dot-org/craft-lab)
  • Rewrite package.json with dual ESM+CJS exports via Vite library mode build
  • Convert all 47 source files from CommonJS to ES modules
  • Migrate unit tests from tape to vitest (64 passing, integration tests marked skip)
  • Progressive TypeScript adoption: 3 key files renamed to .ts, ambient Phaser type declarations, @ts-nocheck on remaining JS
  • Remove standalone repo tooling (webpack, karma, babel, nyc, codecov)
  • Add standard workspace config (tsconfig, eslint, lint-staged, vitest)

Context

Second of 3 stacked PRs for the craft-lab migration. Stacked on #73617.

Test plan

  • cd frontend/packages/labs/craft && yarn build produces dist/index.mjs, dist/index.cjs, dist/index.d.ts, and dist/assets/
  • yarn test runs vitest — 64 unit tests pass, integration tests skipped
  • yarn typecheck passes with zero errors
  • Phaser is NOT bundled in dist/index.mjs

🤖 Generated with Claude Code

…space

Convert the subtree-imported craft game engine into a conformant
frontend/ workspace package:

- Rewrite package.json as @code-dot-org/craft-lab with dual ESM+CJS
  exports, Vite library-mode build, and vitest test runner
- Convert all 47 source files from CommonJS to ES modules
- Add Vite config with custom emitCraftAssets plugin and Phaser CE
  externalization
- Migrate unit tests from tape to vitest (64 passing, integration
  tests marked skip pending Playwright coverage)
- Progressive TypeScript adoption: rename 3 key files to .ts, add
  ambient Phaser type declarations
- Add standard workspace config (tsconfig, eslint, lint-staged)
- Remove standalone repo tooling (webpack, karma, babel, nyc, codecov)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@stephenliang stephenliang force-pushed the stephen/craft-package-buildout branch from 87d6fe9 to e77fe6b Compare July 1, 2026 21:14
@stephenliang stephenliang marked this pull request as draft July 2, 2026 21:46
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