Migrating away from legacy, missing filter
#1471
Replies: 1 comment 3 replies
-
Hi, thanks for the questions! 1 - Filters in new prompts (
|
Beta Was this translation helpful? Give feedback.
-
Hello, I'm trying to migrate to the new approach in the Lerna-Lite project that I maintain and I see that there's no
filter
anywhere which was available in the legacy question interface. So I'm not sure how I'm supposed to migrateBelow is the old code, so in Lerna-Lite (which the code came from Lerna), they created a
prompt.ts
(which can be found here: prompt.ts) as a wrapper to do simple things likepromptConfirmation
,promptSelectOne
andpromptTextInput
(the latter is the one I'm trying to migrate)what I have so far is like below but I'm not sure what to do with the missing
filter
and this is 2 examples of how it's being used in Lerna-Lite (same as Lerna)
and this other example
so I'd really like to migrate but... also why aren't the interfaces no longer exported? I would rather have the type available to properly add type to the arguments (it was available in v9 and lower but that seems to be gone in v10)
import { ListChoiceOptions, Question } from 'inquirer';
I guess I'll still upgrade to v10 but keep using the legacy approach until I get to know how to really migrate. Thanks for the great lib, the modern approach would be nice to migrate especially for the smaller footprint. Cheers
Beta Was this translation helpful? Give feedback.
All reactions