From dfbd5ae83079a909ab195cbcc63c17b63095f41f Mon Sep 17 00:00:00 2001 From: Matthias Osswald Date: Thu, 25 Jun 2026 09:46:25 +0200 Subject: [PATCH] feat(cli)!: Scope project/workspace yargs options per command The yargs options --config / -c, --dependency-definition, --workspace-config, and --workspace / -w were previously registered globally in base.js and shown in --help for every command. Several commands silently ignored them: * ui5 config / init / versions did not load a project at all * ui5 add / remove / use only operate on ui5.yaml without workspace context Move the option definitions into a new options.js helper module that exposes applyProjectConfigOptions() and applyWorkspaceOptions(). Each command builder now opts in to the option groups it actually consumes, and yargs' existing strict mode rejects the options on commands that no longer accept them. The shared last-value-wins dedupe coerce is exported as dedupeArray() so commands can apply it to their own non-global options (framework-version, dest, port, etc.) instead of relying on a central coerce list in base.js that referenced options yargs only sees per-command. BREAKING CHANGE: ui5 versions, ui5 init, and ui5 config no longer accept --config, --dependency-definition, --workspace, or --workspace-config. ui5 add, ui5 remove, and ui5 use no longer accept --workspace or --workspace-config. Passing any of these to a command that does not support them now fails with 'Unknown argument: