Skip to content

fix: own monaco editor dependency#6

Merged
exKAZUu merged 6 commits intomainfrom
fix/bundle-monaco-editor-dependency
Apr 18, 2026
Merged

fix: own monaco editor dependency#6
exKAZUu merged 6 commits intomainfrom
fix/bundle-monaco-editor-dependency

Conversation

@exKAZUu
Copy link
Copy Markdown
Member

@exKAZUu exKAZUu commented Apr 18, 2026

Summary

  • Move monaco-editor from peer/dev dependency to an exact runtime dependency so consumers do not need to install it separately for type resolution.
  • Keep only react and react-dom as app-owned peer dependencies.
  • Update @willbooster/monaco-loader to the published 1.1.1 release.
  • Switch the package build from tsup to build-ts@17.1.5 and remove the obsolete tsup config.
  • Apply wbfy generated maintenance updates.

Why

  • User projects should be able to depend on @willbooster/monaco-react without separately choosing a compatible monaco-editor version.
  • The runtime loader still loads Monaco from the configured CDN path by default, but this package's generated declarations expose Monaco types, so monaco-editor must be available for consumer TypeScript resolution.
  • Pinning monaco-editor exactly keeps the declarations, wrapper code, and loader default Monaco version aligned.
  • @willbooster/monaco-loader@1.1.1 carries the matching loader-side dependency metadata change.
  • build-ts@17.1.5 supports this package shape: a TypeScript entry that re-exports TSX modules, preserved root output files, external declared dependencies, and bundler module resolution for declarations.

Testing

  • yarn start /Users/exkazuu/ghq/github.com/WillBooster/monaco-react from ~/ghq/github.com/WillBooster/shared/packages/wbfy
  • yarn build
  • 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.
  • Verified generated JS imports @willbooster/monaco-loader as a package dependency.
  • node -e "const m=require('./dist/index.cjs'); ..."
  • node --input-type=module -e "const m=await import('./dist/index.js'); ..."
  • yarn check-for-ai passed with 9 existing warnings and 0 errors.
  • Pre-push hook: check passed with the same 9 existing warnings and 0 errors.
  • GitHub Actions: all CI workflows passed.

exKAZUu and others added 2 commits April 18, 2026 20:05
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 reorganizes the package.json structure and moves monaco-editor from peerDependencies and devDependencies to a direct dependency. A review comment highlights that pinning monaco-editor to an exact version in dependencies is risky for a library, as it can cause version conflicts and runtime errors in consumer projects, and suggests using a version range instead.

Comment thread package.json
exKAZUu and others added 2 commits April 18, 2026 20:13
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
@exKAZUu exKAZUu enabled auto-merge (squash) April 18, 2026 11:15
exKAZUu and others added 2 commits April 18, 2026 20:19
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
@exKAZUu exKAZUu merged commit 8bfa4f0 into main Apr 18, 2026
7 checks passed
@exKAZUu exKAZUu deleted the fix/bundle-monaco-editor-dependency branch April 18, 2026 11:22
@exKAZUu exKAZUu changed the title fix: bundle monaco editor dependency fix: own monaco editor dependency Apr 18, 2026
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