mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-16 15:46:04 +01:00
f27c6a5565
This updates several NPM dependencies to the latest versions, including: - `check-node-version` from `4.1.0` to `4.2.1`. - `dotenv` from `10.0.0` to `16.0.0`. - `dotenv-expand` from `5.1.0` to `8.0.3`. - `grunt-contrib-concat` from `2.0.0` to `2.1.0`. - `grunt-contrib-jshint` from `3.1.1` to `3.2.0`. - `grunt-contrib-uglify` from `5.0.1` to `5.1.0`. - `qunit` from `2.17.2` to `2.18.1`. - `sass` from `1.43.4` to `1.50.0`. - `sinon` from `12.0.1` to `13.0.1`. - `sinon-test` from `3.1.1` to `3.1.3`. - `uglify-js` from `3.14.3` to `3.15.3`. - `wait-on` from `6.0.0` to `6.0.1`. The updates to `dotenv` and `dotenv-expand` required a minor change to files using these packages. Additionally, this contains several updates to the `package-lock.json` file as a result of running `npm audit fix`. See #54727. Built from https://develop.svn.wordpress.org/trunk@53113 git-svn-id: http://core.svn.wordpress.org/trunk@52702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
3.0 KiB
JavaScript
2 lines
3.0 KiB
JavaScript
/*! This file is auto-generated */
|
|
void 0===window.wp&&(window.wp={}),void 0===window.wp.codeEditor&&(window.wp.codeEditor={}),function(u,d){"use strict";function s(r,s){var a=[],d=[];function c(){s.onUpdateErrorNotice&&!_.isEqual(a,d)&&(s.onUpdateErrorNotice(a,r),d=a)}function i(){var i,t=r.getOption("lint");return!!t&&(!0===t?t={}:_.isObject(t)&&(t=u.extend({},t)),t.options||(t.options={}),"javascript"===s.codemirror.mode&&s.jshint&&u.extend(t.options,s.jshint),"css"===s.codemirror.mode&&s.csslint&&u.extend(t.options,s.csslint),"htmlmixed"===s.codemirror.mode&&s.htmlhint&&(t.options.rules=u.extend({},s.htmlhint),s.jshint&&(t.options.rules.jshint=s.jshint),s.csslint&&(t.options.rules.csslint=s.csslint)),t.onUpdateLinting=(i=t.onUpdateLinting,function(t,e,n){var o=_.filter(t,function(t){return"error"===t.severity});i&&i.apply(t,e,n),_.isEqual(o,a)||(a=o,s.onChangeLintingErrors&&s.onChangeLintingErrors(o,t,e,n),(!r.state.focused||0===a.length||0<d.length)&&c())}),t)}r.setOption("lint",i()),r.on("optionChange",function(t,e){var n,o="CodeMirror-lint-markers";"lint"===e&&(e=r.getOption("gutters")||[],!0===(n=r.getOption("lint"))?(_.contains(e,o)||r.setOption("gutters",[o].concat(e)),r.setOption("lint",i())):n||r.setOption("gutters",_.without(e,o)),r.getOption("lint")?r.performLint():(a=[],c()))}),r.on("blur",c),r.on("startCompletion",function(){r.off("blur",c)}),r.on("endCompletion",function(){r.on("blur",c),_.delay(function(){r.state.focused||c()},500)}),u(document.body).on("mousedown",function(t){!r.state.focused||u.contains(r.display.wrapper,t.target)||u(t.target).hasClass("CodeMirror-hint")||c()})}d.codeEditor.defaultSettings={codemirror:{},csslint:{},htmlhint:{},jshint:{},onTabNext:function(){},onTabPrevious:function(){},onChangeLintingErrors:function(){},onUpdateErrorNotice:function(){}},d.codeEditor.initialize=function(t,e){var a,n,o,i,t=u("string"==typeof t?"#"+t:t),r=u.extend({},d.codeEditor.defaultSettings,e);return r.codemirror=u.extend({},r.codemirror),s(a=d.CodeMirror.fromTextArea(t[0],r.codemirror),r),t={settings:r,codemirror:a},a.showHint&&a.on("keyup",function(t,e){var n,o,i,r,s=/^[a-zA-Z]$/.test(e.key);a.state.completionActive&&s||"string"!==(r=a.getTokenAt(a.getCursor())).type&&"comment"!==r.type&&(i=d.CodeMirror.innerMode(a.getMode(),r.state).mode.name,o=a.doc.getLine(a.doc.getCursor().line).substr(0,a.doc.getCursor().ch),"html"===i||"xml"===i?n="<"===e.key||"/"===e.key&&"tag"===r.type||s&&"tag"===r.type||s&&"attribute"===r.type||"="===r.string&&r.state.htmlState&&r.state.htmlState.tagName:"css"===i?n=s||":"===e.key||" "===e.key&&/:\s+$/.test(o):"javascript"===i?n=s||"."===e.key:"clike"===i&&"php"===a.options.mode&&(n="keyword"===r.type||"variable"===r.type),n&&a.showHint({completeSingle:!1}))}),o=e,i=u((n=a).getTextArea()),n.on("blur",function(){i.data("next-tab-blurs",!1)}),n.on("keydown",function(t,e){27===e.keyCode?i.data("next-tab-blurs",!0):9===e.keyCode&&i.data("next-tab-blurs")&&(e.shiftKey?o.onTabPrevious(n,e):o.onTabNext(n,e),i.data("next-tab-blurs",!1),e.preventDefault())}),t}}(window.jQuery,window.wp); |