fix: replace unmaintained interact package#449
Open
Gurleen-kansray wants to merge 1 commit into
Open
Conversation
…ts implementation Removes the interact -> dart_console dependency chain that pinned intl to ^0.17.0/^0.18.0, which conflicted with intl 0.20.x required by current Flutter stable / flutter_localizations. Adds a minimal internal replacement (Confirm, Select, MultiSelect, Input, Spinner) with no external dependencies. Fixes invertase#447
1 task
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
flutterfire_clidepended on the unmaintainedinteractpackage (last released 3 years ago) for CLI prompts (Confirm, Select, MultiSelect, Input, Spinner).interactpinsdart_console ^1.1.2, which in turn constrainsintlto^0.17.0/^0.18.0. This conflicts withintl 0.20.x, which is required by current Flutter stable viaflutter_localizations, makingflutterfire_cliimpossible to add as adev_dependencyin any modern Flutter project without a dependency override.This PR removes
interactentirely and replaces its usage with a small, dependency-free internal implementation (lib/src/common/prompts.dart) covering the same five primitives actually used in the codebase:Confirm->promptConfirmSelect->promptSelectIndexMultiSelect->promptMultiSelectIndicesInput(+ validation) ->promptText/ValidationErrorSpinner->textSpinner/SpinnerHandleThe new implementation uses only
dart:ioanddart:async— no third-party packages — so there's no risk of this recurring with futureintlbumps. It preserves arrow-key/space-bar interactive behavior in a terminal, and falls back to numbered/comma-separated input when stdin isn't a terminal (e.g. CI).Verified
intl ^0.20.2(the version required by current Flutter stable) resolves cleanly as a direct dependency alongsideflutterfire_cliafter this change, reproducing and confirming the fix for the exactversion solving failederror reported in #447.dart analyzeand the existing test suite pass (pre-existing test failures are unrelated — they require theflutterfire/flutterexecutables onPATH, not present in this environment).Fixes #447
Type of Change
fix-- Bug fix (non-breaking change which fixes an issue)