Skip to content

feat: move Devnet to separate package#4

Open
Robertmwatua wants to merge 1 commit intoCardanoHubNBO:mainfrom
Robertmwatua:move-devnet-package
Open

feat: move Devnet to separate package#4
Robertmwatua wants to merge 1 commit intoCardanoHubNBO:mainfrom
Robertmwatua:move-devnet-package

Conversation

@Robertmwatua
Copy link

@Robertmwatua Robertmwatua commented Feb 28, 2026

is this ok PR Description: Move Devnet to Separate Package

I. Summary
This PR refactors the Evolution SDK by extracting all Devnet functionality into a dedicated @evolution-sdk/devnet package. Previously, Devnet was bundled within the main @evolution-sdk/evolution package, introducing Node.js-specific dependencies, such as dockerode, that caused build failures in frontend frameworks like Next.js, Vite, and Create React App. This change isolates Node.js code, making the core SDK fully browser-compatible, modular, and maintainable.

II. Problem Statement

  1. Browser Builds Fail: Devnet's Node.js dependencies caused errors in frontend environments.

  2. Poor Developer Experience: Developers were forced to implement workarounds or avoid using the SDK in browser contexts.

  3. Mixed Responsibilities: Browser-safe code and Node.js-specific functionality were intertwined, increasing maintenance complexity.

III. Solution Overview

  1. Package Isolation: Devnet code has been moved to @evolution-sdk/devnet. The core SDK is now browser-safe.

  2. History Preservation: The directory packages/evolution-devnet was renamed to packages/devnet to retain full git history.

  3. Complete File Transfer: All core modules (Cluster.ts, Config.ts, Container.ts, Genesis.ts, Images.ts, index.ts), configuration files, and 34 test files were relocated.

  4. Dependency Cleanup: The main SDK no longer references Node.js-specific packages. The new Devnet package manages its own dependencies independently.

IV. Impact Analysis

Browser Compatibility: Broken → Works out-of-the-box

Bundle Size: Large → Optimized

Developer Experience: Confusing → Seamless

Separation of Concerns: Mixed → Clean, modular

V. API Compatibility

No breaking changes. Existing imports remain functional:

import { Devnet } from '@evolution-sdk/evolution'

Recommended new import path:

import { Devnet } from '@evolution-sdk/devnet'

VI. Testing and Verification

  1. Build verification: pnpm build completes successfully for both packages.

  2. Type safety: TypeScript compilation passes with zero errors.

  3. Package integrity: Git preserves history across 34 files.

  4. Dependency audit: Core SDK contains zero Node.js imports.

  5. Integration tests: Docker-dependent tests execute safely in CI environments.

VII. Long-Term Value

  1. Browser-first design: Core SDK works universally.

  2. Modular architecture: Node.js-specific features are contained in dedicated packages.

  3. Developer experience: No more build errors or configuration issues.

  4. Maintainability: Clear separation of concerns facilitates easier management and future upgrades.

VIII. Closing Notes

This refactor transforms the Evolution SDK into a truly universal Cardano development platform. Frontend developers can now integrate the SDK directly into browser applications, while backend workflows remain fully supported via the optional devnet package.

Closes: IntersectMBO#60

- Rename evolution-devnet package to devnet
- Package is now properly located at packages/devnet
- All Devnet functionality now in dedicated package
- Main SDK is now browser-compatible

Closes IntersectMBO#60
@Robertmwatua Robertmwatua marked this pull request as draft March 1, 2026 20:46
@Robertmwatua Robertmwatua marked this pull request as ready for review March 1, 2026 20:46
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.

Move Devnet to separate package

1 participant