Skip to content

Bump all codegen devs to latest#1387

Draft
eddeee888 wants to merge 45 commits intomainfrom
bump-codegen-deps
Draft

Bump all codegen devs to latest#1387
eddeee888 wants to merge 45 commits intomainfrom
bump-codegen-deps

Conversation

@eddeee888
Copy link
Collaborator

@eddeee888 eddeee888 commented Mar 4, 2026

Description

This repo has some old devDeps in packages. This PR updates them all to the latest.
Depending on the use case, some may have breaking changes.

Changes

  1. Migrate all packages to Vitest, to modernise and integrate with @graphql-codegen/testing v4
    • Except for @graphql-codegen/flow, @graphql-codegen/flow-operations and @graphql-codegen/flow-resolvers packages because they depend on a CJS built flow.js file, and I don't know where it comes from
  2. Bump all @graphql-codegen/plugin-helpers to ^6.0.0 and @graphql-codegen/visitor-plugin-common to ^6.0.0
    • Except for @graphql-codegen/flow, @graphql-codegen/flow-operations and @graphql-codegen/flow-resolvers because they cannot be tested (See 1.)
    • Except for @graphql-codegen/typescript-nest and @graphql-codegen/typescript-type-graphql because it's too hard to fix the tests
  3. Bump all packages with changes in 1. and 2. a major version as there are lots of changes in the shared packages
    • Except for @graphql-codegen/typescript-react-apollo as we have plans to deprecate it. Releasing a major right now may give the wrong signal to users

@changeset-bot
Copy link

changeset-bot bot commented Mar 4, 2026

🦋 Changeset detected

Latest commit: d1b4ed0

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

This PR includes changesets to release 39 packages
Name Type
@graphql-codegen/typescript-react-apollo Patch
@graphql-codegen/urql-svelte-operations-store Major
@graphql-codegen/named-operations-object Major
@graphql-codegen/typescript-apollo-client-helpers Major
@graphql-codegen/typescript-graphql-files-modules Major
@graphql-codegen/typescript-vue-apollo-smart-ops Major
@graphql-codegen/typescript-react-offix Major
@graphql-codegen/c-sharp-operations Major
@graphql-codegen/typescript-graphql-request Major
@graphql-codegen/typescript-urql-graphcache Major
@graphql-codegen/typescript-apollo-angular Major
@graphql-codegen/typescript-graphql-apollo Major
@graphql-codegen/typescript-stencil-apollo Major
@graphql-codegen/urql-introspection Major
@graphql-codegen/hasura-allow-list Major
@graphql-codegen/c-sharp-common Major
@graphql-codegen/typescript-generic-sdk Major
@graphql-codegen/typescript-react-query Major
@graphql-codegen/typescript-solid-query Major
@graphql-codegen/typescript-enum-array Major
@graphql-codegen/typescript-vue-apollo Major
@graphql-codegen/flutter-freezed Major
@graphql-codegen/typescript-rtk-query Major
@graphql-codegen/java-apollo-android Major
@graphql-codegen/typescript-vue-urql Major
@graphql-codegen/near-operation-file-preset Major
@graphql-codegen/typescript-jit-sdk Major
@graphql-codegen/typescript-mongodb Major
@graphql-codegen/typescript-nhost Major
@graphql-codegen/typescript-oclif Major
@graphql-codegen/c-sharp Major
@graphql-codegen/typescript-urql Major
@graphql-codegen/java-resolvers Major
@graphql-codegen/typescript-msw Major
@graphql-codegen/import-types-preset Major
@graphql-codegen/java-common Major
@graphql-codegen/kotlin Major
@graphql-codegen/jsdoc Major
@graphql-codegen/java Major

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

@dargmuesli
Copy link
Contributor

Thank you for your maintenance @eddeee888, much love! ❤️

@eddeee888 eddeee888 force-pushed the bump-codegen-deps branch 2 times, most recently from 8f2be4e to 4e18a96 Compare March 6, 2026 11:47
Comment on lines +162 to +163
baseType: this.scalars[schemaType.name].input,
typeName: this.scalars[schemaType.name].input,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are best guess based on function name. If something's wrong, happy to change!

Comment on lines +157 to +158
baseType: this.scalars[schemaType.name].input,
typeName: this.scalars[schemaType.name].input,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are best guess based on function name. If something's wrong, happy to change!

Comment on lines +78 to +79
if (this.scalars[type.name.value]?.output) {
return this.scalars[type.name.value].output;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are best guess based on function name. If something's wrong, happy to change!


const transformScalar = (scalar: string) => {
if (DEFAULT_SCALARS[scalar] === undefined) {
if (DEFAULT_SCALARS[scalar]?.output === undefined) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are best guess based on function name. If something's wrong, happy to change!

Comment on lines -43 to -59
it('should import DocumentNode when using noGraphQLTag', async () => {
const docs = [{ location: '', document: basicDoc }];
const content = (await plugin(
schema,
docs,
{
noGraphQLTag: true,
},
{
outputFile: 'graphql.tsx',
},
)) as Types.ComplexPluginOutput;

expect(content.prepend).toContain(`import { DocumentNode } from 'graphql';`);
expect(content.prepend).not.toContain(`import gql from 'graphql-tag';`);
await validateTypeScript(content, schema, docs, {});
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

noGraphQLTag has been deprecated so no need for this test

@eddeee888 eddeee888 force-pushed the bump-codegen-deps branch from 1840300 to d1b4ed0 Compare March 6, 2026 12:24
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.

2 participants