Skip to content

Conversation

@pasevin
Copy link
Collaborator

@pasevin pasevin commented Nov 27, 2025

Problem

The export tests were failing in the update-versions.yml workflow with:

Error: Failed to resolve entry for package "@openzeppelin/ui-builder-adapter-evm". 
The package may have incorrect main/module/exports specified in its package.json.

This was happening because the adapter packages weren't included in the vitest config's resolve.alias configuration. When Vitest tries to resolve these workspace packages, it needs explicit aliases to find the built dist/index.js files.

Solution

Added aliases for all adapter packages (evm, solana, stellar, midnight) to:

  • resolve.alias - maps package names to their dist entry points
  • dedupe - prevents duplicate package instances
  • optimizeDeps.include - pre-bundles for faster tests
  • ssr.noExternal - ensures proper handling in test SSR phase

Related

This fixes the underlying issue that was preventing PR #244 (Version Packages) from succeeding. After merging:

  1. The update-versions.yml workflow should be able to run the export tests
  2. Snapshots will be properly updated to 0.17.0
  3. The Version Packages PR can be merged

Test plan

  • CI passes on this PR
  • Rerun the update-versions workflow on changeset-release/main after merging
  • Verify snapshots are updated and PR Version Packages #244 succeeds

The export tests were failing because Vitest couldn't resolve the adapter
packages (@openzeppelin/ui-builder-adapter-*). This is because they weren't
included in the resolve.alias configuration.

Added aliases for all adapter packages (evm, solana, stellar, midnight) to:
- resolve.alias
- dedupe
- optimizeDeps.include
- ssr.noExternal

This fixes the "Failed to resolve entry for package" error in export tests.
@pasevin pasevin requested a review from a team as a code owner November 27, 2025 10:47
@pasevin pasevin merged commit 97cd97b into main Nov 27, 2025
10 checks passed
@pasevin pasevin deleted the fix/vitest-adapter-aliases branch November 27, 2025 10:52
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.

2 participants