#10956 cec9c1c
Thanks @eddeee888! - Fix dynamically-loaded plugins/presets in ESM
builds. Previously, ESM used the bare module specifier without resolving it relative to the
consuming project first, so a plugin only loaded if it happened to be reachable from the CLI
package's own node_modules. Resolving it the same way the CJS build already does
(relativeRequire.resolve(mod)) fixes that, but the resolved absolute path also has to be
converted to a file:// URL (pathToFileURL(...).href) before being passed to import() —
otherwise, on Windows, the loader misparses a raw path like C:\... as a c: protocol scheme and
throws ERR_UNSUPPORTED_ESM_URL_SCHEME.
#10966 3029b60
Thanks @eddeee888! - Fix lifecycle hook scripts (e.g. hooks: { afterAllFileWrite: ['prettier --write'] } }) failing on Windows when the file paths
passed to them contain a backslash or other POSIX shell-special character. Hook arguments were
always quoted using POSIX single-quoting, but child_process.exec() runs through cmd.exe on
Windows by default, which doesn't strip single quotes — so the hook script received the literal
quote characters as part of its argument and failed to find the file. Arguments are now quoted
per-platform: POSIX quoting stays unchanged elsewhere, and Windows arguments are wrapped in double
quotes only when they actually need it, matching cmd.exe's own convention.
#10959 7dffaae
Thanks @eddeee888! - Fix the CLI reporting success (exit code 0)
when a generates output's preset can't be resolved. The error was shown in the terminal but
never counted toward the run's failure state, so allowPartialOutputs: false (the default) never
took effect for this case.
#10954 2deb08f
Thanks @eddeee888! - Fix typescript-operations emitting an
unused import type * as Types from '...' (with importSchemaTypesFrom) or an unused local
enum/input declaration (without it) when inlineFragmentTypes is 'combine' or 'mask' and the
generated file only ever references a schema type through a fragment spread that collapses to a
bare FooFragment reference, never naming the type itself. The schema-type import/declaration
decision, and the enum/scalar re-export decisions, are now based on the schema types actually
named by this file's own generated output, rather than every schema type reachable through the
document (including via fragments defined elsewhere).
Configuration
📅Schedule: (UTC)
Branch creation
At any time (no schedule defined)
Automerge
At any time (no schedule defined)
🚦Automerge: Enabled.
♻ 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 contains the following updates:
| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@graphql-codegen/cli](https://github.com/dotansimha/graphql-code-generator) ([source](https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/graphql-codegen-cli)) | [`7.4.1` → `7.4.2`](https://renovatebot.com/diffs/npm/@graphql-codegen%2fcli/7.4.1/7.4.2) |  |  |
| [@graphql-codegen/typescript-operations](https://github.com/dotansimha/graphql-code-generator) ([source](https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/operations)) | [`6.1.6` → `6.1.7`](https://renovatebot.com/diffs/npm/@graphql-codegen%2ftypescript-operations/6.1.6/6.1.7) |  |  |
---
### Release Notes
<details>
<summary>dotansimha/graphql-code-generator (@​graphql-codegen/cli)</summary>
### [`v7.4.2`](https://github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#742)
[Compare Source](https://github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@7.4.1...@graphql-codegen/cli@7.4.2)
##### Patch Changes
- [#​10956](https://github.com/dotansimha/graphql-code-generator/pull/10956)
[`cec9c1c`](https://github.com/dotansimha/graphql-code-generator/commit/cec9c1c5c1b1fd42b2e41bcec0203ab6a540831f)
Thanks [@​eddeee888](https://github.com/eddeee888)! - Fix dynamically-loaded plugins/presets in ESM
builds. Previously, ESM used the bare module specifier without resolving it relative to the
consuming project first, so a plugin only loaded if it happened to be reachable from the CLI
package's own `node_modules`. Resolving it the same way the CJS build already does
(`relativeRequire.resolve(mod)`) fixes that, but the resolved absolute path also has to be
converted to a `file://` URL (`pathToFileURL(...).href`) before being passed to `import()` —
otherwise, on Windows, the loader misparses a raw path like `C:\...` as a `c:` protocol scheme and
throws `ERR_UNSUPPORTED_ESM_URL_SCHEME`.
- [#​10966](https://github.com/dotansimha/graphql-code-generator/pull/10966)
[`3029b60`](https://github.com/dotansimha/graphql-code-generator/commit/3029b60c671c27aa9ac2c5697c17fa02ef9ad5a9)
Thanks [@​eddeee888](https://github.com/eddeee888)! - Fix lifecycle hook scripts (e.g.
`hooks: { afterAllFileWrite: ['prettier --write'] } }`) failing on Windows when the file paths
passed to them contain a backslash or other POSIX shell-special character. Hook arguments were
always quoted using POSIX single-quoting, but `child_process.exec()` runs through `cmd.exe` on
Windows by default, which doesn't strip single quotes — so the hook script received the literal
quote characters as part of its argument and failed to find the file. Arguments are now quoted
per-platform: POSIX quoting stays unchanged elsewhere, and Windows arguments are wrapped in double
quotes only when they actually need it, matching `cmd.exe`'s own convention.
- [#​10959](https://github.com/dotansimha/graphql-code-generator/pull/10959)
[`7dffaae`](https://github.com/dotansimha/graphql-code-generator/commit/7dffaae29ce507c2dd0db4f3bea9eb3e173a03f6)
Thanks [@​eddeee888](https://github.com/eddeee888)! - Fix the CLI reporting success (exit code `0`)
when a `generates` output's `preset` can't be resolved. The error was shown in the terminal but
never counted toward the run's failure state, so `allowPartialOutputs: false` (the default) never
took effect for this case.
</details>
<details>
<summary>dotansimha/graphql-code-generator (@​graphql-codegen/typescript-operations)</summary>
### [`v6.1.7`](https://github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/plugins/typescript/operations/CHANGELOG.md#617)
[Compare Source](https://github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/typescript-operations@6.1.6...@graphql-codegen/typescript-operations@6.1.7)
##### Patch Changes
- [#​10954](https://github.com/dotansimha/graphql-code-generator/pull/10954)
[`2deb08f`](https://github.com/dotansimha/graphql-code-generator/commit/2deb08fd705da2f2e29cffec01b781e383b8d55e)
Thanks [@​eddeee888](https://github.com/eddeee888)! - Fix `typescript-operations` emitting an
unused `import type * as Types from '...'` (with `importSchemaTypesFrom`) or an unused local
enum/input declaration (without it) when `inlineFragmentTypes` is `'combine'` or `'mask'` and the
generated file only ever references a schema type through a fragment spread that collapses to a
bare `FooFragment` reference, never naming the type itself. The schema-type import/declaration
decision, and the enum/scalar re-export decisions, are now based on the schema types actually
named by this file's own generated output, rather than every schema type reachable through the
document (including via fragments defined elsewhere).
</details>
---
### Configuration
📅 **Schedule**: (UTC)
- Branch creation
- At any time (no schedule defined)
- Automerge
- At any time (no schedule defined)
🚦 **Automerge**: Enabled.
♻ **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](https://github.com/renovatebot/renovate/discussions) if that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMDQuMiIsInVwZGF0ZWRJblZlciI6IjQ0LjEwNC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
7.4.1→7.4.26.1.6→6.1.7Release Notes
dotansimha/graphql-code-generator (@graphql-codegen/cli)
v7.4.2Compare Source
Patch Changes
#10956
cec9c1cThanks @eddeee888! - Fix dynamically-loaded plugins/presets in ESM
builds. Previously, ESM used the bare module specifier without resolving it relative to the
consuming project first, so a plugin only loaded if it happened to be reachable from the CLI
package's own
node_modules. Resolving it the same way the CJS build already does(
relativeRequire.resolve(mod)) fixes that, but the resolved absolute path also has to beconverted to a
file://URL (pathToFileURL(...).href) before being passed toimport()—otherwise, on Windows, the loader misparses a raw path like
C:\...as ac:protocol scheme andthrows
ERR_UNSUPPORTED_ESM_URL_SCHEME.#10966
3029b60Thanks @eddeee888! - Fix lifecycle hook scripts (e.g.
hooks: { afterAllFileWrite: ['prettier --write'] } }) failing on Windows when the file pathspassed to them contain a backslash or other POSIX shell-special character. Hook arguments were
always quoted using POSIX single-quoting, but
child_process.exec()runs throughcmd.exeonWindows by default, which doesn't strip single quotes — so the hook script received the literal
quote characters as part of its argument and failed to find the file. Arguments are now quoted
per-platform: POSIX quoting stays unchanged elsewhere, and Windows arguments are wrapped in double
quotes only when they actually need it, matching
cmd.exe's own convention.#10959
7dffaaeThanks @eddeee888! - Fix the CLI reporting success (exit code
0)when a
generatesoutput'spresetcan't be resolved. The error was shown in the terminal butnever counted toward the run's failure state, so
allowPartialOutputs: false(the default) nevertook effect for this case.
dotansimha/graphql-code-generator (@graphql-codegen/typescript-operations)
v6.1.7Compare Source
Patch Changes
2deb08fThanks @eddeee888! - Fix
typescript-operationsemitting anunused
import type * as Types from '...'(withimportSchemaTypesFrom) or an unused localenum/input declaration (without it) when
inlineFragmentTypesis'combine'or'mask'and thegenerated file only ever references a schema type through a fragment spread that collapses to a
bare
FooFragmentreference, never naming the type itself. The schema-type import/declarationdecision, and the enum/scalar re-export decisions, are now based on the schema types actually
named by this file's own generated output, rather than every schema type reachable through the
document (including via fragments defined elsewhere).
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ 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.
This PR has been generated by Mend Renovate CLI.