Skip to content

feat: migrate from nodeenv to bunenv for Bun environment management#136

Merged
JacobCoffee merged 1 commit intomainfrom
feature/migrate-to-bunenv
Nov 24, 2025
Merged

feat: migrate from nodeenv to bunenv for Bun environment management#136
JacobCoffee merged 1 commit intomainfrom
feature/migrate-to-bunenv

Conversation

@JacobCoffee
Copy link
Owner

Summary

Migrate from nodeenv to bunenv for managing Bun environments in the frontend tooling workflow.

Motivation

bunenv is purpose-built for Bun (vs nodeenv being Node.js-focused) and provides:

  • GitHub Releases API integration for Bun versions
  • Modern, actively maintained codebase
  • Same proven architecture as nodeenv
  • Optimized specifically for Bun's binary distribution model

Changes

Modified Files

Makefile

- @nodeenv --python-virtualenv
+ @bunenv --python-virtualenv --bun=latest

pyproject.toml

  • Added bunenv>=0.1.0 to dev dependencies

uv.lock

  • Updated with bunenv dependency

Benefits

Purpose-Built - Designed specifically for Bun, not adapted from Node.js
Modern API - Uses GitHub Releases API vs legacy nodejs.org index
Active Development - Maintained with latest tooling (uv, ruff, ty)
Zero Breaking Changes - Drop-in replacement for nodeenv
Same Architecture - Based on nodeenv's proven design

Testing

  • bunenv installs correctly via uv sync --group dev
  • bunenv command accessible: uv run bunenv --version0.1.0
  • Pre-commit hooks pass
  • CI validation pending

Migration

The migration is seamless:

Before:

nodeenv --python-virtualenv
bun install

After:

bunenv --python-virtualenv --bun=latest
bun install

Both create isolated Bun environments within Python virtualenvs. The activation and deactivation mechanisms are identical.

Validation

Please verify CI passes, particularly:

  • validate job (linting, type-checking)
  • test job (pytest)
  • build-docs job (if it uses frontend tooling)

Related

This PR serves as validation before bunenv 1.0 release.


🤖 Generated with Claude Code

Replace nodeenv with bunenv for frontend tooling isolation:

**Changes:**
- Makefile: Replace `nodeenv --python-virtualenv` with `bunenv --python-virtualenv --bun=latest`
- pyproject.toml: Add `bunenv>=0.1.0` to dev dependencies
- uv.lock: Update lock file with bunenv dependency

**Benefits:**
✅ Purpose-built for Bun (vs Node.js-focused nodeenv)
✅ Maintained actively with modern tooling
✅ GitHub Releases API integration (vs nodejs.org index)
✅ Same proven architecture as nodeenv
✅ Zero breaking changes to workflow

**Testing:**
Verified bunenv 0.1.0 installs correctly via `uv sync --group dev`

**Migration Path:**
`nodeenv --python-virtualenv` → `bunenv --python-virtualenv --bun=latest`

No other changes required - bunenv provides the same isolation
and activation mechanism, just optimized for Bun.

Related: JacobCoffee/bunenv#7 (bunenv GitHub Action)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @JacobCoffee, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@railway-app
Copy link

railway-app bot commented Nov 24, 2025

🚅 Environment byte-pr-136 in byte has no services deployed.

@railway-app railway-app bot temporarily deployed to byte (byte / byte-pr-136) November 24, 2025 02:35 Destroyed
@github-actions
Copy link

Documentation preview will be available shortly at https://jacobcoffee.github.io/byte-docs-preview/136

@JacobCoffee JacobCoffee merged commit 5fc5110 into main Nov 24, 2025
4 checks passed
@JacobCoffee JacobCoffee deleted the feature/migrate-to-bunenv branch November 24, 2025 02:39
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