Build(deps-dev): bump @graphql-codegen/cli from 3.2.2 to 3.3.0 #1077

Merged
argoyle merged 1 commits from dependabot-npm_and_yarn-graphql-codegen-cli-3.3.0 into master 2023-04-04 06:21:33 +00:00
argoyle commented 2023-04-04 04:43:39 +00:00 (Migrated from gitlab.com)

Bumps @graphql-codegen/cli from 3.2.2 to 3.3.0.

Changelog

Sourced from @​graphql-codegen/cli's changelog.

3.3.0

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

Commits


Dependabot commands
You can trigger Dependabot actions by commenting on this MR
  • $dependabot rebase will rebase this MR
  • $dependabot recreate will recreate this MR rewriting all the manual changes and resolving conflicts
Bumps [@graphql-codegen/cli](https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/graphql-codegen-cli) from 3.2.2 to 3.3.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/dotansimha/graphql-code-generator/blob/master/packages/graphql-codegen-cli/CHANGELOG.md"><code>@​graphql-codegen/cli</code>'s changelog</a>.</em></p> <blockquote> <h2>3.3.0</h2> <h3>Minor Changes</h3> <ul> <li> <p><a href="https://github.com/dotansimha/graphql-code-generator/pull/9151">#9151</a> <a href="https://github.com/dotansimha/graphql-code-generator/commit/b7dacb21fb0ed1173d1e45120dc072e29231ed29"><code>b7dacb21f</code></a> Thanks <a href="https://github.com/&#x27;./user/schema.mappers#UserMapper&#x27;,">@'./user/schema.mappers#UserMapper',</a>! - Add <code>watchPattern</code> config option for <code>generates</code> sections.</p> <p>By default, <code>watch</code> mode automatically watches all GraphQL schema and document files. This means when a change is detected, Codegen CLI is run.</p> <p>A user may want to run Codegen CLI when non-schema and non-document files are changed. Each <code>generates</code> section now has a <code>watchPattern</code> option to allow more file patterns to be added to the list of patterns to watch.</p> <p>In the example below, mappers are exported from <code>schema.mappers.ts</code> files. We want to re-run Codegen if the content of <code>*.mappers.ts</code> 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.</p> <pre lang="ts"><code>// codegen.ts const config: CodegenConfig = { schema: 'src/schema/**/*.graphql', generates: { 'src/schema/types.ts': { plugins: ['typescript', 'typescript-resolvers'], config: { mappers: { <pre><code> 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']` }, </code></pre> <p>}, }; </code></pre></p> <p>Then, run Codegen CLI in <code>watch</code> mode:</p> <pre lang="shell"><code>yarn graphql-codegen --watch </code></pre> <p>Now, updating <code>*.mappers.ts</code> files re-runs Codegen! 🎉</p> <p>Note: <code>watchPattern</code> is only used in <code>watch</code> mode i.e. running CLI with <code>--watch</code> flag.</p> </li> </ul> <h3>Patch Changes</h3> <ul> <li>Updated dependencies [<a href="https://github.com/dotansimha/graphql-code-generator/commit/b7dacb21fb0ed1173d1e45120dc072e29231ed29"><code>b7dacb21f</code></a>, <a href="https://github.com/dotansimha/graphql-code-generator/commit/f104619acd27c9d62a06bc577737500880731087"><code>f104619ac</code></a>]: <ul> <li><code>@​graphql-codegen/plugin-helpers</code><a href="https://github.com/4"><code>@​4</code></a>.2.0</li> </ul> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/6e3fd3809f9a13c6faf6e5ce138f53920f3225dc"><code>6e3fd38</code></a> chore(release): update monorepo packages versions (<a href="https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/graphql-codegen-cli/issues/9132">#9132</a>)</li> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/d318805a1675363f10326db49497c8ddd4647193"><code>d318805</code></a> eslint fixes (<a href="https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/graphql-codegen-cli/issues/9247">#9247</a>)</li> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/ef60e81999898a38ae1315b5059725e4b9a8fc58"><code>ef60e81</code></a> chore(deps): update dependency prettier to v2.8.7 (<a href="https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/graphql-codegen-cli/issues/9223">#9223</a>)</li> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/7de3c703bec77b9f2aa87780ceabe0b18f070457"><code>7de3c70</code></a> chore(deps): update dependency prettier to v2.8.6 (<a href="https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/graphql-codegen-cli/issues/9215">#9215</a>)</li> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/0f535812af32b2acb127d1bebf4b172e24d13266"><code>0f53581</code></a> chore(deps): update dependency prettier to v2.8.5 (<a href="https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/graphql-codegen-cli/issues/9204">#9204</a>)</li> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/b7dacb21fb0ed1173d1e45120dc072e29231ed29"><code>b7dacb2</code></a> [cli] Add watchPattern to generates config (<a href="https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/graphql-codegen-cli/issues/9151">#9151</a>)</li> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/ac44d0c6b1925df11a5f18f049eed6fec217002b"><code>ac44d0c</code></a> fix(deps): update graphql-tools (<a href="https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/graphql-codegen-cli/issues/9116">#9116</a>)</li> <li>See full diff in <a href="https://github.com/dotansimha/graphql-code-generator/commits/@graphql-codegen/cli@3.3.0/packages/graphql-codegen-cli">compare view</a></li> </ul> </details> <br /> --- <details> <summary>Dependabot commands</summary> <br /> You can trigger Dependabot actions by commenting on this MR - `$dependabot rebase` will rebase this MR - `$dependabot recreate` will recreate this MR rewriting all the manual changes and resolving conflicts </details>
argoyle commented 2023-04-04 06:21:11 +00:00 (Migrated from gitlab.com)

added 7 commits

  • 52441034...bfdbb3fb - 6 commits from branch master
  • 9409840c - Build(deps-dev): bump @graphql-codegen/cli from 3.2.2 to 3.3.0

Compare with previous version

added 7 commits <ul><li>52441034...bfdbb3fb - 6 commits from branch <code>master</code></li><li>9409840c - Build(deps-dev): bump @graphql-codegen/cli from 3.2.2 to 3.3.0</li></ul> [Compare with previous version](/unboundsoftware/dancefinder/dancefinder-app/-/merge_requests/1028/diffs?diff_id=646564375&start_sha=52441034f31744df941cfaa26392d67114ef3f4b)
argoyle (Migrated from gitlab.com) merged commit into master 2023-04-04 06:21:33 +00:00
Sign in to join this conversation.