-
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
package class-transformer introduces breaking changes to the model.ts generated file #126
Comments
HeatherFlux
referenced
this issue
Jun 3, 2024
* Runtime(v1.0.6) + Tooling(v1.0.4) version bump * Update ci workflow to install Docker with --cask option for Mac OSX * Update ci workflow to install colima for Mac OSX * Downgrade the macOS version used for Docker tests to macos-13 to fix recent Docker build failures * Downgrade the macOS version used for Docker tests to macos-12 to fix recent Docker build failures --------- Co-authored-by: Jared Deiner <[email protected]>
HeatherFlux
changed the title
package class-transformer introduces potential breaking changes to the model.ts generated file
package class-transformer introduces breaking changes to the model.ts generated file
Jun 4, 2024
See a fix was merged in, am closing this issue |
Thank you @HeatherFlux with your help with this |
Hey you did the work I just dug around a bit lol |
Looks like it is still present |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the package
"class-transformer": "^0.3.1"
is using a carat^
for its version. On a install and build of the cfn cli it pulls version 0.3.2 from the registry. Version 0.3.2 has changed its interface for the@transform
decorator fromto
When doing the npm install with 0.3.2 you will get the following message
For any developer using this with a local class-transformer at 0.3.1 you would see no error in the generated model.ts file and no error in the cloudwatch logs since the logger proxy isn't instantiated until after the
plainToClass
function is called in the code. This function errors at the model.ts file and returns no transformed object. When manually updating the model.ts file to use the new interface the class-transformer functions correctly and no longer strips the fields and locking class-transformer to 0.3.2Proposed Fix:
The cfn generate command should be updated to use the new class-transformer interfaces or the class-transformer package should be locked at 0.3.1 and a new patch should go out.
Further Investigation
Further investigation should be put into the current tsconfig using the node14 settings as well given node14 is no longer supported in aws lambdas.
The text was updated successfully, but these errors were encountered: