[wp-trac] [WordPress Trac] #48456: Update CodeMirror to latest v5 version

WordPress Trac noreply at wordpress.org
Tue Mar 3 20:26:49 UTC 2026


#48456: Update CodeMirror to latest v5 version
-------------------------------------------+--------------------------
 Reporter:  TobiasBg                       |       Owner:  westonruter
     Type:  enhancement                    |      Status:  closed
 Priority:  normal                         |   Milestone:  7.0
Component:  External Libraries             |     Version:  4.9
 Severity:  normal                         |  Resolution:  fixed
 Keywords:  early has-patch needs-testing  |     Focuses:  javascript
-------------------------------------------+--------------------------

Comment (by westonruter):

 In [changeset:"61800" 61800]:
 {{{
 #!CommitTicketReference repository="" revision="61800"
 Code Editor: Improve types and fix options handling to avoid double-
 linting at initialization.

 * Refactor how CodeMirror is initialized so that the full settings are
 provided up-front. This avoids the linting from being applied twice at
 initialization, the first time with an incorrect configuration.
 * Add initial TypeScript configuration for core with `npm run
 typecheck:js`.
 * Add comprehensive types for code editor files: `code-editor.js`,
 `javascript-lint.js`, and `htmlhint-kses.js`.
 * Move code editor scripts from `src/js/_enqueues/vendor/codemirror/` to
 `src/js/_enqueues/lib/codemirror/`. The CodeMirror library is sourced from
 the npm package as of r61539.
 * Remove (deprecated) `esprima.js` from being committed to SVN since in
 r61539 it was switched to using the npm package as its source.
 * Move `fakejshint.js` to `src/js/_enqueues/deprecated`.

 Developed in https://github.com/WordPress/wordpress-develop/pull/10900

 Follow up to r61611, r61539.

 Props westonruter, jonsurrell, justlevine.
 See #64662, #48456.
 Fixes #64661.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48456#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list