Skip to content

Commit

Permalink
[bugfix] fixed breaking changes by class transformer
Browse files Browse the repository at this point in the history
fixed tests
bumped version
  • Loading branch information
shahriar-shojib committed Dec 7, 2021
1 parent 145cae2 commit 24d0522
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "atenv",
"version": "1.0.6",
"version": "1.0.7",
"main": "dist/index.js",
"license": "MIT",
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/atenv.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { classToClass, ClassTransformOptions } from 'class-transformer';
import { ClassTransformOptions, instanceToInstance } from 'class-transformer';
import { validateSync, ValidatorOptions } from 'class-validator';
import { config, DotenvConfigOptions } from 'dotenv';
import { ENV_KEY, SECTION_KEY } from './constants';
Expand Down Expand Up @@ -61,7 +61,7 @@ export const parseEnv = <T>(TClass: new () => T, options?: ParseEnvOptions) => {
}
}

const converted = classToClass(instance, {
const converted = instanceToInstance(instance, {
exposeDefaultValues: true,
...options?.transformOptions,
});
Expand Down

0 comments on commit 24d0522

Please sign in to comment.