Skip to content

fix: complete monaco dependency build migration#9

Merged
exKAZUu merged 23 commits intomainfrom
fix/complete-monaco-dependency-pr
Apr 18, 2026
Merged

fix: complete monaco dependency build migration#9
exKAZUu merged 23 commits intomainfrom
fix/complete-monaco-dependency-pr

Conversation

@exKAZUu
Copy link
Copy Markdown
Member

@exKAZUu exKAZUu commented Apr 18, 2026

Follow-up to #6.

Summary

  • Switch the package build from tsup to build-ts lib and remove the obsolete tsup config.
  • Add the public entrypoint use client directive so the minified build-ts output preserves the client-component marker that the old tsup banner injected.
  • Update installation docs to reflect that monaco-editor is now installed with this package instead of required as a peer install.
  • Strengthen the Next.js e2e fixture so it requires built package artifacts, checks package export files, resolves app imports through the built dist entry, and type-checks against generated declarations when dist exists.
  • Keep the package build scoped to yarn test:e2e:next, where the Next fixture needs the generated dist package surface.
  • Remove the direct typescript dev dependency and rely on @typescript/native-preview / tsgo for project type checking.
  • Resolve lint warnings and make clean-checkout linting pass before generated dist artifacts exist.
  • Use the repo-local build/core script for yarn build so CI does not depend on a global wb binary.

Why

  • PR fix: own monaco editor dependency #6 moved monaco-editor into runtime dependencies, but the merged branch still used tsup even though the PR body described the build-ts migration.
  • Keeping the client directive in source makes the emitted ESM and CJS entrypoints compatible with React client hooks after replacing the bundler.
  • The e2e app should validate the same package surface consumers receive: package exports, generated declarations, and built JS files.
  • CI runs from a clean checkout, so lint and build scripts must not rely on locally generated dist files or globally installed WillBooster tooling.

Testing

  • yarn typecheck
  • yarn build
  • yarn lint
  • yarn check-for-ai
  • yarn test:e2e:next
  • git diff --check
  • Verified clean-checkout lint behavior by temporarily moving dist outside the repository and running yarn lint.
  • Verified minified dist/index.js and dist/index.cjs still start with "use client".
  • Verified generated dist/index.js, dist/index.cjs, and dist/index.d.ts exist.
  • Verified generated output has no dist/src or dist/node_modules.
  • node -e "const m=require('./dist/index.cjs'); console.log(typeof m.default, typeof m.Editor, typeof m.DiffEditor, typeof m.loader, typeof m.useMonaco)"
  • node --input-type=module -e "const m=await import('./dist/index.js'); console.log(typeof m.default, typeof m.Editor, typeof m.DiffEditor, typeof m.loader, typeof m.useMonaco)"
  • Pre-push hook: check passed with 0 warnings and 0 errors.
  • GitHub Actions CI passed on the latest branch state.

Notes

  • next build e2e/next-app prints a warning that some Next.js TypeScript features require the standard typescript package because it detects @typescript/native-preview; the build and Playwright e2e still pass.

exKAZUu and others added 2 commits April 19, 2026 07:36
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request transitions monaco-editor from a peer dependency to a direct dependency and replaces the tsup build system with build-ts. It also adds the 'use client'; directive to the main entry point for React Server Components compatibility. Feedback was provided regarding the phrasing of dependency ownership in the README and a potential versioning error concerning Next.js.

Comment thread README.md Outdated
exKAZUu and others added 21 commits April 19, 2026 07:44
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
@exKAZUu exKAZUu merged commit e452535 into main Apr 18, 2026
7 checks passed
@exKAZUu exKAZUu deleted the fix/complete-monaco-dependency-pr branch April 18, 2026 23: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