зеркало из https://github.com/mozilla/treeherder.git
Bug 1456894 - Import lodash explicitly
Rather than relying on `ProvidePlugin`.
This commit is contained in:
Родитель
4b3580afd4
Коммит
cc64c07802
|
@ -278,7 +278,6 @@ module.exports = neutrino => {
|
|||
'window.$': require.resolve('jquery'),
|
||||
'window.jQuery': require.resolve('jquery'),
|
||||
React: require.resolve('react'),
|
||||
_: require.resolve('lodash'),
|
||||
});
|
||||
|
||||
neutrino.config.devtool('source-map');
|
||||
|
|
|
@ -61,7 +61,6 @@ module.exports = neutrino => {
|
|||
},
|
||||
globals: [
|
||||
'$',
|
||||
'_',
|
||||
'jQuery',
|
||||
'React',
|
||||
'SERVICE_DOMAIN',
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Karma/webpack entry for tests
|
||||
|
||||
import jQuery from 'jquery';
|
||||
import _ from 'lodash';
|
||||
import React from 'react';
|
||||
// Manually import angular since angular-mocks doesn't do so itself
|
||||
import 'angular';
|
||||
|
@ -14,7 +13,6 @@ import Adapter from 'enzyme-adapter-react-16';
|
|||
// because neutrino removes plugin definitions for karma runs
|
||||
window.$ = jQuery;
|
||||
window.jQuery = jQuery;
|
||||
window._ = _;
|
||||
window.React = React;
|
||||
|
||||
configure({ adapter: new Adapter() });
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import PropTypes from 'prop-types';
|
||||
import { react2angular } from 'react2angular/index.es2015';
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
export const stringOverlap = function (str1, str2) {
|
||||
// Get a measure of the similarity of two strings by a simple process
|
||||
// of tokenizing and then computing the ratio of the tokens in common to
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import { thPlatformMap } from '../js/constants';
|
||||
|
||||
const btnClasses = {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import _ from 'lodash';
|
||||
import PropTypes from 'prop-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import JobButton from './JobButton';
|
||||
import JobCountComponent from './JobCount';
|
||||
import { getBtnClass, getStatus } from "../helpers/jobHelper";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import _ from 'lodash';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { thPlatformMap, thEvents } from '../js/constants';
|
||||
import { getPushTableId, getPlatformRowId } from '../helpers/aggregateIdHelper';
|
||||
import Platform from './Platform';
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import _ from 'lodash';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { parseAuthor } from '../helpers/revisionHelper';
|
||||
|
||||
export function Initials(props) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../treeherder';
|
||||
import AuthService from '../auth/AuthService';
|
||||
import { loggedOutUser } from '../auth/auth-utils';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../../treeherder';
|
||||
import trendTableTemplate from '../../../partials/perf/trendtable.html';
|
||||
import compareTableTemplate from '../../../partials/perf/comparetable.html';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../treeherder';
|
||||
import { getApiUrl } from "../../helpers/urlHelper";
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import logViewerApp from '../logviewer';
|
||||
import { getInspectTaskUrl, getReftestUrl } from "../../helpers/urlHelper";
|
||||
import { isReftest } from "../../helpers/jobHelper";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import Mousetrap from 'mousetrap';
|
||||
|
||||
import treeherderApp from '../treeherder_app';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import angular from 'angular';
|
||||
|
||||
import perf from '../../perf';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import metricsgraphics from 'metrics-graphics';
|
||||
|
||||
import perf from '../../perf';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import perf from '../../perf';
|
||||
import { thDefaultRepo, phBlockers, phTimeRanges } from "../../constants";
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// TODO: Vet/fix the use-before-defines to ensure switching var
|
||||
// to let/const won't break anything.
|
||||
|
||||
import _ from 'lodash';
|
||||
import angular from 'angular';
|
||||
import Mousetrap from 'mousetrap';
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import angular from 'angular';
|
||||
|
||||
import treeherder from '../treeherder';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import angular from 'angular';
|
||||
|
||||
import treeherder from '../treeherder';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../treeherder';
|
||||
import { getApiUrl } from '../../helpers/urlHelper';
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../../treeherder';
|
||||
import { getApiUrl } from "../../../helpers/urlHelper";
|
||||
import {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../../treeherder';
|
||||
import { getProjectUrl, getApiUrl } from "../../../helpers/urlHelper";
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../treeherder';
|
||||
import { getApiUrl } from '../../helpers/urlHelper';
|
||||
import { thRepoGroupOrder } from "../constants";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import angular from 'angular';
|
||||
import jsyaml from 'js-yaml';
|
||||
import { Queue, slugid } from 'taskcluster-client-web';
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
// TODO: Vet/fix the use-before-defines to ensure switching var
|
||||
// to let/const won't break anything (such as bug 1443667).
|
||||
|
||||
import _ from 'lodash';
|
||||
|
||||
import { thPlatformMap, thOptionOrder, thEvents } from '../constants';
|
||||
import { escapeId, getGroupMapKey } from '../../helpers/aggregateIdHelper';
|
||||
import treeherder from '../treeherder';
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/* eslint-disable no-use-before-define */
|
||||
|
||||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../treeherder';
|
||||
import { getStatus } from '../../helpers/jobHelper';
|
||||
import { thFailureResults, thDefaultFilterResultStates, thEvents } from "../constants";
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../treeherder';
|
||||
import tcJobActionsTemplate from '../../partials/main/tcjobactions.html';
|
||||
import { thPlatformMap } from '../constants';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../../treeherder';
|
||||
import { getApiUrl } from "../../../helpers/urlHelper";
|
||||
import { phTimeRanges } from "../../constants";
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../../treeherder';
|
||||
|
||||
treeherder.factory('math', [
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import treeherder from '../treeherder';
|
||||
import { thPinboardCountError, thEvents } from "../constants";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import { OIDCCredentialAgent, fromNow } from 'taskcluster-client-web';
|
||||
|
||||
const thTaskcluster = (() => {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import jsone from 'json-e';
|
||||
import { Queue } from 'taskcluster-client-web';
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import jsyaml from 'js-yaml';
|
||||
import { Queue, slugid } from 'taskcluster-client-web';
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import Mousetrap from 'mousetrap';
|
||||
|
||||
import treeherder from '../js/treeherder';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import angular from 'angular';
|
||||
|
||||
import treeherder from '../../js/treeherder';
|
||||
|
|
Загрузка…
Ссылка в новой задаче