Skip to content

Commit

Permalink
Changing import/require to @elastic/lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
kobelb committed Sep 24, 2018
1 parent ad62a0d commit c3a6602
Show file tree
Hide file tree
Showing 1,509 changed files with 1,517 additions and 1,517 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';

export default function(val) {
return `test second: ${_.upperCase(val)}`;
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-test/src/es/es_test_cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import { resolve } from 'path';
import { format } from 'url';
import { get } from 'lodash';
import toPath from 'lodash/internal/toPath';
import { get } from '@elastic/lodash';
import toPath from '@elastic/lodash/internal/toPath';
import { Cluster } from '@kbn/es';
import { esTestConfig } from './es_test_config';
import { rmrfSync } from './rmrf_sync';
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-ui-framework/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const sass = require('node-sass');
const postcss = require('postcss');
const postcssConfig = require('../../src/optimize/postcss.config');
const chokidar = require('chokidar');
const debounce = require('lodash/function/debounce');
const debounce = require('@elastic/lodash/function/debounce');

const platform = require('os').platform();
const isPlatformWindows = /^win/.test(platform);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import React from 'react';
import PropTypes from 'prop-types';

import _ from 'lodash';
import _ from '@elastic/lodash';

import { KuiListingTableToolBar } from './listing_table_tool_bar';
import { KuiListingTableToolBarFooter } from './listing_table_tool_bar_footer';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import React from 'react';
import PropTypes from 'prop-types';

import _ from 'lodash';
import _ from '@elastic/lodash';

import {
KuiTableRow,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';

/**
* @typedef {Object} SortableProperty
Expand Down
2 changes: 1 addition & 1 deletion src/cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';
import { pkg } from '../utils';
import Command from './command';
import serveCommand from './serve/serve';
Expand Down
2 changes: 1 addition & 1 deletion src/cli/cluster/__mocks__/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/* eslint-env jest */

import EventEmitter from 'events';
import { assign, random } from 'lodash';
import { assign, random } from '@elastic/lodash';
import { delay } from 'bluebird';

class MockClusterFork extends EventEmitter {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/cluster/cluster_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { resolve } from 'path';
import { debounce, invoke, bindAll, once, uniq } from 'lodash';
import { debounce, invoke, bindAll, once, uniq } from '@elastic/lodash';
import { fromEvent, race } from 'rxjs';
import { first } from 'rxjs/operators';

Expand Down
2 changes: 1 addition & 1 deletion src/cli/cluster/cluster_manager.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jest.mock('readline', () => ({
}));

import cluster from 'cluster';
import { sample } from 'lodash';
import { sample } from '@elastic/lodash';

import ClusterManager from './cluster_manager';
import Worker from './worker';
Expand Down
2 changes: 1 addition & 1 deletion src/cli/cluster/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';
import cluster from 'cluster';
import { EventEmitter } from 'events';

Expand Down
2 changes: 1 addition & 1 deletion src/cli/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';

import help from './help';
import { Command } from 'commander';
Expand Down
2 changes: 1 addition & 1 deletion src/cli/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';

export default function help(command, spaces) {
if (!_.size(command.commands)) {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';

const log = _.restParam(function (color, label, rest1) {
console.log.apply(console, [color(` ${_.trim(label)} `)].concat(rest1));
Expand Down
2 changes: 1 addition & 1 deletion src/cli/serve/read_keystore.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import path from 'path';
import { set } from 'lodash';
import { set } from '@elastic/lodash';

import { Keystore } from '../../server/keystore';
import { getData } from '../../server/path';
Expand Down
2 changes: 1 addition & 1 deletion src/cli/serve/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';
import { statSync, lstatSync, realpathSync } from 'fs';
import { resolve } from 'path';

Expand Down
2 changes: 1 addition & 1 deletion src/cli_plugin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';
import { pkg } from '../utils';
import Command from '../cli/command';
import listCommand from './list';
Expand Down
2 changes: 1 addition & 1 deletion src/cli_plugin/install/rename.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { rename } from 'fs';
import { delay } from 'lodash';
import { delay } from '@elastic/lodash';

export function renamePlugin(workingPath, finalPath) {
return new Promise(function (resolve, reject) {
Expand Down
2 changes: 1 addition & 1 deletion src/cli_plugin/install/zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import yauzl from 'yauzl';
import path from 'path';
import mkdirp from 'mkdirp';
import { createWriteStream } from 'fs';
import { get } from 'lodash';
import { get } from '@elastic/lodash';

/**
* Returns an array of package objects. There will be one for each of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { get } from 'lodash';
import { get } from '@elastic/lodash';
import { UiSettingsState } from '../ui_settings';
import { deepFreeze } from './deep_freeze';

Expand Down
2 changes: 1 addition & 1 deletion src/core/public/ui_settings/ui_settings_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { cloneDeep, defaultsDeep } from 'lodash';
import { cloneDeep, defaultsDeep } from '@elastic/lodash';
import { Subject } from 'rxjs';

import { UiSettingsState } from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/config/config_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { isEqual } from 'lodash';
import { isEqual } from '@elastic/lodash';
import { Observable } from 'rxjs';
import { distinctUntilChanged, first, map } from 'rxjs/operators';

Expand Down
2 changes: 1 addition & 1 deletion src/core/server/config/object_to_config_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { cloneDeep, get, has, set } from 'lodash';
import { cloneDeep, get, has, set } from '@elastic/lodash';

import { Config, ConfigPath } from './';

Expand Down
2 changes: 1 addition & 1 deletion src/core/server/config/raw_config_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { cloneDeep, isEqual, isPlainObject } from 'lodash';
import { cloneDeep, isEqual, isPlainObject } from '@elastic/lodash';
import { Observable, ReplaySubject } from 'rxjs';
import { distinctUntilChanged, map } from 'rxjs/operators';
import typeDetect from 'type-detect';
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/config/read_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { readFileSync } from 'fs';
import { safeLoad } from 'js-yaml';

import { isPlainObject, set } from 'lodash';
import { isPlainObject, set } from '@elastic/lodash';
import { ensureDeepObject } from './ensure_deep_object';

const readYaml = (path: string) => safeLoad(readFileSync(path, 'utf8'));
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/config/schema/internals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
ValidationErrorItem,
ValidationOptions,
} from 'joi';
import { isPlainObject } from 'lodash';
import { isPlainObject } from '@elastic/lodash';
import { isDuration } from 'moment';
import { ByteSizeValue, ensureByteSizeValue } from '../byte_size_value';
import { ensureDuration } from '../duration';
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/base_path_proxy_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { Server } from 'hapi-latest';
import { Agent as HttpsAgent, ServerOptions as TlsOptions } from 'https';
import { sample } from 'lodash';
import { sample } from '@elastic/lodash';
import { ByteSizeValue } from '../config/schema';
import { DevConfig } from '../dev';
import { Logger } from '../logging';
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/http_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jest.mock('./http_server', () => ({
HttpServer: mockHttpServer,
}));

import { noop } from 'lodash';
import { noop } from '@elastic/lodash';
import { BehaviorSubject } from 'rxjs';
import { HttpConfig, HttpService, Router } from '.';
import { logger } from '../logging/__mocks__';
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/console/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { Deprecations } from '../../../deprecation';
import expect from 'expect.js';
import index from '../index';
import { noop } from 'lodash';
import { noop } from '@elastic/lodash';
import sinon from 'sinon';

describe('plugins/console', function () {
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/console/api_server/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';

class Api {
constructor(name) {
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/console/api_server/es_6_0/mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

const _ = require('lodash');
const _ = require('@elastic/lodash');

const BOOLEAN = {
__one_of: [true, false],
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/console/api_server/es_6_0/query/dsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';
import {
spanFirstTemplate,
spanNearTemplate,
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/console/api_server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';

export function resolveApi(senseVersion, apis, reply) {
const result = {};
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/console/api_server/spec/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import glob from 'glob';
import { join, basename } from 'path';
import { readFileSync } from 'fs';
import { merge } from 'lodash';
import { merge } from '@elastic/lodash';

const extensionSpecFilePaths = [];
function _getSpec(dirname = __dirname) {
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/console/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import Boom from 'boom';
import { resolveApi } from './api_server/server';
import { resolve, join, sep } from 'path';
import { has, isEmpty } from 'lodash';
import { has, isEmpty } from '@elastic/lodash';
import setHeaders from '../elasticsearch/lib/set_headers';
import { addExtensionSpecFilePath } from './api_server/spec';

Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/console/public/src/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
import utils from './utils';
import { populateContext } from './autocomplete/engine';
import { URL_PATH_END_MARKER } from './autocomplete/components';
import _ from 'lodash';
import _ from '@elastic/lodash';
import ace from 'brace';
import 'brace/ext/language_tools';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

const _ = require('lodash');
const _ = require('@elastic/lodash');
import { WalkingState, walkTokenPath, wrapComponentWithDefaults } from './engine';
import {
ConstantComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import _ from 'lodash';
import _ from '@elastic/lodash';
import { SharedComponent } from './shared_component';
export const URL_PATH_END_MARKER = '__url_path_end__';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';
import { SharedComponent } from './shared_component';
export class ConstantComponent extends SharedComponent {
constructor(name, parent, options) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import _ from 'lodash';
import _ from '@elastic/lodash';
import mappings from '../../mappings';
import { ListComponent } from './list_component';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';
import { SharedComponent } from './shared_component';
export class IdAutocompleteComponent extends SharedComponent {
constructor(name, parent, multi) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import _ from 'lodash';
import _ from '@elastic/lodash';
import mappings from '../../mappings';
import { ListComponent } from './list_component';
function nonValidIndexType(token) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';
import { SharedComponent } from './shared_component';
/** A component that suggests one of the give options, but accepts anything */
export class ListComponent extends SharedComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import _ from 'lodash';
import _ from '@elastic/lodash';
import { SharedComponent } from '.';
/**
* @param constants list of components that represent constant keys
Expand Down
Loading

0 comments on commit c3a6602

Please sign in to comment.