Skip to content

Commit

Permalink
Merge branch 'master' into nls/no-use-location
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Sep 4, 2020
2 parents 23a6c9b + 8276afd commit befb7bc
Show file tree
Hide file tree
Showing 410 changed files with 12,617 additions and 4,277 deletions.
Binary file modified docs/visualize/images/lens_drag_drop.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"**/istanbul-instrumenter-loader/schema-utils": "1.0.0",
"**/image-diff/gm/debug": "^2.6.9",
"**/load-grunt-config/lodash": "^4.17.20",
"**/node-jose/node-forge": "^0.10.0",
"**/react-dom": "^16.12.0",
"**/react": "^16.12.0",
"**/react-test-renderer": "^16.12.0",
Expand Down Expand Up @@ -191,7 +192,7 @@
"moment-timezone": "^0.5.27",
"mustache": "2.3.2",
"node-fetch": "1.7.3",
"node-forge": "^0.9.1",
"node-forge": "^0.10.0",
"opn": "^5.5.0",
"oppsy": "^2.0.0",
"p-map": "^4.0.0",
Expand Down Expand Up @@ -305,7 +306,7 @@
"@types/moment-timezone": "^0.5.12",
"@types/mustache": "^0.8.31",
"@types/node": ">=10.17.17 <10.20.0",
"@types/node-forge": "^0.9.0",
"@types/node-forge": "^0.9.5",
"@types/normalize-path": "^3.0.0",
"@types/opn": "^5.1.0",
"@types/pegjs": "^0.10.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ exports.getWebpackConfig = function (kibanaPath) {
mainFields: ['browser', 'main'],
modules: ['node_modules', resolve(kibanaPath, 'node_modules')],
alias: {
// Kibana defaults https://github.com/elastic/kibana/blob/6998f074542e8c7b32955db159d15661aca253d7/src/legacy/ui/ui_bundler_env.js#L30-L36
ui: resolve(kibanaPath, 'src/legacy/ui/public'),

// Dev defaults for test bundle https://github.com/elastic/kibana/blob/6998f074542e8c7b32955db159d15661aca253d7/src/core_plugins/tests_bundle/index.js#L73-L78
ng_mock$: resolve(kibanaPath, 'src/test_utils/public/ng_mock'),
fixtures: resolve(kibanaPath, 'src/fixtures'),
test_utils: resolve(kibanaPath, 'src/test_utils/public'),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { ToolingLog } from '@kbn/dev-utils';
import { defaultsDeep } from 'lodash';

import { Config } from './config';
import { transformDeprecations } from './transform_deprecations';

const cache = new WeakMap();

Expand Down Expand Up @@ -52,8 +51,7 @@ async function getSettingsFromFile(log: ToolingLog, path: string, settingOverrid
await cache.get(configProvider)!
);

const logDeprecation = (error: string | Error) => log.error(error);
return transformDeprecations(settingsWithDefaults, logDeprecation);
return settingsWithDefaults;
}

export async function readConfigFile(log: ToolingLog, path: string, settingOverrides: any = {}) {
Expand Down

This file was deleted.

30 changes: 0 additions & 30 deletions src/core/server/legacy/config/get_unused_config_keys.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,34 +217,4 @@ describe('getUnusedConfigKeys', () => {
})
).toEqual([]);
});

describe('using deprecation', () => {
it('should use the plugin deprecations provider', async () => {
expect(
await getUnusedConfigKeys({
coreHandledConfigPaths: [],
pluginSpecs: [
({
getDeprecationsProvider() {
return async ({ rename }: any) => [rename('foo1', 'foo2')];
},
getConfigPrefix: () => 'foo',
} as unknown) as LegacyPluginSpec,
],
disabledPluginSpecs: [],
settings: {
foo: {
foo: 'dolly',
foo1: 'bar',
},
},
legacyConfig: getConfig({
foo: {
foo2: 'bar',
},
}),
})
).toEqual(['foo.foo']);
});
});
});
20 changes: 1 addition & 19 deletions src/core/server/legacy/config/get_unused_config_keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
* under the License.
*/

import { set } from '@elastic/safer-lodash-set';
import { difference, get } from 'lodash';
// @ts-expect-error
import { getTransform } from '../../../../legacy/deprecation/index';
import { difference } from 'lodash';
import { unset } from '../../../../legacy/utils';
import { getFlattenedObject } from '../../../utils';
import { hasConfigPathIntersection } from '../../config';
Expand All @@ -41,21 +38,6 @@ export async function getUnusedConfigKeys({
settings: LegacyVars;
legacyConfig: LegacyConfig;
}) {
// transform deprecated plugin settings
for (let i = 0; i < pluginSpecs.length; i++) {
const spec = pluginSpecs[i];
const transform = await getTransform(spec);
const prefix = spec.getConfigPrefix();

// nested plugin prefixes (a.b) translate to nested objects
const pluginSettings = get(settings, prefix);
if (pluginSettings) {
// flattened settings are expected to be converted to nested objects
// a.b = true => { a: { b: true }}
set(settings, prefix, transform(pluginSettings));
}
}

// remove config values from disabled plugins
for (const spec of disabledPluginSpecs) {
unset(settings, spec.getConfigPrefix());
Expand Down
59 changes: 0 additions & 59 deletions src/legacy/deprecation/__tests__/create_transform.js

This file was deleted.

33 changes: 0 additions & 33 deletions src/legacy/deprecation/create_transform.js

This file was deleted.

83 changes: 0 additions & 83 deletions src/legacy/deprecation/deprecations/__tests__/rename.js

This file was deleted.

Loading

0 comments on commit befb7bc

Please sign in to comment.