Skip to content

Conversation

@pasevin
Copy link
Collaborator

@pasevin pasevin commented Jan 5, 2026

Summary

This PR completes the UI Kit Monorepo Extraction project (spec 007), migrating the contracts-ui-builder to use the newly published @openzeppelin/ui-* packages from npm instead of internal workspace packages.

Changes Overview

Package Migration

  • Replaced all workspace dependencies (@openzeppelin/ui-builder-*) with npm packages (@openzeppelin/ui-*)
  • Updated all import paths across builder and adapter packages
  • Removed 7 migrated packages from the monorepo: types, utils, styles, ui, renderer, react-core, storage

Export Pipeline Updates

  • Updated PackageManager.ts with new internal package names
  • Updated versions.ts with new package versions
  • Updated all export templates to use @openzeppelin/ui-* namespace
  • Updated CSS imports to use @openzeppelin/ui-styles
  • Updated virtual modules configuration

Configuration Updates

  • Updated .changeset/config.json to remove migrated packages
  • Updated pnpm-workspace.yaml to reflect removed packages
  • Added local development support via .pnpmfile.cjs hook

Cleanup

  • Removed legacy legacyInternalPackages handling from PackageManager
  • Cleaned up all "UI Builder" references from exported code

Verification

  • All packages build successfully
  • All tests pass (254 tests)
  • Exported apps build and run correctly
  • No references to old package names in exported code

Related

Migration Impact

This is a breaking change for any external consumers using @openzeppelin/ui-builder-* packages directly. They should migrate to @openzeppelin/ui-* packages using the migration guide.

The UI Builder app itself continues to work normally - this change is transparent to end users of the builder.

pasevin added 26 commits January 1, 2026 15:02
- spec.md: Feature requirements, user stories (US1-US6), acceptance criteria
- plan.md: Technical context, constitution check, project structure
- tasks.md: 127 tasks organized by phase and user story
- research.md: Technology decisions (tsdown, changesets, SLSA)
- data-model.md: Package entities and dependency graph
- contracts/: Package.json and CI workflow contracts
- quickstart.md: Step-by-step migration guide
- checklists/: Quality validation checklist

Feature: Extract 7 core packages into new openzeppelin-ui monorepo
with independent versioning, CI/CD, and npm publishing.
- Add 'set -e' to fail on command errors instead of silently continuing
- Re-stage originally staged files after pnpm fix-all to include formatting fixes
- Add '|| true' to nvm use since it's non-fatal (version check is the gate)
- Mark Phase 1 tasks as completed in tasks.md
- Add 'set -e' to fail on command errors
- Add '|| true' to nvm use since it's non-fatal (version check is the gate)
- Consistent with pre-commit hook fixes
Replace xargs with while-read loop to properly handle filenames
containing spaces or special characters when re-staging files
after formatting fixes.
- T050: typecheck passes (resolved react-hook-form conflicts)
- T051: lint passes (added JSDoc comments across all packages)
- Fixed cyclic dependency: moved WalletConnectionWithSettings to renderer
- Fixed eslint-import-resolver-typescript missing dependency
- Fixed tsdown config (removed invalid splitting option)
Complete US1 (Internal Developer Imports Packages):
- T053-T059: Package READMEs created
- T060: UI Builder references removed from JSDoc
- T061: Package descriptions updated (pre-existing)
- T062: Root README created
…ages

- Add .pnpmfile.cjs hook for dynamic package resolution with LOCAL_UI=true
- Add dev:local and dev:npm convenience scripts to package.json
- Simplify PackageManager versioning: new UI packages use stable versions for staging
- Add LOCAL_DEVELOPMENT.md documentation
- Update tasks.md with T108a, T108b (setup script), T118a (legacy cleanup)
All 7 @OpenZeppelin/ui-* packages published at 1.0.0 with SLSA provenance
- Update package.json deps in builder and all adapters to use new npm packages
- Replace all @openzeppelin/ui-builder-* imports with @OpenZeppelin/ui-* equivalents
- Update vitest/vite configs with new package names and remove obsolete aliases
- Update .changeset/config.json to only link adapter packages
- Update test snapshots and template files with new package names
- Fix .pnpmfile.cjs to handle undefined context.dir

