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

The set method incorrectly updates the variable outside the VALIDATED_ENV_PROPNAME token when updating the validated configuration. #1815

Open
2 of 4 tasks
HenryOoO opened this issue Sep 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@HenryOoO
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

If you validate a configuration with a default value using joi, then after updating the value using the set method, you will not get a new value again because the set method does not concatenate VALIDATED_ENV_PROPNAME, and will simply place the value that needs to be updated outside of this property.

Minimum reproduction code

https://stackblitz.com/edit/nestjs-typescript-starter-5pr4dj?file=src%2Fapp.module.ts

Steps to reproduce

No response

Expected behavior

set to get the latest value

Package version

3.2.3

NestJS version

10.3.8

Node.js version

20.11.1

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@HenryOoO HenryOoO added the bug Something isn't working label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant