Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Remove missing CLI options schema deprecation #10001

Merged
merged 1 commit into from
Sep 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions lib/cli/commands-schema/resolve-final.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ const serviceCommands = require('./service');
const awsServiceCommands = require('./aws-service');
const serviceOptions = require('./common-options/service');
const awsServiceOptions = require('./common-options/aws-service');
const logDeprecation = require('../../utils/logDeprecation');
const { logWarning } = require('../../classes/Error');

const deprecatedEventPattern = /^deprecated#(.*?)(?:->(.*?))?$/;

module.exports = (loadedPlugins, { providerName, configuration }) => {
module.exports = (loadedPlugins, { providerName }) => {
const commands = new Map(providerName === 'aws' ? awsServiceCommands : serviceCommands);

if (providerName !== 'aws') {
Expand Down Expand Up @@ -112,18 +112,15 @@ module.exports = (loadedPlugins, { providerName, configuration }) => {
for (const loadedPlugin of loadedPlugins) resolveCommands(loadedPlugin, loadedPlugin);

if (missingOptionTypes.size) {
logDeprecation(
'CLI_OPTIONS_SCHEMA',
logWarning(
'CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). ' +
'Below listed plugins do not predefine type for introduced options:\n' +
` - ${Array.from(
missingOptionTypes,
([plugin, optionNames]) =>
`${plugin.constructor.name} for "${Array.from(optionNames).join('", "')}"`
).join('\n - ')}\n` +
'Please report this issue in plugin issue tracker.\n' +
'Starting with next major release, this will be communicated with a thrown error.',
{ serviceConfig: configuration }
).join('\n - ')}\n\n` +
'Please report this issue in plugin issue tracker.'
);
}

Expand Down