Package name mapping:
- @openzeppelin/ui-builder-types -> @openzeppelin/ui-types
- @openzeppelin/ui-builder-utils -> @openzeppelin/ui-utils
- @openzeppelin/ui-builder-ui -> @openzeppelin/ui-components
- @openzeppelin/ui-builder-renderer -> @openzeppelin/ui-renderer
- @openzeppelin/ui-builder-react-core -> @openzeppelin/ui-react
- @openzeppelin/ui-builder-storage -> @openzeppelin/ui-storage
- @openzeppelin/ui-builder-styles -> @openzeppelin/ui-styles

This completes Phase 5 (US3) of the UI Kit extraction migration.
- Update versions.ts with correct npm-published versions
- Fix update-export-versions.cjs to fetch external package versions from npm
- Update test expectations for new package names (@openzeppelin/ui-renderer)
- Update snapshots to match new versions
- Clean up CSS fix workarounds (no longer needed after openzeppelin-ui fix)

The @OpenZeppelin/ui-* packages now have CodeEditorField in a separate
entry point, resolving the CSS import issue in test environments.
Complete User Story 5 - Developer Uses Example App as Reference:
- T093-T102: Created basic-react-app example with all component demos
… react-core, storage, styles)

These packages have been migrated to the openzeppelin-ui repository
and are now consumed as npm dependencies.
…ackage

- Replace @Styles alias with direct npm package imports
- Add @source directive for Tailwind to scan npm packages
- Remove obsolete path aliases from vite and typescript configs
- Import rendererConfig from @openzeppelin/ui-renderer
- Update global CSS path to use npm package location
- Update type declarations for virtual modules
Enables Tailwind CSS to scan @OpenZeppelin npm packages for class names
in exported applications.
…emplate

Import from @openzeppelin/ui-renderer instead of @openzeppelin/ui-react
The serve command now detects when running within pnpm workspace and
automatically updates the @source directive to point to the monorepo
root node_modules where packages are hoisted.
Legacy internal packages (types, utils, ui, etc.) are no longer needed
since they have been migrated to npm packages.
- Add CSS stub plugin for Node.js test environment
- Configure server.deps.inline for external package transforms
- Use forks pool for better module isolation
@pasevin pasevin requested a review from a team as a code owner January 5, 2026 09:38
@pasevin pasevin requested a review from Copilot January 5, 2026 09:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the UI Kit monorepo extraction by migrating all dependencies from workspace packages (@openzeppelin/ui-builder-*) to published npm packages (@openzeppelin/ui-*). The changes update import paths across the codebase, remove migrated packages from the monorepo configuration, and add local development support for working with the new UI Kit repo.

Key changes:

  • Replaced all @openzeppelin/ui-builder-{types,utils,styles,components,renderer,react,storage} references with @openzeppelin/ui-* equivalents
  • Updated package.json files to use ^1.0.0 versions of npm packages instead of workspace dependencies
  • Added .pnpmfile.cjs hook for local development with sibling openzeppelin-ui repository

Reviewed changes

Copilot reviewed 300 out of 777 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Multiple TypeScript files Updated import statements from @openzeppelin/ui-builder-* to @openzeppelin/ui-* packages
package.json files Changed dependencies from workspace references to npm package versions (^1.0.0)
Documentation files Updated package names in code examples and explanatory text
.changeset/config.json Removed migrated packages from linked packages configuration
.pnpmfile.cjs Added new hook to support local development with openzeppelin-ui repo
.husky/* Added set -e for better error handling and made nvm use non-fatal

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pasevin pasevin merged commit bf69fdc into main Jan 5, 2026
11 checks passed
@pasevin pasevin deleted the 007-ui-kit-extraction branch January 5, 2026 10:11
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