Skip to content

Bump inquirer and improve related tests#10651

Merged
eddeee888 merged 7 commits intomaster-nextfrom
master-next-bump-inquirer
Mar 22, 2026
Merged

Bump inquirer and improve related tests#10651
eddeee888 merged 7 commits intomaster-nextfrom
master-next-bump-inquirer

Conversation

@eddeee888
Copy link
Collaborator

Description

This PR bumps @inquirer/prompts from v7 to v8 in @graphql/condegen/cli package and fixes tests

Related #10496

@changeset-bot
Copy link

changeset-bot bot commented Mar 22, 2026

🦋 Changeset detected

Latest commit: 14d2207

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphql-codegen/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 22, 2026

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-codegen/cli 7.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/core 6.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/add 7.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/fragment-matcher 7.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/introspection 6.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/schema-ast 6.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/time 7.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/visitor-plugin-common 7.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-document-nodes 6.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/gql-tag-operations 6.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-operations 6.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-resolvers 6.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/typed-document-node 7.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript 6.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/client-preset 6.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/graphql-modules-preset 6.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/testing 5.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎
@graphql-codegen/plugin-helpers 7.0.0-alpha-20260322132510-14d22072d7f8a2b88050538ae695ec8c3a7b4bce npm ↗︎ unpkg ↗︎

@eddeee888 eddeee888 changed the title Bump inquirer Bump inquirer and improve related tests Mar 22, 2026
@@ -1,5 +1,5 @@
import { resolve } from 'path';
import bddStdin from 'bdd-stdin';
import { screen } from '@inquirer/testing/vitest';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@inquirer/testing allows us to test exactly what's shown in the terminal, which is nicer than bdd-stdin!

Furthermore, with bdd-stdin, we need custom "typing" and "key press" mapping.

it('should guess vue projects', () => {
vol.fromJSON({ ['package.json']: packageJson.withVue }, process.cwd());
const targets = await guessTargets();
const targets = guessTargets();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guessTargets is now sync (it never needed to be async)

generates: {
"src/gql/": {
preset: "client",
plugins: []
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plugins is not needed when setting up this client preset. I'll come back in another PR to fix it.

"devDependencies": {
"@graphql-codegen/cli": "1.0.0",
"@graphql-codegen/typescript": "1.0.0",
"@graphql-codegen/typescript-operations": "1.0.0",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unfamiliar with the stencil plugin requirements...
But most likely we won't need typescript? 🤔
Will check and fix in another PR

@eddeee888 eddeee888 marked this pull request as ready for review March 22, 2026 13:29
@eddeee888 eddeee888 merged commit 5412890 into master-next Mar 22, 2026
17 checks passed
@eddeee888 eddeee888 deleted the master-next-bump-inquirer branch March 22, 2026 13:30
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