[serverless] Migrate to @inquirer/prompts and remove inquirer-checkbox-plus-prompt#2255
Closed
Drarig29 wants to merge 4 commits into
Closed
[serverless] Migrate to @inquirer/prompts and remove inquirer-checkbox-plus-prompt#2255Drarig29 wants to merge 4 commits into
@inquirer/prompts and remove inquirer-checkbox-plus-prompt#2255Drarig29 wants to merge 4 commits into
Conversation
@inquirer/prompts and remove inquirer-checkbox-plus-prompt
ava-silver
reviewed
May 18, 2026
Contributor
There was a problem hiding this comment.
any way we can avoid handwriting the types here? this feels like itll quickly become a problem to update in the future
Comment on lines
+102
to
+110
| // eslint-disable-next-line @typescript-eslint/no-implied-eval -- TypeScript rewrites plain `import()` to `require()` in our CommonJS emit. | ||
| const importInquirerModule = new Function('specifier', 'return import(specifier)') as ( | ||
| specifier: string | ||
| ) => Promise<unknown> | ||
|
|
||
| // Preserve a real runtime dynamic import so Node can load the ESM-only prompt package from CommonJS output. | ||
| export const loadPrompts = () => importInquirerModule('@inquirer/prompts') as Promise<InquirerPrompts> | ||
|
|
||
| export const loadCore = () => importInquirerModule('@inquirer/core') as Promise<InquirerCore> |
Contributor
There was a problem hiding this comment.
is this needed because we emit commonjs and the new inquirer package is esm only? if so, I'd love to discuss with the guild what it would take to migrate our package from commonjs to esm since it seems like that's the future of the ecosystem
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.
What and why?
This PR migrates our interactive prompt handling from the legacy
inquirerpackage to@inquirer/promptsand removesinquirer-checkbox-plus-prompt. The rewritten prompt stack is ESM-only, so this also adds a small runtime loader that keeps prompt usage compatible with the repo's current CommonJS build. As a side effect, removing the old prompt packages drops one directlodashpath from the runtime dependency graph.How?
packages/base,packages/plugin-lambda, andpackages/plugin-cloud-runwith@inquirer/promptshelpers.inquirer-checkbox-plus-prompt.@inquirer/prompts,glob, andtsdownbecause they are used through dynamic/runtime tooling paths that Knip does not statically resolve.LICENSE-3rdparty.csv, andyarn.lockto match the migration.yarn lint:packages,yarn lint:all,yarn tsc:build,JEST_USE_WATCHMAN=0 yarn test --watchman=false packages/base/src/helpers/__tests__/prompt.test.ts packages/plugin-lambda/src/__tests__/prompt.test.ts, andnode bin/check-licenses.js.Review checklist