Skip to content

Commit 26921c8

Browse files
committed
Merge branch 'trac-48456-codemirror-v5-upgrade' of https://github.com/westonruter/wordpress-develop into trac-48456-codemirror-v5-upgrade
* 'trac-48456-codemirror-v5-upgrade' of https://github.com/westonruter/wordpress-develop: Use actual package version
2 parents 93499e0 + 61afe75 commit 26921c8

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tools/webpack/codemirror-banner.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
/* jshint node:true */
22
/* jshint esversion: 6 */
3-
const pkg = require( '../../package.json' );
3+
const codemirrorVersion = require( 'codemirror/package.json' ).version;
4+
if ( typeof codemirrorVersion !== 'string' ) {
5+
throw new Error( 'Could not read CodeMirror version from package.json' );
6+
}
47

5-
module.exports = `/*! This file is auto-generated from CodeMirror - v${ pkg.dependencies.codemirror }
8+
module.exports = `/*! This file is auto-generated from CodeMirror - v${ codemirrorVersion }
69
710
CodeMirror, copyright (c) by Marijn Haverbeke and others
811
Distributed under an MIT license: http://codemirror.net/LICENSE

0 commit comments

Comments
 (0)