@graphql-codegen/cli@7.4.2
Patch Changes
-
#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 ownnode_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 afile://URL (pathToFileURL(...).href) before being passed toimport()—
otherwise, on Windows, the loader misparses a raw path likeC:\...as ac:protocol scheme and
throwsERR_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, butchild_process.exec()runs throughcmd.exeon
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, matchingcmd.exe's own convention. -
#10959
7dffaae
Thanks @eddeee888! - Fix the CLI reporting success (exit code0)
when ageneratesoutput'spresetcan't be resolved. The error was shown in the terminal but
never counted toward the run's failure state, soallowPartialOutputs: false(the default) never
took effect for this case.
@graphql-codegen/typescript-operations@6.1.7
Patch Changes
- #10954
2deb08f
Thanks @eddeee888! - Fixtypescript-operationsemitting an
unusedimport type * as Types from '...'(withimportSchemaTypesFrom) or an unused local
enum/input declaration (without it) wheninlineFragmentTypesis'combine'or'mask'and the
generated file only ever references a schema type through a fragment spread that collapses to a
bareFooFragmentreference, 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).