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

Cleanup code and tests for package lifecycle work #127

Merged

Conversation

kddejong
Copy link
Contributor

Issue #, if available:

Description of changes:

  • Cleanup code and tests for package lifecycle work

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

@mrinaudo-aws mrinaudo-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kddejong kddejong merged commit e656c33 into aws-cloudformation:master Apr 23, 2024
9 checks passed
@kddejong kddejong deleted the lifecycle/nodejs/v20-more branch April 23, 2024 17:11
Copy link

@HeatherFlux HeatherFlux left a 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 @@
},

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) =>

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';

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"
},

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):
)

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

@kddejong
Copy link
Contributor Author

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

Let's get you back up and running. You can't fork and submit a PR?

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

Successfully merging this pull request may close these issues.

4 participants