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

Bump class-validator and type-graphql #26

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

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Jan 12, 2023

Bumps class-validator to 0.14.0 and updates ancestor dependency type-graphql. These dependencies need to be updated together.

Updates class-validator from 0.8.5 to 0.14.0

Changelog

Sourced from class-validator's changelog.

0.14.0 (2022-12-09)

Added

  • add @IsTimeZone decorator to check if given string is valid IANA time zone
  • add @IsISO4217CurrencyCode decorator to check if the string is an ISO 4217 currency code
  • add @IsStrongPassword decorator to check if given password matches specific complexity criteria
  • add @IsBase58 decorator to check if a string is base58 encoded
  • add @IsTaxId decorator to check if a given string is a valid tax ID in a given locale
  • add support for passing function as date generator in @MinDate and @MaxDate decorators
  • add option to print constraint error message instead of constraint type in validation error
  • improve decorator metadata lookup performance
  • return possible values in error message for @IsEnum decorator

Fixed

  • re-added @types/validator as dependency
  • fix error generation when using @NestedValidation
  • pass validation options correctly to validator in @IsDateString decorator
  • support passing Symbol as parameter in error message generation
  • specify supported locales for @IsAlphanumeric decorator
  • correctly assign decorator name in metadata instead of loosing it
  • fix various spelling errors in documentation
  • fix various spelling errors and inconsistencies in JSDoc for decorators

Changed

  • enable forbidUnknownValues option by default
  • remove documentation about deprecated schema based validation and added warning
  • update warning message logged about missing decorator metadata
  • update libphonenumber-js to ^1.10.14 from ^1.9.43
  • update various dev-dependencies

BREAKING CHANGES

forbidUnknownValues option is enabled by default

From this release the forbidUnknownValues is enabled by default. This is the desired behavior for majority of use-cases, but this change may break validation for some. The two scenarios that results in failed validation:

  • when attempting to validate a class instance without metadata for it
  • when using group validation and the specified validation group results in zero validation applied

The old behavior can be restored via specifying forbidUnknownValues: false option when calling the validate functions.

