Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update graphqlcodegenerator monorepo (major) #145

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 6, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@graphql-codegen/add (source) ^3.1.1 -> ^5.0.0 age adoption passing confidence
@graphql-codegen/cli (source) ^2.6.2 -> ^5.0.0 age adoption passing confidence
@graphql-codegen/introspection (source) ^2.1.1 -> ^4.0.0 age adoption passing confidence
@graphql-codegen/typescript (source) ^2.4.11 -> ^4.0.0 age adoption passing confidence
@graphql-codegen/typescript-msw (source) ^1.0.10 -> ^3.0.0 age adoption passing confidence
@graphql-codegen/typescript-operations (source) ^2.4.0 -> ^4.0.0 age adoption passing confidence

Release Notes

dotansimha/graphql-code-generator (@​graphql-codegen/add)

v5.0.3

Compare Source

Patch Changes
  • #​9987 5501c62 Thanks @​taro-28! - Export configuration types (e.g. AddPluginConfig) from the entry point.

    import type { AddPluginConfig } from '@​graphql-codegen/add';

v5.0.2

Compare Source

Patch Changes

v5.0.1

Compare Source

Patch Changes

v5.0.0

Compare Source

Major Changes
Patch Changes

v4.0.1

Compare Source

Patch Changes

v4.0.0

Compare Source

Major Changes
Patch Changes
dotansimha/graphql-code-generator (@​graphql-codegen/cli)

v5.0.3

Compare Source

Patch Changes

v5.0.2

Compare Source

Patch Changes

v5.0.1

Compare Source

Patch Changes

v5.0.0

Compare Source

Major Changes
Patch Changes

v4.0.1

Compare Source

Patch Changes

v4.0.0

Compare Source

Major Changes
Patch Changes

v3.3.1

Compare Source

Patch Changes

v3.3.0

Compare Source

Minor Changes
  • #​9151 b7dacb21f Thanks @​'./user/schema.mappers#UserMapper',! - Add watchPattern config option for generates sections.

    By default, watch mode automatically watches all GraphQL schema and document files. This means when a change is detected, Codegen CLI is run.

    A user may want to run Codegen CLI when non-schema and non-document files are changed. Each generates section now has a watchPattern option to allow more file patterns to be added to the list of patterns to watch.

    In the example below, mappers are exported from schema.mappers.ts files. We want to re-run Codegen if the content of *.mappers.ts files change because they change the generated types file. To solve this, we can add mapper file patterns to watch using the glob pattern used for schema and document files.

    // codegen.ts
    const config: CodegenConfig = {
      schema: 'src/schema/**/*.graphql',
      generates: {
        'src/schema/types.ts': {
          plugins: ['typescript', 'typescript-resolvers'],
          config: {
            mappers: {
    
              Book: './book/schema.mappers#BookMapper',
            },
          }
          watchPattern: 'src/schema/**/*.mappers.ts', // Watches mapper files in `watch` mode. Use an array for multiple patterns e.g. `['src/*.pattern1.ts','src/*.pattern2.ts']`
        },
      },
    };

    Then, run Codegen CLI in watch mode:

    yarn graphql-codegen --watch

    Now, updating *.mappers.ts files re-runs Codegen! 🎉

    Note: watchPattern is only used in watch mode i.e. running CLI with --watch flag.

Patch Changes

v3.2.2

Compare Source

Patch Changes

v3.2.1

Compare Source

Patch Changes

v3.2.0

Compare Source

Minor Changes
Patch Changes

v3.1.0

Compare Source

Minor Changes
  • #​8893 a118c307a Thanks @​n1ru4l! - It is no longer mandatory to declare an empty plugins array when using a preset

  • #​8723 a3309e63e Thanks @​kazekyo! - Introduce a new feature called DocumentTransform.

    DocumentTransform is a functionality that allows you to modify documents before they are processed by plugins. You can use functions passed to the documentTransforms option to make changes to GraphQL documents.

    To use this feature, you can write documentTransforms as follows:

    import type { CodegenConfig } from '@​graphql-codegen/cli';
    
    const config: CodegenConfig = {
      schema: 'https://localhost:4000/graphql',
      documents: ['src/**/*.tsx'],
      generates: {
        './src/gql/': {
          preset: 'client',
          documentTransforms: [
            {
              transform: ({ documents }) => {
                // Make some changes to the documents
                return documents;
              },
            },
          ],
        },
      },
    };
    export default config;

    For instance, to remove a @localOnlyDirective directive from documents, you can write the following code:

    import type { CodegenConfig } from '@​graphql-codegen/cli';
    import { visit } from 'graphql';
    
    const config: CodegenConfig = {
      schema: 'https://localhost:4000/graphql',
      documents: ['src/**/*.tsx'],
      generates: {
        './src/gql/': {
          preset: 'client',
          documentTransforms: [
            {
              transform: ({ documents }) => {
                return documents.map(documentFile => {
                  documentFile.document = visit(documentFile.document, {
                    Directive: {
                      leave(node) {
                        if (node.name.value === 'localOnlyDirective') return null;
                      },
                    },
                  });
                  return documentFile;
                });
              },
            },
          ],
        },
      },
    };
    export default config;

    DocumentTransform can also be specified by file name. You can create a custom file for a specific transformation and pass it to documentTransforms.

    Let's create the document transform as a file:

    module.exports = {
      transform: ({ documents }) => {
        // Make some changes to the documents
        return documents;
      },
    };

    Then, you can specify the file name as follows:

    import type { CodegenConfig } from '@​graphql-codegen/cli';
    
    const config: CodegenConfig = {
      schema: 'https://localhost:4000/graphql',
      documents: ['src/**/*.tsx'],
      generates: {
        './src/gql/': {
          preset: 'client',
          documentTransforms: ['./my-document-transform.js'],
        },
      },
    };
    export default config;
