Skip to content

fix: keep selected plugins when installing a BoM#452

Open
josh-burton wants to merge 1 commit into
invertase:mainfrom
josh-burton:fix/bom-plugins-removed-bug
Open

fix: keep selected plugins when installing a BoM#452
josh-burton wants to merge 1 commit into
invertase:mainfrom
josh-burton:fix/bom-plugins-removed-bug

Conversation

@josh-burton

Copy link
Copy Markdown
Contributor

Description

Fixes flutterfire install selecting the wrong plugins when installing a FlutterFire BoM.

The plugin prompt filters out packages unavailable in the selected BoM, but the selected indexes were being applied to the full plugin list. This shifted later selections,
causing selected plugins to be removed and other plugins to be installed instead.

Changes

  • Map prompt selections against the filtered list shown to the user.
  • Allow flags alongside a positional BoM version.
  • Ensure an install-specific --version is not treated as a request for the FlutterFire CLI version.
  • Add regression tests for plugin selection and version argument handling.

Testing

  • Added four regression tests.
  • Focused Dart analysis passes with no issues.

Type of Change

  • feat -- New feature (non-breaking change which adds functionality)
  • [ x] 🛠️ fix -- Bug fix (non-breaking change which fixes an issue)
  • ! -- Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 refactor -- Code refactor
  • ci -- Build configuration change
  • 📝 docs -- Documentation
  • 🗑️ chore -- Chore

The install prompt hides plugins that are not available in the selected BoM, but it used indexes from the full plugin list when reading the user's choices. This shifted later selections to different plugins, causing selected plugins to be removed and unselected plugins to be installed.

Use the filtered plugin list when reading prompt selections. Also allow install flags alongside a positional BoM version and prevent an install-specific --version option from being handled as a request for the FlutterFire CLI version.
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