For more details see [PR #1798](typestack/class-validator#1798) and #1422 (comment).

@NestedValidation decorator correctly assigns validation errors

Until now the errors from a nested validation in some cases were incorrectly assigned

... (truncated)

Commits
Maintainer changes

This version was pushed to npm by typestack-release-bot, a new releaser for class-validator since your current version.


Updates type-graphql from 0.12.0 to 1.1.1

Release notes

Sourced from type-graphql's releases.

1.1.1

Fixes

  • fix crashing when of union's or interface type's resolveType function returns undefined or null (#731)
  • fix crashing when no reflected type available for fields with params decorators (#724)
  • fix not registering object types implementing interface type when interface type is used as object type field type (#736)
  • properly transform nested array of input type classes (#737)

1.1.0

Features

  • allow passing custom validation function as validate option to buildSchema
  • support defining deprecation reason and description of enum members (#714)

Fixes

  • Breaking Change: throw error when wrong type of value provided as arg or input for GraphQLISODateTime and GraphQLTimestamp scalars
  • don't include in schema the fields declared as @FieldResolver when that resolvers classes aren't provided in resolvers array
  • fix grammar in CannotDetermineGraphQLTypeError error message
  • properly inherit extensions from parent class and its fields

1.0.0

Features

  • Breaking Change: emit in schema only types actually used by provided resolvers classes (#415)
  • Breaking Change: update graphql-js peer dependency to ^15.3.0
  • Breaking Change: update graphql-query-complexity dependency to ^0.7.0 and drop support for fieldConfigEstimator (use fieldExtensionsEstimator instead)
  • Breaking Change: introduce sortedSchema option in PrintSchemaOptions and emit sorted schema file by default
  • Breaking Change: make class-validator a peer dependency of version >=0.12.0 that needs to be installed manually (#366)
  • Breaking Change: remove CannotDetermineTypeError and make other error messages more detailed and specific
  • Breaking Change: remove legacy array inference - now explicit array syntax ([Item]) is required
  • update TypeResolver interface to match with GraphQLTypeResolver from graphql-js
  • add basic support for directives with @Directive() decorator (#369)
  • add possibility to tune up the performance and disable auth & middlewares stack for simple field resolvers (#479)
  • optimize resolvers execution paths to speed up a lot basic scenarios (#488)
  • add @Extensions decorator for putting metadata into GraphQL types config (#521)
  • add support for defining arguments and implementing resolvers for interface types fields (#579)
  • add { autoRegisterImplementations: false } option to prevent automatic emitting in schema all the object types that implements used interface type (#595)
  • allow interfaces to implement other interfaces (#602)
  • expose createResolversMap utility that generates apollo-like resolvers object
  • support IoC containers which .get() method returns a Promise of resolver instance
  • update deps to newest major versions (tslib, graphql-query-complexity)

Fixes

  • Breaking Change: stop returning null for GraphQLTimestamp and GraphQLISODateTime scalars when returned value is not a Date instance - now it throws explicit error instead
  • Breaking Change: fix transforming and validating nested inputs and arrays (#462)
  • refactor union types function syntax handling to prevent possible errors with circular refs
  • remove duplicated entries for resolver classes that use inheritance (#499)
  • fix using name option on interface fields (#567)
  • fix not calling authChecker during subscribe phase for subscriptions (#578)
  • fix using shared union type in multiple schemas
  • fix using shared interface type in multiple schemas
  • fix calling field resolver without providing resolver class to buildSchema
  • fix generated TS union type for union type of object type classes extending themselves (#587)
  • fix using shared union and interface types in multiple schemas when resolveType is used

... (truncated)

Changelog

Sourced from type-graphql's changelog.

v1.1.1

Fixes

  • fix crashing when of union's or interface type's resolveType function returns undefined or null (#731)
  • fix crashing when no reflected type available for fields with params decorators (#724)
  • fix not registering object types implementing interface type when interface type is used as object type field type (#736)
  • properly transform nested array of input type classes (#737)

v1.1.0

Features

  • allow passing custom validation function as validate option to buildSchema
  • support defining deprecation reason and description of enum members (#714)

Fixes

  • Breaking Change: throw error when wrong type of value provided as arg or input for GraphQLISODateTime and GraphQLTimestamp scalars
  • don't include in schema the fields declared as @FieldResolver when that resolvers classes aren't provided in resolvers array
  • fix grammar in CannotDetermineGraphQLTypeError error message
  • properly inherit extensions from parent class and its fields

v1.0.0

Features

  • Breaking Change: emit in schema only types actually used by provided resolvers classes (#415)
  • Breaking Change: update graphql-js peer dependency to ^15.3.0
  • Breaking Change: update graphql-query-complexity dependency to ^0.7.0 and drop support for fieldConfigEstimator (use fieldExtensionsEstimator instead)
  • Breaking Change: introduce sortedSchema option in PrintSchemaOptions and emit sorted schema file by default
  • Breaking Change: make class-validator a peer dependency of version >=0.12.0 that needs to be installed manually (#366)
  • Breaking Change: remove CannotDetermineTypeError and make other error messages more detailed and specific
  • Breaking Change: remove legacy array inference - now explicit array syntax ([Item]) is required
  • update TypeResolver interface to match with GraphQLTypeResolver from graphql-js
  • add basic support for directives with @Directive() decorator (#369)
  • add possibility to tune up the performance and disable auth & middlewares stack for simple field resolvers (#479)
  • optimize resolvers execution paths to speed up a lot basic scenarios (#488)
  • add @Extensions decorator for putting metadata into GraphQL types config (#521)
  • add support for defining arguments and implementing resolvers for interface types fields (#579)
  • add { autoRegisterImplementations: false } option to prevent automatic emitting in schema all the object types that implements used interface type (#595)
  • allow interfaces to implement other interfaces (#602)
  • expose createResolversMap utility that generates apollo-like resolvers object
  • support IoC containers which .get() method returns a Promise of resolver instance
  • update deps to newest major versions (tslib, graphql-query-complexity)

Fixes

  • Breaking Change: stop returning null for GraphQLTimestamp and GraphQLISODateTime scalars when returned value is not a Date instance - now it throws explicit error instead
  • Breaking Change: fix transforming and validating nested inputs and arrays (#462)
  • refactor union types function syntax handling to prevent possible errors with circular refs
  • remove duplicated entries for resolver classes that use inheritance (#499)
  • fix using name option on interface fields (#567)
  • fix not calling authChecker during subscribe phase for subscriptions (#578)
  • fix using shared union type in multiple schemas
  • fix using shared interface type in multiple schemas
  • fix calling field resolver without providing resolver class to buildSchema
  • fix generated TS union type for union type of object type classes extending themselves (#587)
  • fix using shared union and interface types in multiple schemas when resolveType is used
  • properly inherit directives while extending @InputType or @ObjectType classes (#626)

... (truncated)

Commits
  • 23409fd release: 1.1.1
  • 4414f46 chore(deps): update lockfile to npm 7
  • 5b1afd0 chore(docs): fix examples urls in versioned docs
  • d4bfe83 docs(interfaces): clarify interfaces implements requirements
  • 8c7d0a9 Merge pull request #737 from MichalLytek/fix-nested-arrays-inputs
  • a982352 fix(inputs): properly transform nested array of input type classes
  • bd4f261 Merge pull request #736 from MichalLytek/fix-implements-auto-register
  • fcb4834 docs(subscriptions): fix arguments of the subscribe option (#739)
  • 59f42eb fix(interfaces): auto register implementations in field type case
  • b7928d3 tests(interfaces): add test case to reproduce auto registering issue
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by michallytek, a new releaser for type-graphql since your current version.


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [class-validator](https://github.com/typestack/class-validator) to 0.14.0 and updates ancestor dependency [type-graphql](https://github.com/MichalLytek/type-graphql). These dependencies need to be updated together.


Updates `class-validator` from 0.8.5 to 0.14.0
- [Release notes](https://github.com/typestack/class-validator/releases)
- [Changelog](https://github.com/typestack/class-validator/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/typestack/class-validator/commits/v0.14.0)

Updates `type-graphql` from 0.12.0 to 1.1.1
- [Release notes](https://github.com/MichalLytek/type-graphql/releases)
- [Changelog](https://github.com/MichalLytek/type-graphql/blob/master/CHANGELOG.md)
- [Commits](MichalLytek/type-graphql@v0.12.0...v1.1.1)

---
updated-dependencies:
- dependency-name: class-validator
  dependency-type: indirect
- dependency-name: type-graphql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants