Skip to content

Commit

Permalink
remove LP deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Sep 2, 2020
1 parent 65ceb90 commit 3571a4f
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 490 deletions.
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.

76 changes: 0 additions & 76 deletions src/legacy/deprecation/deprecations/__tests__/unused.js

This file was deleted.

21 changes: 0 additions & 21 deletions src/legacy/deprecation/deprecations/index.js

This file was deleted.

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

This file was deleted.

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

This file was deleted.

Loading

0 comments on commit 3571a4f

Please sign in to comment.