github cloudposse/atmos v1.228.0-rc.3

pre-release4 hours ago

🚀 Enhancements

fix(commands): rename semantic_type to provides for custom command args/flags @osterman (#2964) ## what
  • Add a provides: field to custom-command arguments: and flags:, replacing the two inconsistent spellings of the same "this value provides the component/stack name" concept: type: component/type: stack on arguments, and semantic_type: component/semantic_type: stack on flags.
  • Deprecate Type (on CommandArgument) and SemanticType (on CommandFlag) via the existing jsonschema_extras deprecation pattern (schema marks them deprecated with x-atmos-replacement: provides), with a new EffectiveProvides() helper so existing configs using the old fields keep working unchanged.
  • Regenerate the committed JSON Schema and update docs (arguments.mdx, flags.mdx, component.mdx, custom.mdx), the examples/custom-components/ fixture, and the atmos-modernization skill's legacy-pattern checklist.

why

  • semantic_type existed only on CommandFlag because Flag.Type was already used for the flag's data type (string/bool); CommandArgument.Type carried the identical role under a different name purely because arguments don't have a competing data-type field. Same concept, two field names, driven by an implementation detail rather than a naming decision.
  • provides: uses one consistent field name on both arguments and flags, and matches the wording the docs already used to describe the behavior in prose ("this flag provides the stack name").
  • This field shipped in a prior release (custom component types, #1904), so the rename is backward-compatible: old configs keep working, marked deprecated, rather than breaking on upgrade.

references

N/A

Summary by CodeRabbit

  • New Features

    • Added provides configuration for identifying component and stack values in command arguments and flags.
    • Updated completion and value resolution to use the new metadata.
  • Bug Fixes

    • Preserved compatibility with existing type and semantic_type configurations, with the new provides value taking precedence.
  • Documentation

    • Updated command configuration guides and examples to use provides.
    • Marked legacy configuration fields as deprecated while documenting continued support.

Don't miss a new atmos release

NewReleases is sending notifications on new releases.