[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
[ ] Related issue linked using fixes #number
[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:
What is the current behavior?
When substitution of environment variables in enabled in the fileLoader, an exception is generated as the check for whether or not the config actually loaded is missing:
TypeError: Cannot read properties of null (reading 'config')
at Object.transform (/home/jacquesg/dev/projects/asterias/deianira/node_modules/nest-typed-config/lib/loader/file-loader.ts:120:41)
Issue Number: N/A
What is the new behavior?
The validity is checked, and the correct error is now generated:
/home/jacquesg/dev/projects/asterias/deianira/node_modules/nest-typed-config/lib/typed-config.module.ts:79
return load();
^
Error: Failed to find configuration file.
at /home/jacquesg/dev/projects/asterias/deianira/node_modules/nest-typed-config/lib/loader/file-loader.ts:135:5
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
fixes #number
What is the current behavior?
When substitution of environment variables in enabled in the
fileLoader
, an exception is generated as the check for whether or not the config actually loaded is missing:Issue Number: N/A
What is the new behavior?
The validity is checked, and the correct error is now generated:
Does this PR introduce a breaking change?
Other information