You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bit validate used --all to validate all components. The related commands bit test and bit check-types use --unmodified for the same function. They show --all as deprecated.
This change makes bit validate consistent with them:
Add the --unmodified (-u) flag. Use it to validate all components, not only new and modified ones.
Keep --all (-a) as a deprecated alias. It shows a deprecation warning and behaves as --unmodified.
Deprecate bit validate --all in favor of --unmodified (with e2e coverage)
✨ Enhancement🧪 Tests🕐 10-20 Minutes
AI Description
• Add --unmodified/-u to validate all components, matching other CLI commands.
• Keep --all/-a as a deprecated alias that warns and maps to --unmodified.
• Extend e2e coverage to assert behavior and deprecation messaging for both flags.
The following are alternative approaches to this PR:
1. Hard switch: remove `--all` immediately
➕ Simplifies CLI surface area and reduces long-term maintenance
➖ Breaking change for existing scripts/users
➖ No migration runway or explicit guidance in output
2. Silent alias: keep `--all` without warning
➕ Zero noise for existing users and CI logs
➖ Does not guide users toward the standardized flag
➖ Inconsistent UX compared to bit test/bit check-types deprecation behavior
Recommendation: The chosen approach (introduce --unmodified, keep --all as a deprecated alias with a warning) is the best tradeoff: it aligns bit validate with related commands, preserves backward compatibility, and provides an explicit migration path via deprecation messaging and test coverage.
Files changed (2) +18 / -5
Enhancement (1) +11 / -4
validate.cmd.tsIntroduce '--unmodified' flag and deprecate '--all' for 'bit validate'+11/-4
Introduce '--unmodified' flag and deprecate '--all' for 'bit validate'
• Updates CLI help/extended description to prefer '--unmodified' for validating all components. Adds a new '--unmodified' ('-u') option and maps '--all' ('-a') to it while emitting a deprecation warning. Uses 'unmodified' when calling 'workspace.getComponentsByUserInput()' so selection matches other commands.
validate.e2e.tsAdd e2e coverage for '--unmodified' and deprecated '--all'+7/-1
Add e2e coverage for '--unmodified' and deprecated '--all'
• Renames the existing '--all' validation scenario to '--unmodified' and adds a new assertion that '--all' still works. Verifies the deprecation warning string is printed when '--all' is used.
The new bit validate --unmodified e2e test populates fresh components, which are already treated
as “new/modified”, so the same validation count would occur even without --unmodified. This
weakens regression coverage for the new flag and could allow a broken --unmodified implementation
to pass CI.
The test setup creates components that are “new/modified”, so default bit validate would select
them even without --unmodified, making the test assertion non-discriminating. The workspace
selector confirms that when all/unmodified is false and no pattern is provided, the selection is
newAndModified().
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
The `--unmodified` e2e test currently validates freshly populated components, which are included in the default (new+modified) set, so it doesn’t verify that `--unmodified` changes component selection.
### Issue Context
`Workspace.getComponentsByUserInput(all, pattern, ...)` returns `newAndModified()` when `all/unmodified` is false and no pattern is given.
### Fix Focus Areas
- e2e/harmony/validate.e2e.ts[114-129]
### Suggested fix
Update the scenario to include at least one *unmodified* component:
1. Populate 2 components.
2. Tag/snap them so the workspace has **no** new/modified components.
3. Assert `bit validate` (no flags) prints `No components found to validate`.
4. Assert `bit validate --unmodified` validates 2 components.
5. Keep the deprecated `--all` assertion, but run it against the same “clean workspace” setup so it proves `--all` maps to `--unmodified`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
2. consoleWarning for deprecation output 📘 Rule violation⚙ Maintainability
Description
The new --all deprecation message is emitted via logger.consoleWarning, which formats output
using logger-internal chalk/symbol behavior instead of the shared @teambit/cli output formatting
toolkit. This risks inconsistent CLI styling and violates the CLI output style guide requirement.
+ if (all) {+ unmodified = all;+ this.logger.consoleWarning(`--all is deprecated, use --unmodified instead`);+ }
Evidence
The style guide states CLI output should use the shared formatting toolkit from @teambit/cli. The
PR adds a new deprecation warning using this.logger.consoleWarning(...), and consoleWarning()
itself applies chalk coloring and routes through loader warning output rather than the
@teambit/cli formatter utilities.
CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Follow Style Guide and Use Shared Output Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols) scopes/defender/validator/validate.cmd.ts[51-54] scopes/harmony/cli/cli-output-style-guide.md[1-4] scopes/harmony/logger/logger.ts[153-169]
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
`bit validate` now prints a deprecation warning for `--all` using `this.logger.consoleWarning(...)`, which bypasses the shared CLI output formatting toolkit and may produce inconsistent styling.
## Issue Context
The repository CLI output style guide requires CLI output to use the shared formatting toolkit from `@teambit/cli` (e.g., `formatWarningSummary`, `warnSymbol`) rather than ad-hoc or logger-internal styling.
## Fix Focus Areas
- scopes/defender/validator/validate.cmd.ts[51-54]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
contrib/claude-skill-bit-cli/CLI_REFERENCE.md now documents only --unmodified for `bit
validate, but the command still supports --all` as a deprecated alias (with a warning). This makes
the reference inaccurate and can mislead users/tools that rely on this file for supported flags.
+validates components by running check-types, lint, and test commands in sequence. by default runs all checks even when errors are found. use --fail-fast to stop at the first failure. by default validates only new and modified components. use --unmodified to validate all components.+Flags: --unmodified, --fail-fast, --skip-tasks <string>
Evidence
The Claude-skill CLI reference was updated to only mention --unmodified, while the validate
command implementation still declares --all and explicitly handles it by mapping it to
unmodified and emitting a warning.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
`contrib/claude-skill-bit-cli/CLI_REFERENCE.md` lists `bit validate` flags as `--unmodified, --fail-fast, --skip-tasks`, but the implementation still supports `--all` as a deprecated alias. This doc should reflect that `--all` is still accepted (deprecated) to avoid misleading users/tools.
### Issue Context
The command implementation keeps `--all` and maps it to `--unmodified` while emitting a deprecation warning.
### Fix Focus Areas
- contrib/claude-skill-bit-cli/CLI_REFERENCE.md[983-989]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bit validateused--allto validate all components. The related commandsbit testandbit check-typesuse--unmodifiedfor the same function. They show--allas deprecated.This change makes
bit validateconsistent with them:--unmodified(-u) flag. Use it to validate all components, not only new and modified ones.--all(-a) as a deprecated alias. It shows a deprecation warning and behaves as--unmodified.