Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: monaco from npm by default, CDN version in dev mode with turbopack #4105

Merged
merged 10 commits into from
Mar 19, 2025

Conversation

Kiryous
Copy link
Contributor

@Kiryous Kiryous commented Mar 18, 2025

Closes #4104

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 18, 2025
Copy link

vercel bot commented Mar 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
keep ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2025 10:48am

@Kiryous Kiryous changed the title Fix/4104 monaco editor optional npm loader fix: monaco editor optional npm loader Mar 18, 2025
@dosubot dosubot bot added javascript Pull requests that update Javascript code UI User interface related issues labels Mar 18, 2025
@Kiryous Kiryous requested a review from shahargl March 18, 2025 13:57
Kiryous added 2 commits March 18, 2025 23:03
…om:keephq/keep into fix/4104-monaco-editor-optional-npm-loader
@Kiryous
Copy link
Contributor Author

Kiryous commented Mar 19, 2025

@greptileai

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds support for loading Monaco Editor from NPM packages instead of CDN to support air-gapped environments, with several key changes to the codebase.

  • Added new MonacoEditorDefault and MonacoEditorWithNpm components in /keep-ui/shared/ui/MonacoEditor/ to handle both CDN and NPM loading strategies
  • Added MONACO_EDITOR_NPM configuration flag in getConfig.ts to control editor loading method
  • Refactored workflow state management with new isDeployed flag and proper null handling for timestamps
  • Replaced direct Monaco editor imports across multiple components with the new shared MonacoEditor component
  • Modified next.config.js to support both webpack and turbo aliases for Monaco Editor NPM loading

21 file(s) reviewed, 6 comment(s)
Edit PR Review Bot Settings | Greptile

@Kiryous Kiryous changed the title fix: monaco editor optional npm loader fix: monaco from npm by default, CDN version in dev mode with turbopack Mar 19, 2025
Copy link
Member

@shahargl shahargl left a comment

Choose a reason for hiding this comment

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

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 19, 2025
Copy link
Contributor

@skynetigor skynetigor left a comment

Choose a reason for hiding this comment

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

LGTM

@Kiryous Kiryous merged commit a57b934 into main Mar 19, 2025
19 checks passed
@Kiryous Kiryous deleted the fix/4104-monaco-editor-optional-npm-loader branch March 19, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. UI User interface related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: loading monaco-editor as npm package fails with turbopack
3 participants