Patch Changes

v3.0.0

Compare Source

Major Changes
Patch Changes
dotansimha/graphql-code-generator (@​graphql-codegen/introspection)

v4.0.3

Compare Source

Patch Changes

v4.0.2

Compare Source

Patch Changes

v4.0.1

Compare Source

Patch Changes

v4.0.0

Compare Source

Major Changes
Patch Changes

v3.0.1

Compare Source

Patch Changes

v3.0.0

Compare Source

Major Changes
Patch Changes
dotansimha/graphql-code-generator (@​graphql-codegen/typescript)

v4.1.0

Compare Source

Minor Changes
  • #​10077 3f4f546 Thanks @​eddeee888! - Extend config.avoidOptions to support query, mutation and subscription

    Previously, config.avoidOptions.resolvers was being used to make query, mutation and subscription fields non-optional.
    Now, config.avoidOptions.query, config.avoidOptions.mutation and config.avoidOptions.subscription can be used to target the respective types.

Patch Changes

v4.0.9

Compare Source

Patch Changes

v4.0.8

Compare Source

Patch Changes

v4.0.7

Compare Source

Patch Changes

v4.0.6

Compare Source

Patch Changes

v4.0.5

Compare Source

Patch Changes

v4.0.4

Compare Source

Patch Changes

v4.0.3

Compare Source

Patch Changes

v4.0.2

Compare Source

Patch Changes

[v4.0.1](https://redirect.github.com/dotansimha/graphql-c


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 5abda8c to f4be344 Compare February 11, 2023 20:48
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 5 times, most recently from fcf7daf to 2f62b60 Compare February 25, 2023 01:52
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from 3b3103c to 8148201 Compare March 5, 2023 11:11
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 4 times, most recently from 950943c to ba7b606 Compare March 13, 2023 13:07
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from ba7b606 to 90d45b6 Compare June 1, 2023 20:42
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 90d45b6 to 08070ed Compare July 28, 2023 10:16
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 08070ed to b858572 Compare September 29, 2023 00:59
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from b858572 to 67c4540 Compare February 5, 2024 18:24
Copy link
Contributor Author

renovate bot commented Feb 5, 2024

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: pnpm-lock.yaml
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Fadd error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Fcli error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Fintrospection error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Ftypescript error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Ftypescript-msw error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Ftypescript-operations error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@babel/core/-/core-7.18.2.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.2.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.17.12.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@commitlint/cli/-/cli-17.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.0.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@milahu/patch-package/-/patch-package-6.4.14.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@tailwindcss/line-clamp/-/line-clamp-0.4.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.5.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.4.3.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Fadd error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Fcli error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Fintrospection error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Ftypescript error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Ftypescript-msw error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@graphql-codegen%2Ftypescript-operations error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@babel/core/-/core-7.18.2.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.2.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.17.12.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@commitlint/cli/-/cli-17.0.1.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.0.0.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@milahu/patch-package/-/patch-package-6.4.14.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@tailwindcss/line-clamp/-/line-clamp-0.4.0.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.5.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.4.3.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
 WARN  GET https://registry.npmjs.org/@types/headroom.js/-/headroom.js-0.12.2.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
undefined
 ERR_INVALID_THIS  Value of "this" must be of type URLSearchParams

TypeError [ERR_INVALID_THIS]: Value of "this" must be of type URLSearchParams
    at Proxy.getAll (node:internal/url:527:13)
    at Proxy.<anonymous> (/opt/containerbase/tools/pnpm/7.29.1/node_modules/pnpm/dist/pnpm.cjs:59369:55)
    at /opt/containerbase/tools/pnpm/7.29.1/node_modules/pnpm/dist/pnpm.cjs:59431:31
    at Array.reduce (<anonymous>)
    at Proxy.raw (/opt/containerbase/tools/pnpm/7.29.1/node_modules/pnpm/dist/pnpm.cjs:59430:33)
    at new Headers (/opt/containerbase/tools/pnpm/7.29.1/node_modules/pnpm/dist/pnpm.cjs:59315:28)
    at getNodeRequestOptions (/opt/containerbase/tools/pnpm/7.29.1/node_modules/pnpm/dist/pnpm.cjs:59664:23)
    at /opt/containerbase/tools/pnpm/7.29.1/node_modules/pnpm/dist/pnpm.cjs:59721:25
    at new Promise (<anonymous>)
    at fetch (/opt/containerbase/tools/pnpm/7.29.1/node_modules/pnpm/dist/pnpm.cjs:59719:14)
 WARN  GET https://registry.npmjs.org/@types/masonry-layout/-/masonry-layout-4.2.5.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@types/scroll-lock/-/scroll-lock-2.1.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.5.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.26.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.7.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/babel-jest/-/babel-jest-29.1.2.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/babel-preset-solid/-/babel-preset-solid-1.5.7.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

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.

0 participants