Skip to content

Conversation

@pasevin
Copy link
Collaborator

@pasevin pasevin commented Jan 21, 2026

Summary

  • Add support for exporting pnpm patch files from adapter packages to exported applications
  • Enable adapters (like Midnight) to specify patches for browser compatibility that get included in exports
  • Improve dev:local script to automatically build openzeppelin-ui packages

Changes

Export System

  • Add patchedDependencies config to AdapterConfig interface
  • Add getPatchedDependencies() method to PackageManager
  • Add copyAdapterPatchFiles assembler for chain-agnostic patch copying
  • Update updatePackageJson to include pnpm.patchedDependencies in exported package.json
  • Integrate patch copying into AppExportSystem export pipeline

Midnight Adapter

  • Add patchedDependencies config with all 7 SDK patches

Developer Experience

  • Improve dev:local script to auto-build openzeppelin-ui packages before installing
  • Support LOCAL_UI_PATH env var for custom openzeppelin-ui locations
  • Update LOCAL_DEVELOPMENT.md documentation

Test plan

  • Added tests for getPatchedDependencies() in PackageManager
  • Added tests for copyAdapterPatchFiles assembler
  • All 267 tests passing
  • Manual test: Export a Midnight form and verify patches are included

Related

Requires openzeppelin-ui PR for AdapterConfig.patchedDependencies type (separate PR)

pasevin and others added 14 commits January 20, 2026 12:53
- Remove broken badges (codecov, CodeClimate maintainability, PR-only workflows)
- Rename "Publish" badge to "Release" to match GitHub display
- Fix license text to correctly state AGPL v3 (was incorrectly MIT)
- Update hyperlinks to point to openzeppelin-ui repo for extracted packages
- Update renderer package description with accurate component list
- Remove outdated CI workflow references
- Restructure package documentation for clarity

Also fixes Vite glob import type definitions to use updated query syntax
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The builder application is a deployable website, not a publishable npm
package. This refactor moves it to apps/builder to properly distinguish
it from the adapter packages that are published to npm.

Changes:
- Move packages/builder to apps/builder
- Update pnpm-workspace.yaml to include apps/*
- Update root package.json workspaces and export-app script
- Update GitHub Actions workflows (export-testing, coverage,
  check-versions, update-versions)
- Update Dockerfile COPY path
- Update Storybook config paths
- Update pre-push hook version check path
- Update eslint config and ignore patterns
- Update all documentation references (README, CONTRIBUTING,
  constitution, ADAPTER_ARCHITECTURE, RELEASE)
- Update scripts/update-export-versions.cjs path

The adapter packages remain in packages/ and continue to be published
via changesets. The builder (private: true) was never published.
The vitest config had relative paths to adapter packages that assumed
the builder was in packages/builder. Now that it's in apps/builder,
the paths need to go through ../../packages/adapter-* instead of
../adapter-*.
Updates paths in:
- vite-plugins/virtual-content-loader.ts - template CSS path
- export-app.cjs - CLI builder directory paths
- components.json - styles CSS path
- Various comments and documentation references
The styles package was moved to openzeppelin-ui repo and is now
consumed as @openzeppelin/ui-styles from npm, not packages/styles.
Midnight networks were not loading because the SDK patches defined in
packages/adapter-midnight/package.json were not being applied. pnpm only
applies patches from the root workspace package.json.

Changes:
- Add all 7 Midnight SDK patches to root patchedDependencies
- Add version overrides to pin @midnight-ntwrk packages to 2.0.2
  (the versions that have compatible patches)

This fixes the "No networks found for Midnight" regression.
Add support for exporting pnpm patch files from adapter packages to
exported applications. This enables adapters like Midnight to specify
patches for browser compatibility fixes that get included in exports.

Changes:
- Add `patchedDependencies` config to Midnight adapter
- Add `getPatchedDependencies()` to PackageManager
- Add `copyAdapterPatchFiles` assembler for chain-agnostic patch copying
- Update `updatePackageJson` to include `pnpm.patchedDependencies`
- Integrate patch copying into AppExportSystem export pipeline
- Improve `dev:local` script to auto-build openzeppelin-ui packages
- Update LOCAL_DEVELOPMENT.md with new workflow documentation
- Add comprehensive tests for new functionality
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 pull request adds support for exporting pnpm patch files from adapter packages to exported applications, enabling chain-specific compatibility patches (like Midnight SDK browser fixes) to be automatically included in exported projects.

Changes:

  • Added chain-agnostic patch export functionality to the export system, allowing adapters to specify patches in their config that get copied to exported apps
  • Updated Midnight adapter configuration to declare its 7 SDK patches via patchedDependencies field
  • Enhanced dev:local script to automatically build openzeppelin-ui packages before linking, improving developer experience

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
apps/builder/src/export/assemblers/copyAdapterPatchFiles.ts New assembler that copies patch files from adapter packages to exported projects using Vite's import.meta.glob
apps/builder/src/export/assemblers/__tests__/copyAdapterPatchFiles.test.ts Comprehensive unit tests for the patch copying functionality (mocked due to Vite-specific features)
apps/builder/src/export/assemblers/index.ts Exports the new copyAdapterPatchFiles function
apps/builder/src/export/PackageManager.ts Added getPatchedDependencies() method and updated updatePackageJson() to include pnpm.patchedDependencies configuration
apps/builder/src/export/__tests__/PackageManager.test.ts Added tests for getPatchedDependencies() and package.json patch configuration
apps/builder/src/export/AppExportSystem.ts Integrated copyAdapterPatchFiles into the export pipeline after package.json updates
packages/adapter-midnight/src/config.ts Added patchedDependencies configuration with 7 Midnight SDK patches and removed obsolete comment about bundled patches
package.json Enhanced dev:local script to auto-build openzeppelin-ui packages and support LOCAL_UI_PATH environment variable
docs/LOCAL_DEVELOPMENT.md Updated documentation to reflect new auto-build behavior and streamlined workflow instructions

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

@pasevin pasevin merged commit a545bac into main Jan 21, 2026
13 checks passed
@pasevin pasevin deleted the feat/export-adapter-patches branch January 21, 2026 11:32
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