Repository navigation
Update graphqlcodegenerator monorepo - #1308
renovate[bot] wants to merge 1 commit into
Conversation
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2991380590 Status: Failed Job summariesrspec: [cloud]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/17481673057/artifacts/tmp/coverage/index.html rspec: [ee]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/17481673056/artifacts/tmp/coverage/index.html rspec: [ce]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/17481673055/artifacts/tmp/coverage/index.html docs:previewDocumentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/17481768531/artifacts/out/index.html rubocop1100 files inspected, no offenses detected |
e827988 to
756bfdf
Compare
756bfdf to
a07f786
Compare
f5d12ef to
34a3617
Compare
6ccea6f to
098f57a
Compare
098f57a to
d50ec09
Compare
This PR contains the following updates:
7.4.1→7.4.66.1.0→6.1.2Release Notes
dotansimha/graphql-code-generator (@graphql-codegen/cli)
v7.4.6Compare Source
Patch Changes
#10985
d8aa07fThanks @eddeee888! - Build with
strict: true, which changesthese emitted type declarations:
@graphql-codegen/cli:mkdirpreturnsPromise<string | undefined>, and therequire(-r)CLI option's
defaultis typednever[]instead ofany[].@graphql-codegen/visitor-plugin-common:BaseResolversVisitorandBaseTypesVisitorSchemaDefinition()/SchemaExtension()returnnullinstead ofany.@graphql-codegen/visitor-plugin-common:BaseSelectionSetProcessor.typeCacheis keyed byLocation | undefined.@graphql-codegen/visitor-plugin-common:SelectionSetToObject.buildSelectionSetreturnstypeInfoas{ name: string; type: string } | null.@graphql-codegen/visitor-plugin-common:getPossibleTypesacceptsnullas the type, whichgraphql 15's
schema.getType()can return.@graphql-codegen/visitor-plugin-common:removeDescriptionreturns nodes withdescription: undefinedinstead ofany.@graphql-codegen/typescript:TsIntrospectionVisitor's constructor takespluginConfigasTypeScriptPluginConfig | undefined,DirectiveDefinition()returnsnullandObjectTypeDefinition()returnsstring | null.@graphql-codegen/client-preset: the babel preset acceptsoptionsasClientBabelPresetOptions | null | undefined.@graphql-codegen/testing:mockGraphQLServerreturnsnock.Scope | null.@graphql-codegen/graphql-modules-preset: a schema withoutextensions(graphql 15) throws the"requires to use GraphQL SDL" error instead of a
TypeError.Generated output is unchanged.
Updated dependencies
[
d8aa07f]:v7.4.5Compare Source
Patch Changes
#11043
31761f9Thanks @eddeee888! - dependencies updates:
@graphql-tools/apollo-engine-loader@^8.0.38↗︎(from
^8.0.28, independencies)@graphql-tools/code-file-loader@^8.1.41↗︎(from
^8.1.39, independencies)@graphql-tools/git-loader@^8.0.44↗︎(from
^8.0.32, independencies)@graphql-tools/github-loader@^9.1.11↗︎(from
^9.0.6, independencies)@graphql-tools/graphql-file-loader@^8.1.22↗︎(from
^8.1.11, independencies)@graphql-tools/json-file-loader@^8.0.36↗︎(from
^8.0.26, independencies)@graphql-tools/load@^8.1.19↗︎(from
^8.1.8, independencies)@graphql-tools/merge@^9.2.6↗︎(from
^9.2.4, independencies)@graphql-tools/url-loader@^9.1.12↗︎(from
^9.0.6, independencies)@graphql-tools/utils@^12.0.3↗︎(from
^11.2.0, independencies)graphql-config@^5.1.8↗︎ (from^5.1.6, independencies)#11043
31761f9Thanks @eddeee888! - Update
@graphql-tools/utilsto v12, andother
@graphql-tools/*dependencies andgraphql-configto releases that use it, to pick up thefix for GHSA-7mx3-vvmw-hjmv (prototype
pollution in
mergeDeep,@graphql-tools/utils<= 12.0.0).@graphql-codegen/clinow unwraps theAggregateErrorthat newer@graphql-tools/loadversionsthrow, so schema and document syntax errors still print the native
GraphQLErrorwith its filelocation.
Updated dependencies
[
31761f9,31761f9,31761f9,31761f9]:v7.4.4Compare Source
Patch Changes
#11025
43d0f65Thanks @BuddhaBing! - Widen
Types.SchemaWithLoaderOptions['loader']to accept a custom loader function(
CustomSchemaLoaderFn) in addition to a path string.A per-entry
schemacustom loader ({ '<pointer>': { loader, ...options } }) is resolved by@graphql-tools/load'suseCustomLoader, which already accepts either a path string (resolvedvia
require()) or a function value at runtime (typeof loaderPointer === 'function'). Only theTypeScript type restricted
loadertostring, forcing consumers who pass an imported loaderfunction (or a class instance exposing a bound
loaderproperty) to cast theschemaarray tobypass the type error, even though it worked correctly at runtime.
This is additive and backward compatible —
loader: stringcontinues to type-check exactly asbefore.
Also fixes a schema-cache collision for function loaders in
@graphql-codegen/cli: the cache keyis
JSON.stringify(schemaPointerMap), andJSON.stringifydrops functions, so twogeneratestargets using different loader functions for the same pointer
(
{ 'schema.graphql': { loader: fnA } }vs{ loader: fnB }) both keyed as{"schema.graphql":{}}and the second silently reused the first's schema. Function values are nowkeyed by object identity (via the existing
getJsObjectId), so distinct loaders load separatelywhile one function reused across targets still loads once.
#11020
82ebbb5Thanks @eddeee888! - Fix type errors in
cliunderstrict: true:@graphql-codegen/cli:loadCodegenConfigreturnsPromise<LoadCodegenConfigResult | null>,matching the
nullit resolves to when no config file is found.YamlCliFlagsincludes thekebab-case
ignore-no-documents,emit-legacy-common-js-importsandimport-extensionflagsthat the CLI reads.
CodegenContext.filepathis optional, and watch mode only watches theconfig file when the context has a
filepath.CodegenContext.getConfig()without an argumentreturns
Types.Config, andgetConfig(extraConfig)returnsT & Types.Config.CodegenContext.checkModeStaleFilesis typed asstring[]. Adds@types/yargs,@types/babel__generatorand@types/babel__templateas dev dependencies.@graphql-codegen/plugin-helpers:normalizeInstanceOrArrayandnormalizeConfigacceptnullandundefined, returning[].Generated output is unchanged.
Updated dependencies
[
43d0f65,82ebbb5,e972b6d,eae0e62,1f7566f]:v7.4.3Compare Source
Patch Changes
8512e51Thanks @eddeee888! - Add missing --check in CLI --help config
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)
v6.1.2Compare Source
Patch Changes
#10985
d8aa07fThanks @eddeee888! - Build with
strict: true, which changesthese emitted type declarations:
@graphql-codegen/cli:mkdirpreturnsPromise<string | undefined>, and therequire(-r)CLI option's
defaultis typednever[]instead ofany[].@graphql-codegen/visitor-plugin-common:BaseResolversVisitorandBaseTypesVisitorSchemaDefinition()/SchemaExtension()returnnullinstead ofany.@graphql-codegen/visitor-plugin-common:BaseSelectionSetProcessor.typeCacheis keyed byLocation | undefined.@graphql-codegen/visitor-plugin-common:SelectionSetToObject.buildSelectionSetreturnstypeInfoas{ name: string; type: string } | null.@graphql-codegen/visitor-plugin-common:getPossibleTypesacceptsnullas the type, whichgraphql 15's
schema.getType()can return.@graphql-codegen/visitor-plugin-common:removeDescriptionreturns nodes withdescription: undefinedinstead ofany.@graphql-codegen/typescript:TsIntrospectionVisitor's constructor takespluginConfigasTypeScriptPluginConfig | undefined,DirectiveDefinition()returnsnullandObjectTypeDefinition()returnsstring | null.@graphql-codegen/client-preset: the babel preset acceptsoptionsasClientBabelPresetOptions | null | undefined.@graphql-codegen/testing:mockGraphQLServerreturnsnock.Scope | null.@graphql-codegen/graphql-modules-preset: a schema withoutextensions(graphql 15) throws the"requires to use GraphQL SDL" error instead of a
TypeError.Generated output is unchanged.
Updated dependencies
[
d8aa07f,5078faf]:v6.1.1Compare Source
Patch Changes
#11019
eae0e62Thanks @eddeee888! - Fix type errors in
plugin-helpersunderstrict: true:@graphql-codegen/plugin-helpers:ProfilerEvent.catis optional, matching the Trace Eventformat and
Profiler.run's optionalcat.FederationMeta's reference selection sets aretyped recursively (
{ [field: string]: true | ReferenceSelectionSet }), matching the nestedselections
@key/@requires/@providesproduce.oldVisit'svisitorparam is typed asOldVisitor:enterandleavemaps keyed by AST node kind, whose callbacks receive the typednode plus graphql's
key,parent,pathandancestors. Federation directives missing theirfieldsargument, and operations whose root type is missing from the schema, throw adescriptive error.
@graphql-codegen/typescriptand@graphql-codegen/typescript-operations: theInputValueDefinitionvisitor methods takepathandancestorsas required params, since thevisitor always passes them.
Generated output is unchanged.
#11014
7a376efThanks @eddeee888! - Fix type errors in
typescriptunderstrict: trueby typing the shared visitor methods it overrides:@graphql-codegen/visitor-plugin-common: addsNormalizedDeclarationKindConfig(everydeclaration kind set), used by
normalizeDeclarationKind,DEFAULT_DECLARATION_KINDSandParsedTypesConfig.declarationKind.BaseTypesVisitor'sNamedType,ListType,FieldDefinition,InputValueDefinitionandUnionTypeDefinitionhave typed visitor params(
keyandparentare required, since the visitor always passes them), andObjectTypeDefinition,EnumTypeDefinitionandDirectiveDefinitionmay returnnull.@graphql-codegen/typescript: skips document files without adocumentwhen collectingintrospection types, types the
TsVisitorvisitor params, andTsVisitor.EnumTypeDefinitionmay return
nulllike the introspection visitor's override.Generated output is unchanged.
Updated dependencies
[
43d0f65,82ebbb5,eae0e62,1f7566f,7a376ef,3caccd3,ccc0d5c]:Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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 was generated by Mend Renovate. View the repository job log.