Skip to content

fix(packages): await metadataPayloadBuilder.build() in CreatePackageUseCase#1050

Open
ifoche wants to merge 2 commits intodevelopmentfrom
fix/empty-module-package-contents
Open

fix(packages): await metadataPayloadBuilder.build() in CreatePackageUseCase#1050
ifoche wants to merge 2 commits intodevelopmentfrom
fix/empty-module-package-contents

Conversation

@ifoche
Copy link
Copy Markdown
Member

@ifoche ifoche commented Mar 4, 2026

Summary

  • Fix missing await on metadataPayloadBuilder.build() in CreatePackageUseCase, which caused a raw Promise to be stored as package contents instead of the resolved metadata payload — making all module-generated packages appear empty
  • Remove unnecessary generic type parameters from TransformationRepository.mapPackageTo/mapPackageFrom to prevent Promise objects from being silently accepted as payload (compile-time safety)
  • Add unit tests for CreatePackageUseCase (5 test cases)

Related Tasks

Test plan

  • Run yarn test — all 393 tests pass (48 files)
  • Run yarn build core-app — builds cleanly
  • Manual: create a module with a dataset, generate a package, verify the package contains the dataset metadata
  • Manual: import the generated package on another instance, verify elements appear in the result summary
  • Manual: download package as JSON, verify metadata objects are present
  • Manual: compare package with local instance, verify diff shows actual differences

🤖 Generated with Claude Code

ifoche and others added 2 commits March 4, 2026 13:01
…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>
@bundlemon
Copy link
Copy Markdown

bundlemon Bot commented Mar 4, 2026

BundleMon

No change in files bundle size

Groups updated (1)
Status Path Size Limits
Build Folder
./**/*
2.78MB (-42B 0%) +20%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

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.

1 participant