fix(packages): await metadataPayloadBuilder.build() in CreatePackageUseCase#1050
Open
ifoche wants to merge 2 commits intodevelopmentfrom
Open
fix(packages): await metadataPayloadBuilder.build() in CreatePackageUseCase#1050ifoche wants to merge 2 commits intodevelopmentfrom
ifoche wants to merge 2 commits intodevelopmentfrom
Conversation
…seCase The async build() call was missing `await`, causing a raw Promise object to be stored as package contents instead of the resolved MetadataPackage. This made all module-generated packages appear empty (0 elements on import, empty JSON downloads, no diff data, empty mapping tab). Also removes unnecessary generic type parameters from TransformationRepository to prevent Promise objects from being silently accepted as payload, and adds unit tests for CreatePackageUseCase. Closes: https://app.clickup.com/t/869bvjxj9 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Include the OpenSpec proposal, design, specs, and tasks for the fix-empty-module-package-contents change. Add .claude/ to .gitignore. Also includes prettier formatting applied by pre-commit hook. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
BundleMonNo change in files bundle size Groups updated (1)
Final result: ✅ View report in BundleMon website ➡️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
awaitonmetadataPayloadBuilder.build()inCreatePackageUseCase, which caused a raw Promise to be stored as package contents instead of the resolved metadata payload — making all module-generated packages appear emptyTransformationRepository.mapPackageTo/mapPackageFromto prevent Promise objects from being silently accepted as payload (compile-time safety)CreatePackageUseCase(5 test cases)Related Tasks
Test plan
yarn test— all 393 tests pass (48 files)yarn build core-app— builds cleanly🤖 Generated with Claude Code