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

Locked version of class-validator and class-transformer out of date #11

Closed
arvinsingla opened this issue May 31, 2019 · 3 comments
Closed

Comments

@arvinsingla
Copy link

Hey thanks for the great work on this project!

I ran into an issue using this library in my NestJS project due to a version miss-match in the class-transformer library. My base project was using the latest minor version 0.2.3 and this project is locked to the previous minor version 0.1.9. Because of this I couldn't pass the defaultMetadataStorage to the validationMetadatasToSchemas method because the instances were different.

I've currently downgraded my project to use the 0.1.9 version which is working but it would be great if we could either remove the lock file (always pull latest based on package.json rules) or update the lock to use the latest versions.

@epiphone epiphone mentioned this issue Jun 3, 2019
@epiphone
Copy link
Owner

epiphone commented Jun 3, 2019

Hi, I updated the deps in v1.2.1. If this keeps happening let's look into relaxing the lock file like you mentioned. Thanks!

@epiphone epiphone closed this as completed Jun 3, 2019
@michaelneu
Copy link

I'm running into this as well now, especially as the version on NPM appears to not be the one with the updated dependencies (yarn info class-validator-jsonschema yields class-validator@^0.7.3 and class-transformer@^0.1.9).

Could you maybe use both class-transformer and class-validator as peerDependencies? Having a specific version might cause trouble for more users, as routing-controllers has its own issues with version mismatches (e.g. see here).

@epiphone
Copy link
Owner

@michaelneu the two libs are now peer dependencies as of 1.3.0. Thanks for pointing me in the right direction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants