Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Karnaukhov-kh
Copy link
Member

@Karnaukhov-kh Karnaukhov-kh commented Jun 11, 2025

update, upsert, and toDictionary functions were losing the prototype chain of objects, causing instanceof checks to fail. Spread operator was the cause of it.

Key Changes:

  • Prototype Preservation: Replaced the use of the spread operator with Object.create and Object.assign to preserver prototype chain.
  • Unit Tests: Added unit tests in update.spec.ts, upsert.spec.ts, and toDictionary.spec.ts to verify that class instances maintain the prototype after transform.

Closes #1480

@github-actions github-actions bot added πŸ›‚ Test Unit tests, e2e tests, integration tests, test coverage πŸ› οΈ CDK CDK related labels Jun 11, 2025
@Karnaukhov-kh Karnaukhov-kh requested a review from hoebbelsB June 11, 2025 17:32
Copy link

nx-cloud bot commented Jun 11, 2025

View your CI Pipeline Execution β†— for commit c75f07c.

Command Status Duration Result
nx affected -t lint build test component-test e... ❌ Failed 15s View β†—
nx-cloud record -- npx nx format:check βœ… Succeeded 1s View β†—

☁️ Nx Cloud last updated this comment at 2025-07-02 18:28:29 UTC

@bjarne-callewaert
Copy link

@Karnaukhov-kh @hoebbelsB
Is anything blocking this PR from being merged?
If there's something I could help with, feel free to reach out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
πŸ› οΈ CDK CDK related πŸ›‚ Test Unit tests, e2e tests, integration tests, test coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update transformation looses typing
2 participants