Conversation

Karnaukhov-kh

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

Key Changes:

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

Closes #1480

@github-actions-actions bot added 🛂 TestUnit tests, e2e tests, integration tests, test coverage🛠️ CDKCDK relatedlabels Jun 11, 2025
@nx-cloudNx Cloud

View your CI Pipeline Execution ↗ for commit c75f07c.

CommandStatusDurationResult
nx affected -t lint build test component-test e...❌ Failed28sView ↗
nx build docs✅ Succeeded1m 7sView ↗
nx-cloud record -- npx nx format:check✅ Succeeded1sView ↗

☁️ Nx Cloud last updated this comment at 2025-06-19 15:10:31 UTC

Sign up for free to join this conversation on . Already have an account? Sign in to comment
🛠️ CDKCDK related🛂 TestUnit tests, e2e tests, integration tests, test coverage
None yet

Successfully merging this pull request may close these issues.

Update transformation looses typing
@Karnaukhov-kh