Skip to content

Skip invalid plugins entries for help and plugin commands#398

Merged
GrahamCampbell merged 1 commit into
4.xfrom
tolerate-invalid-plugin-entries
Jun 12, 2026
Merged

Skip invalid plugins entries for help and plugin commands#398
GrahamCampbell merged 1 commit into
4.xfrom
tolerate-invalid-plugin-entries

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Contributor

Since #395, an invalid plugins entry in serverless.yml fails initialization before any command runs. That is the right default, but it also affects the two contexts that were already lenient about plugins that are listed in the configuration without being installed: printing help and running the plugin management commands. In particular, a broken entry such as serverless-webpack@1.2.3 made it impossible to run serverless plugin uninstall, because the command failed on the very configuration it is meant to fix, leaving hand-editing the file as the only way out.

This change reuses the existing leniency rule instead of introducing a new one. parsePluginsObject gains a tolerateInvalidEntries option that drops invalid entries with a warning instead of throwing, and resolveServicePlugins enables it under exactly the condition that already skips plugins failing with PLUGIN_NOT_FOUND: when help is requested or when the current command is help or plugin. Everywhere else the validation continues to fail hard, the packaging code path keeps the strict default, and the upgrade guide now mentions the softer behavior in its section on plugins validation.

@GrahamCampbell GrahamCampbell merged commit fd166d9 into 4.x Jun 12, 2026
8 checks passed
@GrahamCampbell GrahamCampbell deleted the tolerate-invalid-plugin-entries branch June 12, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant