Codemirror version changed to 6.0.2#25358
Open
gizemfirat wants to merge 1 commit into
Open
Conversation
-> codemirror version changed to 6.0.2
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the @abp/codemirror npm pack to use CodeMirror 6 (targeting [email protected]) while keeping existing ABP/CMS Kit integrations working via a small window.CodeMirror.fromTextArea(...) compatibility wrapper and updated static resource mappings.
Changes:
- Switch
@abp/codemirrorfrom CodeMirror 5 assets to a bundled CodeMirror 6 IIFE and add ABP-specific styling (abp-codemirror). - Add a compatibility
fromTextAreaadapter and minimal “mode loaded” stubs forcss/javascript. - Update ABP resource mappings to serve assets from
@abp/codemirror/src/*instead ofcodemirrorv5 folder structure.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| npm/packs/codemirror/src/mode/javascript/javascript.js | Adds a lightweight “mode loaded” marker for javascript/js. |
| npm/packs/codemirror/src/mode/css/css.js | Adds a lightweight “mode loaded” marker for css. |
| npm/packs/codemirror/src/codemirror.css | Introduces ABP wrapper styling for CodeMirror 6. |
| npm/packs/codemirror/scripts/entry.js | Implements window.CodeMirror.fromTextArea compatibility adapter on top of CodeMirror 6. |
| npm/packs/codemirror/scripts/build.js | Adds an esbuild bundling step to generate src/codemirror.js. |
| npm/packs/codemirror/package.json | Updates dependencies to CodeMirror 6 + adds build tooling. |
| npm/packs/codemirror/abp.resourcemapping.js | Repoints ABP resource mappings to the pack’s own src outputs. |
| "@abp/core": "~10.3.0", | ||
| "codemirror": "^5.65.1" | ||
| "@codemirror/lang-css": "^6.0.0", | ||
| "@codemirror/lang-javascript": "^6.0.0", |
| target: ['es2019'], | ||
| sourcemap: false, | ||
| minify: false, | ||
| legalComments: 'none' |
Comment on lines
+61
to
+64
| function createState(textarea, options) { | ||
| const extensions = [ | ||
| basicSetup, | ||
| EditorView.updateListener.of(update => { |
Comment on lines
+24
to
+25
| .abp-codemirror .cm-focused { | ||
| outline: none; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FIX volosoft/volo#20960
-> codemirror version changed to 6.0.2
