-
Notifications
You must be signed in to change notification settings - Fork 15
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
Cleanup code and tests for package lifecycle work #127
Cleanup code and tests for package lifecycle work #127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a few bugs while testing. What is worse is this no longer works as a package due to the way that the models.ts file in templates was updated.
I tried to create a PR but I don't have access to create PRs
@@ -18,7 +18,7 @@ | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class Transformer is still 0.3.1 here and needs to be bumped to 0.5.1
@@ -33,7 +31,7 @@ export class {{ model|uppercase_first_letter }} extends BaseModel { | |||
@Type(() => {{ inner_type.type }}) | |||
{% else %} | |||
@Transform( | |||
(value: any, obj: any) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@transform
should look like this
@Transform(
(params: TransformFnParams) =>
transformValue({{ inner_type.wrapper_type }}, '{{ name|lowercase_first_letter|safe_reserved }}', params.value, params.obj, [{{ inner_type.classes|join(', ') }}]),
{
toClassOnly: true,
}
)
@@ -4,8 +4,6 @@ import { Exclude, Expose, Type, Transform } from 'class-transformer'; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import from class-transformer should be
import { Exclude, Expose, Type, Transform, TransformFnParams } from 'class-transformer';
@@ -8,7 +8,7 @@ | |||
"dist" | |||
], | |||
"scripts": { | |||
"build": "npx tsc", | |||
"build": "npx tsc --skipLibCheck", | |||
"prepack": "npm run build", | |||
"test": "echo \"Error: no test specified\" && exit 1" | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lib_path is still set to 1.0.1 and needs to be updated to 1.0.6 in the codegen.py file
@@ -305,6 +305,7 @@ def _build(self, base_path): | |||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 29 of this file is still at version 1.0.1 and needs to be at 1.0.6
Let's get you back up and running. You can't fork and submit a PR? |
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.