From 8435228a48dd7b797583a2dd68312c9e60614b2a Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 16 Mar 2018 10:27:06 +0100 Subject: [PATCH] drop jquery, underscore, backbone and handlebars --- server/sonar-web/.eslintrc | 2 +- server/sonar-web/.flowconfig | 2 - server/sonar-web/config/webpack.config.js | 23 +- server/sonar-web/package.json | 11 +- server/sonar-web/src/main/js/app/index.js | 3 - .../main/js/app/utils/startAjaxMonitoring.js | 202 ------------------ .../main/js/components/common/file-upload.js | 60 ------ .../src/main/js/helpers/handlebars/any.js | 25 --- .../js/helpers/handlebars/collapsePath.js | 24 --- .../handlebars/collapsedDirFromPath.js | 24 --- .../src/main/js/helpers/handlebars/d.js | 32 --- .../js/helpers/handlebars/dashboardUrl.js | 26 --- .../src/main/js/helpers/handlebars/default.js | 23 -- .../src/main/js/helpers/handlebars/dt.js | 34 --- .../main/js/helpers/handlebars/eachEven.js | 28 --- .../src/main/js/helpers/handlebars/eachOdd.js | 28 --- .../src/main/js/helpers/handlebars/eq.js | 23 -- .../js/helpers/handlebars/fileFromPath.js | 24 --- .../js/helpers/handlebars/formatMeasure.js | 24 --- .../src/main/js/helpers/handlebars/fromNow.js | 26 --- .../main/js/helpers/handlebars/ifTestData.js | 26 --- .../src/main/js/helpers/handlebars/isNull.js | 22 -- .../main/js/helpers/handlebars/issueType.js | 24 --- .../js/helpers/handlebars/issueTypeIcon.js | 50 ----- .../src/main/js/helpers/handlebars/join.js | 22 -- .../main/js/helpers/handlebars/joinEach.js | 36 ---- .../main/js/helpers/handlebars/limitString.js | 27 --- .../src/main/js/helpers/handlebars/link.js | 22 -- .../main/js/helpers/handlebars/notEmpty.js | 23 -- .../src/main/js/helpers/handlebars/notEq.js | 23 -- .../js/helpers/handlebars/notEqComponents.js | 23 -- .../src/main/js/helpers/handlebars/notNull.js | 22 -- .../js/helpers/handlebars/qualifierIcon.js | 26 --- .../js/helpers/handlebars/settingsIcon.js | 33 --- .../js/helpers/handlebars/severityHelper.js | 28 --- .../js/helpers/handlebars/severityIcon.js | 26 --- .../src/main/js/helpers/handlebars/sum.js | 23 -- .../src/main/js/helpers/handlebars/t.js | 23 -- .../js/helpers/handlebars/testStatusIcon.js | 26 --- .../helpers/handlebars/testStatusIconClass.js | 24 --- .../src/main/js/helpers/handlebars/tp.js | 23 -- .../src/main/js/helpers/isolatedScroll.js | 31 --- server/sonar-web/yarn.lock | 98 +-------- 43 files changed, 6 insertions(+), 1319 deletions(-) delete mode 100644 server/sonar-web/src/main/js/app/utils/startAjaxMonitoring.js delete mode 100644 server/sonar-web/src/main/js/components/common/file-upload.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/any.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/collapsePath.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/collapsedDirFromPath.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/d.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/dashboardUrl.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/default.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/dt.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/eachEven.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/eachOdd.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/eq.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/fileFromPath.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/formatMeasure.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/fromNow.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/ifTestData.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/isNull.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/issueType.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/issueTypeIcon.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/join.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/joinEach.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/limitString.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/link.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/notEmpty.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/notEq.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/notEqComponents.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/notNull.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/qualifierIcon.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/settingsIcon.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/severityHelper.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/severityIcon.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/sum.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/t.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/testStatusIcon.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/testStatusIconClass.js delete mode 100644 server/sonar-web/src/main/js/helpers/handlebars/tp.js delete mode 100644 server/sonar-web/src/main/js/helpers/isolatedScroll.js diff --git a/server/sonar-web/.eslintrc b/server/sonar-web/.eslintrc index 9ca9ff7e900..2e02ba0490f 100644 --- a/server/sonar-web/.eslintrc +++ b/server/sonar-web/.eslintrc @@ -206,6 +206,6 @@ }, "settings": { - "import/ignore": ["node_modules", "hbs$"] + "import/ignore": ["node_modules"] } } diff --git a/server/sonar-web/.flowconfig b/server/sonar-web/.flowconfig index d5f3a8e2503..9913fbfb0b1 100644 --- a/server/sonar-web/.flowconfig +++ b/server/sonar-web/.flowconfig @@ -11,9 +11,7 @@ [options] module.file_ext=.js -module.file_ext=.hbs module.file_ext=.ts module.file_ext=.tsx -module.name_mapper.extension='hbs' -> 'empty/object' module.name_mapper.extension='ts' -> 'empty/object' module.name_mapper.extension='tsx' -> 'empty/object' diff --git a/server/sonar-web/config/webpack.config.js b/server/sonar-web/config/webpack.config.js index ecb1b446b13..c112acd4bca 100644 --- a/server/sonar-web/config/webpack.config.js +++ b/server/sonar-web/config/webpack.config.js @@ -46,8 +46,6 @@ module.exports = ({ production = true, fast = false }) => ({ !production && require.resolve('react-dev-utils/webpackHotDevClient'), require.resolve('./polyfills'), !production && require.resolve('react-error-overlay'), - 'jquery', - 'underscore', 'lodash', 'd3-array', 'd3-hierarchy', @@ -55,10 +53,7 @@ module.exports = ({ production = true, fast = false }) => ({ 'd3-selection', 'd3-shape', 'react', - 'react-dom', - 'backbone', - 'backbone.marionette', - 'handlebars/runtime' + 'react-dom' ].filter(Boolean), app: [ @@ -93,17 +88,6 @@ module.exports = ({ production = true, fast = false }) => ({ } ] }, - { - test: /\.hbs$/, - use: [ - { - loader: 'handlebars-loader', - options: { - helperDirs: path.join(__dirname, '../src/main/js/helpers/handlebars') - } - } - ] - }, production ? { test: /\.css$/, @@ -116,10 +100,7 @@ module.exports = ({ production = true, fast = false }) => ({ test: /\.css$/, use: ['style-loader', cssLoader({ production, fast }), postcssLoader()] }, - { test: require.resolve('jquery'), loader: 'expose-loader?$!expose-loader?jQuery' }, - { test: require.resolve('underscore'), loader: 'expose-loader?_' }, - { test: require.resolve('backbone'), loader: 'expose-loader?Backbone' }, - { test: require.resolve('backbone.marionette'), loader: 'expose-loader?Marionette' }, + { test: require.resolve('lodash'), loader: 'expose-loader?_' }, { test: require.resolve('react'), loader: 'expose-loader?React' }, { test: require.resolve('react-dom'), loader: 'expose-loader?ReactDOM' } ].filter(Boolean) diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index 377677ee369..1d4621994e6 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -6,8 +6,6 @@ "license": "LGPL-3.0", "dependencies": { "babel-polyfill": "6.26.0", - "backbone": "1.2.3", - "backbone.marionette": "2.4.3", "classnames": "2.2.5", "clipboard": "1.7.1", "create-react-class": "15.6.2", @@ -17,12 +15,9 @@ "d3-selection": "1.1.0", "d3-shape": "1.2.0", "date-fns": "1.29.0", - "escape-html": "1.0.3", "formik": "0.11.7", - "handlebars": "2.0.0", "history": "3.3.0", "intl-relativeformat": "2.1.0", - "jquery": "2.2.0", "keymaster": "1.6.2", "lodash": "4.17.4", "prop-types": "15.6.0", @@ -41,7 +36,6 @@ "redux": "3.7.2", "redux-logger": "3.0.6", "redux-thunk": "2.2.0", - "underscore": "1.8.3", "whatwg-fetch": "2.0.3" }, "devDependencies": { @@ -50,9 +44,7 @@ "@types/d3-array": "1.2.1", "@types/d3-scale": "1.0.10", "@types/enzyme": "3.1.6", - "@types/escape-html": "0.0.20", "@types/jest": "22.0.1", - "@types/jquery": "3.2.11", "@types/keymaster": "1.6.28", "@types/lodash": "4.14.102", "@types/prop-types": "15.5.2", @@ -92,7 +84,6 @@ "extract-text-webpack-plugin": "3.0.1", "flow-bin": "^0.52.0", "fs-extra": "0.30.0", - "handlebars-loader": "1.6.0", "html-webpack-plugin": "2.30.1", "jest": "22.0.6", "lint-staged": "4.3.0", @@ -140,7 +131,7 @@ "mapCoverage": true, "moduleFileExtensions": ["ts", "tsx", "js", "json"], "moduleNameMapper": { - "^.+\\.(hbs|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": + "^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/config/jest/FileStub.js", "^.+\\.css$": "/config/jest/CSSStub.js" }, diff --git a/server/sonar-web/src/main/js/app/index.js b/server/sonar-web/src/main/js/app/index.js index 0ab0aec9efa..01521b77b91 100644 --- a/server/sonar-web/src/main/js/app/index.js +++ b/server/sonar-web/src/main/js/app/index.js @@ -18,17 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import exposeLibraries from './utils/exposeLibraries'; -import startAjaxMonitoring from './utils/startAjaxMonitoring'; import startReactApp from './utils/startReactApp'; import installExtensionsHandler from './utils/installExtensionsHandler'; import { installGlobal } from '../helpers/l10n'; -import '../helpers/isolatedScroll'; // styles import '../components/ui/Level.css'; import '../components/ui/Rating.css'; import './styles/sonar.css'; -startAjaxMonitoring(); installGlobal(); startReactApp(); exposeLibraries(); diff --git a/server/sonar-web/src/main/js/app/utils/startAjaxMonitoring.js b/server/sonar-web/src/main/js/app/utils/startAjaxMonitoring.js deleted file mode 100644 index 1a778ac1111..00000000000 --- a/server/sonar-web/src/main/js/app/utils/startAjaxMonitoring.js +++ /dev/null @@ -1,202 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import $ from 'jquery'; -import Backbone from 'backbone'; -import Marionette from 'backbone.marionette'; -import escapeHtml from 'escape-html'; -import { uniqueId } from 'lodash'; -import { translate } from '../../helpers/l10n'; -import { getCSRFTokenName, getCSRFTokenValue } from '../../helpers/request'; - -const defaults = { - queue: {}, - timeout: 300, - fadeTimeout: 100 -}; - -const Process = Backbone.Model.extend({ - defaults: { - state: 'ok' - }, - - timeout() { - this.set({ - state: 'timeout', - message: 'Still Working...' - }); - }, - - finish(options) { - const finalOptions = { force: false, ...options }; - if (this.get('state') !== 'failed' || finalOptions.force) { - this.trigger('destroy', this, this.collection, finalOptions); - } - }, - - fail(message) { - const that = this; - let msg = message || translate('process.fail'); - if (msg === 'process.fail') { - // no translation - msg = - 'An error happened, some parts of the page might not render correctly. ' + - 'Please contact the administrator if you keep on experiencing this error.'; - } - clearInterval(this.get('timer')); - this.set({ - state: 'failed', - message: msg - }); - this.set('state', 'failed'); - setTimeout(() => { - that.finish({ force: true }); - }, 5000); - } -}); - -const Processes = Backbone.Collection.extend({ - model: Process -}); - -const ProcessesView = Marionette.ItemView.extend({ - tagName: 'ul', - className: 'processes-container', - - collectionEvents: { - all: 'render' - }, - - render() { - const failed = this.collection.findWhere({ state: 'failed' }); - const timeout = this.collection.findWhere({ state: 'timeout' }); - let el; - this.$el.empty(); - if (failed != null) { - el = $('
  • ') - .html(failed.get('message')) - .addClass('process-spinner process-spinner-failed shown'); - const close = $('') - .html('') - .addClass('process-spinner-close'); - close.appendTo(el); - close.on('click', () => { - failed.finish({ force: true }); - }); - el.appendTo(this.$el); - } else if (timeout != null) { - el = $('
  • ') - .html(timeout.get('message')) - .addClass('process-spinner shown'); - el.appendTo(this.$el); - } - return this; - } -}); - -const processes = new Processes(); -const processesView = new ProcessesView({ - collection: processes -}); - -/** - * Add background process - * @returns {number} - */ -function addBackgroundProcess() { - const uid = uniqueId('process'); - const process = new Process({ - id: uid, - timer: setTimeout(() => { - process.timeout(); - }, defaults.timeout) - }); - processes.add(process); - return uid; -} - -/** - * Finish background process - * @param {number} uid - */ -function finishBackgroundProcess(uid) { - const process = processes.get(uid); - if (process != null) { - process.finish(); - } -} - -/** - * Fail background process - * @param {number} uid - * @param {string} message - */ -function failBackgroundProcess(uid, message) { - const process = processes.get(uid); - if (process != null) { - process.fail(message); - } -} - -/** - * Handle ajax error - * @param jqXHR - */ -function handleAjaxError(jqXHR) { - if (jqXHR != null && jqXHR.processId != null) { - let message = null; - if (jqXHR.responseJSON != null && jqXHR.responseJSON.errors != null) { - message = jqXHR.responseJSON.errors.map(e => e.msg).join('. '); - } - failBackgroundProcess(jqXHR.processId, message ? escapeHtml(message) : null); - } -} - -function handleNotAuthenticatedError() { - // workaround cyclic dependencies - const handleRequiredAuthentication = require('./handleRequiredAuthentication').default; - handleRequiredAuthentication(); -} - -$.ajaxSetup({ - beforeSend(jqXHR) { - jqXHR.setRequestHeader(getCSRFTokenName(), getCSRFTokenValue()); - jqXHR.processId = addBackgroundProcess(); - }, - complete(jqXHR) { - if (jqXHR.processId != null) { - finishBackgroundProcess(jqXHR.processId); - } - }, - statusCode: { - 400: handleAjaxError, - 401: handleNotAuthenticatedError, - 403: handleAjaxError, - 500: handleAjaxError, - 502: handleAjaxError, - 503: handleAjaxError, - 504: handleAjaxError - } -}); - -const startAjaxMonitoring = () => { - processesView.render().$el.appendTo('body'); -}; - -export default startAjaxMonitoring; diff --git a/server/sonar-web/src/main/js/components/common/file-upload.js b/server/sonar-web/src/main/js/components/common/file-upload.js deleted file mode 100644 index b5c9f75c078..00000000000 --- a/server/sonar-web/src/main/js/components/common/file-upload.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import $ from 'jquery'; -import { uniqueId } from 'lodash'; - -function createFrame() { - const uuid = uniqueId('upload-form-'); - return $('') - .prop('frameborder', 0) - .prop('width', 0) - .prop('height', 0) - .prop('id', uuid) - .prop('name', uuid) - .css('display', 'none'); -} - -export default function(options) { - const deferred = new $.Deferred(); - const body = $('body'); - const frame = createFrame(); - const parent = options.form.parent(); - const clonedForm = options.form.detach(); - - clonedForm.prop('target', frame.prop('id')).appendTo(frame); - - frame.appendTo(body); - - frame.on('load', function() { - const result = this.contentWindow.document.body.textContent; - try { - const js = JSON.parse(result); - deferred.resolve(js); - } catch (e) { - deferred.resolve(result); - } - clonedForm.detach().appendTo(parent); - frame.off('load').remove(); - }); - - clonedForm.submit(); - - return deferred.promise(); -} diff --git a/server/sonar-web/src/main/js/helpers/handlebars/any.js b/server/sonar-web/src/main/js/helpers/handlebars/any.js deleted file mode 100644 index 5fb60574b51..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/any.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(...args) { - const options = args[args.length - 1]; - const list = args.slice(0, -1); - const any = list.reduce((prev, current) => prev || current, false); - return any ? options.fn(this) : options.inverse(this); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/collapsePath.js b/server/sonar-web/src/main/js/helpers/handlebars/collapsePath.js deleted file mode 100644 index 0dfcfbf2c7d..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/collapsePath.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const { collapsePath } = require('../path'); - -module.exports = function(path) { - return collapsePath(path); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/collapsedDirFromPath.js b/server/sonar-web/src/main/js/helpers/handlebars/collapsedDirFromPath.js deleted file mode 100644 index 8bf5275b3ff..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/collapsedDirFromPath.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const { collapsedDirFromPath } = require('../path'); - -module.exports = function(path) { - return collapsedDirFromPath(path); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/d.js b/server/sonar-web/src/main/js/helpers/handlebars/d.js deleted file mode 100644 index eb17f6fc6f7..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/d.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const { parseDate } = require('../../helpers/dates'); -const { getCurrentLocale } = require('../../helpers/l10n'); - -module.exports = function(date) { - if (!date) { - return ''; - } - return new Intl.DateTimeFormat(getCurrentLocale(), { - year: 'numeric', - month: 'long', - day: 'numeric' - }).format(parseDate(date)); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/dashboardUrl.js b/server/sonar-web/src/main/js/helpers/handlebars/dashboardUrl.js deleted file mode 100644 index af53c98dfdb..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/dashboardUrl.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(componentKey, componentQualifier) { - let url = window.baseUrl + '/dashboard/index?id=' + encodeURIComponent(componentKey); - if (componentQualifier === 'FIL' || componentQualifier === 'CLA') { - url += '&metric=sqale_index'; - } - return url; -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/default.js b/server/sonar-web/src/main/js/helpers/handlebars/default.js deleted file mode 100644 index b844e2a6dde..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/default.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(...args) { - const list = args.slice(0, -1); - return list.reduce((prev, current) => (prev != null ? prev : current), null); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/dt.js b/server/sonar-web/src/main/js/helpers/handlebars/dt.js deleted file mode 100644 index c1fbe448175..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/dt.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const { parseDate } = require('../../helpers/dates'); -const { getCurrentLocale } = require('../../helpers/l10n'); - -module.exports = function(date) { - if (!date) { - return ''; - } - return new Intl.DateTimeFormat(getCurrentLocale(), { - year: 'numeric', - month: 'long', - day: 'numeric', - hour: 'numeric', - minute: 'numeric' - }).format(parseDate(date)); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/eachEven.js b/server/sonar-web/src/main/js/helpers/handlebars/eachEven.js deleted file mode 100644 index 59a4cf477c7..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/eachEven.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(context, options) { - let ret = ''; - context.forEach((d, i) => { - if (i % 2 === 0) { - ret += options.fn(d); - } - }); - return ret; -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/eachOdd.js b/server/sonar-web/src/main/js/helpers/handlebars/eachOdd.js deleted file mode 100644 index 6914969bed9..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/eachOdd.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(context, options) { - let ret = ''; - context.forEach((d, i) => { - if (i % 2 === 1) { - ret += options.fn(d); - } - }); - return ret; -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/eq.js b/server/sonar-web/src/main/js/helpers/handlebars/eq.js deleted file mode 100644 index 4707eb85480..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/eq.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(v1, v2, options) { - /* eslint eqeqeq: 0 */ - return v1 == v2 ? options.fn(this) : options.inverse(this); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/fileFromPath.js b/server/sonar-web/src/main/js/helpers/handlebars/fileFromPath.js deleted file mode 100644 index dcb04d44611..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/fileFromPath.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const { fileFromPath } = require('../path'); - -module.exports = function(path) { - return fileFromPath(path); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/formatMeasure.js b/server/sonar-web/src/main/js/helpers/handlebars/formatMeasure.js deleted file mode 100644 index 2fd45a84fe8..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/formatMeasure.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const { formatMeasure } = require('../measures'); - -module.exports = function(measure, type) { - return formatMeasure(measure, type); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/fromNow.js b/server/sonar-web/src/main/js/helpers/handlebars/fromNow.js deleted file mode 100644 index bf7896a829e..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/fromNow.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const IntlRelativeFormat = require('intl-relativeformat'); -const { parseDate } = require('../../helpers/dates'); -const { getCurrentLocale } = require('../../helpers/l10n'); - -module.exports = function(date) { - return new IntlRelativeFormat(getCurrentLocale()).format(parseDate(date)); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/ifTestData.js b/server/sonar-web/src/main/js/helpers/handlebars/ifTestData.js deleted file mode 100644 index fd5d9f06944..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/ifTestData.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(test, options) { - if (test.status !== 'OK' || (test.status === 'OK' && test.coveredLines)) { - return options.fn(this); - } else { - return options.inverse(this); - } -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/isNull.js b/server/sonar-web/src/main/js/helpers/handlebars/isNull.js deleted file mode 100644 index 9394f0e741a..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/isNull.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(value, options) { - return value == null ? options.fn(this) : options.inverse(this); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/issueType.js b/server/sonar-web/src/main/js/helpers/handlebars/issueType.js deleted file mode 100644 index 6ab97894091..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/issueType.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const { translate } = require('../../helpers/l10n'); - -module.exports = function(issueType) { - return translate('issue.type', issueType); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/issueTypeIcon.js b/server/sonar-web/src/main/js/helpers/handlebars/issueTypeIcon.js deleted file mode 100644 index c66e73726f9..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/issueTypeIcon.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const Handlebars = require('handlebars/runtime'); - -/* eslint-disable max-len */ -const bug = new Handlebars.default.SafeString( - ` - - ` -); -const vulnerability = new Handlebars.default.SafeString( - ` - - ` -); -const codeSmell = new Handlebars.default.SafeString( - ` - - ` -); - -module.exports = function(type) { - switch (type) { - case 'BUG': - return bug; - case 'VULNERABILITY': - return vulnerability; - case 'CODE_SMELL': - return codeSmell; - default: - return ''; - } -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/join.js b/server/sonar-web/src/main/js/helpers/handlebars/join.js deleted file mode 100644 index bebf79755a3..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/join.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(array, separator) { - return array.join(separator); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/joinEach.js b/server/sonar-web/src/main/js/helpers/handlebars/joinEach.js deleted file mode 100644 index 2e1be59a769..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/joinEach.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(array, separator, options) { - let ret = ''; - - if (array && array.length > 0) { - const n = array.length; - for (let i = 0; i < n; i++) { - ret += options.fn(array[i]); - if (i < n - 1) { - ret += separator; - } - } - } else { - ret = options.inverse(this); - } - - return ret; -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/limitString.js b/server/sonar-web/src/main/js/helpers/handlebars/limitString.js deleted file mode 100644 index 08b0086f9e9..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/limitString.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(str) { - if (typeof str === 'string') { - const LIMIT = 30; - return str.length > LIMIT ? str.substr(0, LIMIT) + '...' : str; - } else { - return ''; - } -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/link.js b/server/sonar-web/src/main/js/helpers/handlebars/link.js deleted file mode 100644 index 81164a5dff2..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/link.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(...args) { - return window.baseUrl + args.slice(0, -1).join(''); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/notEmpty.js b/server/sonar-web/src/main/js/helpers/handlebars/notEmpty.js deleted file mode 100644 index caa1ec8adc7..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/notEmpty.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(array, options) { - const cond = Array.isArray(array) && array.length > 0; - return cond ? options.fn(this) : options.inverse(this); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/notEq.js b/server/sonar-web/src/main/js/helpers/handlebars/notEq.js deleted file mode 100644 index 5751cadad6a..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/notEq.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(v1, v2, options) { - /* eslint eqeqeq: 0 */ - return v1 != v2 ? options.fn(this) : options.inverse(this); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/notEqComponents.js b/server/sonar-web/src/main/js/helpers/handlebars/notEqComponents.js deleted file mode 100644 index 34af9c6c490..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/notEqComponents.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(a, b, options) { - const notEq = a && b && (a.project !== b.project || a.subProject !== b.subProject); - return notEq ? options.fn(this) : options.inverse(this); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/notNull.js b/server/sonar-web/src/main/js/helpers/handlebars/notNull.js deleted file mode 100644 index de756ffd7af..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/notNull.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(value, options) { - return value != null ? options.fn(this) : options.inverse(this); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/qualifierIcon.js b/server/sonar-web/src/main/js/helpers/handlebars/qualifierIcon.js deleted file mode 100644 index 3bfe339c1b4..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/qualifierIcon.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const Handlebars = require('handlebars/runtime'); - -module.exports = function(qualifier) { - return new Handlebars.default.SafeString( - qualifier ? `` : '' - ); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/settingsIcon.js b/server/sonar-web/src/main/js/helpers/handlebars/settingsIcon.js deleted file mode 100644 index c2a1d613adc..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/settingsIcon.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const Handlebars = require('handlebars/runtime'); - -module.exports = function() { - return new Handlebars.default.SafeString(` - - - - - - `); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/severityHelper.js b/server/sonar-web/src/main/js/helpers/handlebars/severityHelper.js deleted file mode 100644 index 6babc56c888..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/severityHelper.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const Handlebars = require('handlebars/runtime'); -const { translate } = require('../../helpers/l10n'); - -module.exports = function(severity) { - return new Handlebars.default.SafeString( - `` + - ` ${translate('severity', severity)}` - ); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/severityIcon.js b/server/sonar-web/src/main/js/helpers/handlebars/severityIcon.js deleted file mode 100644 index cce65b9437f..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/severityIcon.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const Handlebars = require('handlebars/runtime'); - -module.exports = function(severity) { - return new Handlebars.default.SafeString( - `` - ); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/sum.js b/server/sonar-web/src/main/js/helpers/handlebars/sum.js deleted file mode 100644 index 88b66a9fd3a..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/sum.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function(...args) { - const list = args.slice(0, -1); - return list.reduce((p, c) => p + +c, 0); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/t.js b/server/sonar-web/src/main/js/helpers/handlebars/t.js deleted file mode 100644 index 8571b59ffc5..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/t.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function() { - const args = Array.prototype.slice.call(arguments, 0, -1); - return window.t.apply(this, args); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/testStatusIcon.js b/server/sonar-web/src/main/js/helpers/handlebars/testStatusIcon.js deleted file mode 100644 index 6f1d1e0f40f..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/testStatusIcon.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const Handlebars = require('handlebars/runtime'); - -module.exports = function(status) { - return new Handlebars.default.SafeString( - `` - ); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/testStatusIconClass.js b/server/sonar-web/src/main/js/helpers/handlebars/testStatusIconClass.js deleted file mode 100644 index 4b6a5045176..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/testStatusIconClass.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const Handlebars = require('handlebars/runtime'); - -module.exports = function(status) { - return new Handlebars.default.SafeString(`icon-test-status-${status.toLowerCase()}`); -}; diff --git a/server/sonar-web/src/main/js/helpers/handlebars/tp.js b/server/sonar-web/src/main/js/helpers/handlebars/tp.js deleted file mode 100644 index a803ead2f23..00000000000 --- a/server/sonar-web/src/main/js/helpers/handlebars/tp.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = function() { - const args = Array.prototype.slice.call(arguments, 0, -1); - return window.tp.apply(this, args); -}; diff --git a/server/sonar-web/src/main/js/helpers/isolatedScroll.js b/server/sonar-web/src/main/js/helpers/isolatedScroll.js deleted file mode 100644 index 6b4f1150e00..00000000000 --- a/server/sonar-web/src/main/js/helpers/isolatedScroll.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import $ from 'jquery'; - -$.fn.isolatedScroll = function() { - this.on('wheel', function(event) { - const delta = -event.originalEvent.deltaY; - const bottomOverflow = this.scrollTop + $(this).outerHeight() - this.scrollHeight >= 0; - const topOverflow = this.scrollTop <= 0; - if ((delta < 0 && bottomOverflow) || (delta > 0 && topOverflow)) { - event.preventDefault(); - } - }); -}; diff --git a/server/sonar-web/yarn.lock b/server/sonar-web/yarn.lock index 62b3963d722..7d815c4efce 100644 --- a/server/sonar-web/yarn.lock +++ b/server/sonar-web/yarn.lock @@ -43,10 +43,6 @@ "@types/cheerio" "*" "@types/react" "*" -"@types/escape-html@0.0.20": - version "0.0.20" - resolved "https://registry.yarnpkg.com/@types/escape-html/-/escape-html-0.0.20.tgz#cae698714dd61ebee5ab3f2aeb9a34ba1011735a" - "@types/history@^3": version "3.2.2" resolved "https://registry.yarnpkg.com/@types/history/-/history-3.2.2.tgz#b6affa240cb10b5f841c6443d8a24d7f3fc8bb0c" @@ -55,10 +51,6 @@ version "22.0.1" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.0.1.tgz#6370a6d60cce3845e4cd5d00bf65f654264685bc" -"@types/jquery@3.2.11": - version "3.2.11" - resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.2.11.tgz#9119f91bb103b16ae8c4375b019a9b341b409f50" - "@types/keymaster@1.6.28": version "1.6.28" resolved "https://registry.yarnpkg.com/@types/keymaster/-/keymaster-1.6.28.tgz#093fc6fe49deff4ee17d36935a49230edb1c935f" @@ -447,10 +439,6 @@ async@^2.1.2, async@^2.1.4, async@^2.4.1: dependencies: lodash "^4.14.0" -async@~0.2.10, async@~0.2.6: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -1137,35 +1125,6 @@ babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -backbone.babysitter@^0.1.0: - version "0.1.12" - resolved "https://registry.yarnpkg.com/backbone.babysitter/-/backbone.babysitter-0.1.12.tgz#7ca946434eeefbde1a553605c74b7049b6dfafc1" - dependencies: - backbone ">=0.9.9 <=1.3.x" - underscore ">=1.4.0 <=1.8.3" - -backbone.marionette@2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/backbone.marionette/-/backbone.marionette-2.4.3.tgz#a4c93a317f5d9932bc717caf76163a48c53c0ae9" - dependencies: - backbone "1.0.0 - 1.2.3" - backbone.babysitter "^0.1.0" - backbone.wreqr "^1.0.0" - underscore "1.4.4 - 1.8.3" - -backbone.wreqr@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/backbone.wreqr/-/backbone.wreqr-1.4.0.tgz#7682030c9aaf090ecd873b21dbf48501693b2696" - dependencies: - backbone ">=0.9.9 <=1.3.x" - underscore ">=1.3.3 <=1.8.3" - -"backbone@1.0.0 - 1.2.3", backbone@1.2.3, "backbone@>=0.9.9 <=1.3.x": - version "1.2.3" - resolved "https://registry.yarnpkg.com/backbone/-/backbone-1.2.3.tgz#c22cfd07fc86ebbeae61d18929ed115e999d65b9" - dependencies: - underscore ">=1.7.0" - balanced-match@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" @@ -2606,7 +2565,7 @@ es6-weak-map@^2.0.1: es6-iterator "^2.0.1" es6-symbol "^3.1.1" -escape-html@1.0.3, escape-html@~1.0.3: +escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -2993,7 +2952,7 @@ fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" -fastparse@^1.0.0, fastparse@^1.1.1: +fastparse@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" @@ -3399,23 +3358,6 @@ handle-thing@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" -handlebars-loader@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/handlebars-loader/-/handlebars-loader-1.6.0.tgz#767a5843de30ffe795730f7d8a1ba3ce07af5b62" - dependencies: - async "~0.2.10" - fastparse "^1.0.0" - loader-utils "1.0.x" - object-assign "^4.1.0" - -handlebars@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-2.0.0.tgz#6e9d7f8514a3467fa5e9f82cc158ecfc1d5ac76f" - dependencies: - optimist "~0.3" - optionalDependencies: - uglify-js "~2.3" - handlebars@^4.0.3: version "4.0.11" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" @@ -4482,10 +4424,6 @@ jest@22.0.6: dependencies: jest-cli "^22.0.6" -jquery@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-2.2.0.tgz#d0e84ebbf199da51bf7ec39307f19b35754e9cba" - js-base64@^2.1.9: version "2.3.2" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.3.2.tgz#a79a923666372b580f8e27f51845c6f7e8fbfbaf" @@ -4773,14 +4711,6 @@ loader-runner@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" -loader-utils@1.0.x: - version "1.0.4" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.0.4.tgz#13f56197f1523a305891248b4c7244540848426c" - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - loader-utils@^0.2.16: version "0.2.17" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" @@ -5484,12 +5414,6 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -optimist@~0.3, optimist@~0.3.5: - version "0.3.7" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.3.7.tgz#c90941ad59e4273328923074d2cf2e7cbc6ec0d9" - dependencies: - wordwrap "~0.0.2" - optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" @@ -7153,12 +7077,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" -source-map@~0.1.7: - version "0.1.43" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" - dependencies: - amdefine ">=0.0.4" - spdx-correct@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" @@ -7621,14 +7539,6 @@ uglify-js@^2.6, uglify-js@^2.8.29: optionalDependencies: uglify-to-browserify "~1.0.0" -uglify-js@~2.3: - version "2.3.6" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.3.6.tgz#fa0984770b428b7a9b2a8058f46355d14fef211a" - dependencies: - async "~0.2.6" - optimist "~0.3.5" - source-map "~0.1.7" - uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" @@ -7649,10 +7559,6 @@ ultron@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.0.tgz#b07a2e6a541a815fc6a34ccd4533baec307ca864" -"underscore@1.4.4 - 1.8.3", underscore@1.8.3, "underscore@>=1.3.3 <=1.8.3", "underscore@>=1.4.0 <=1.8.3", underscore@>=1.7.0: - version "1.8.3" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" - underscore@~1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" -- 2.39.5