Skip to content

fix: replace unmaintained interact package#449

Open
Gurleen-kansray wants to merge 1 commit into
invertase:mainfrom
Gurleen-kansray:fix/replace-interact-dependency
Open

fix: replace unmaintained interact package#449
Gurleen-kansray wants to merge 1 commit into
invertase:mainfrom
Gurleen-kansray:fix/replace-interact-dependency

Conversation

@Gurleen-kansray

Copy link
Copy Markdown

Description

flutterfire_cli depended on the unmaintained interact package (last released 3 years ago) for CLI prompts (Confirm, Select, MultiSelect, Input, Spinner). interact pins dart_console ^1.1.2, which in turn constrains intl to ^0.17.0/^0.18.0. This conflicts with intl 0.20.x, which is required by current Flutter stable via flutter_localizations, making flutterfire_cli impossible to add as a dev_dependency in any modern Flutter project without a dependency override.

This PR removes interact entirely 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 -> promptConfirm
  • Select -> promptSelectIndex
  • MultiSelect -> promptMultiSelectIndices
  • Input (+ validation) -> promptText / ValidationError
  • Spinner -> textSpinner / SpinnerHandle

The new implementation uses only dart:io and dart:async — no third-party packages — so there's no risk of this recurring with future intl bumps. 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 alongside flutterfire_cli after this change, reproducing and confirming the fix for the exact version solving failed error reported in #447. dart analyze and the existing test suite pass (pre-existing test failures are unrelated — they require the flutterfire/flutter executables on PATH, not present in this environment).

Fixes #447

Type of Change

  • 🛠️ fix -- Bug fix (non-breaking change which fixes an issue)

…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
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.

request: Replace the unmaintained interact package

1 participant