Skip to content

Prefix and scope the internal 'core' envio platform specific packages#937

Closed
JasoonS wants to merge 3 commits intomainfrom
envio-prefix-core-packages
Closed

Prefix and scope the internal 'core' envio platform specific packages#937
JasoonS wants to merge 3 commits intomainfrom
envio-prefix-core-packages

Conversation

@JasoonS
Copy link
Contributor

@JasoonS JasoonS commented Feb 6, 2026

Changes looked good (AI helped me with a command to review it):

# 1. Test template substitution
cd codegenerator/cli/npm
export node_pkg="core-linux-x64" node_os="linux" node_arch="x64" version="2.0.0-test"
envsubst < package.json.tmpl > /tmp/test.json && cat /tmp/test.json | grep '"name"'
# Should show: "name": "@envio-dev/core-linux-x64"

# 2. Verify binary exists
ls -la ../../target/release/envio 2>/dev/null || echo "Build first with: cd ../.. && cargo build --release"

# 3. Check main package template
cd envio
envsubst < package.json.tmpl > /tmp/main.json && cat /tmp/main.json | grep -A5 optionalDependencies
# Should show @envio-dev/core-* packages

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated NPM package naming scheme to use scoped packages under @envio-dev namespace instead of non-scoped packages.
    • Modified release workflow and binary resolution paths to align with the new package naming convention.
    • Updated optional dependencies to reference the new scoped package names across the build infrastructure.

@JasoonS JasoonS requested a review from DZakh February 6, 2026 09:23
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

The changes rename the core package from "envio" to "@envio-dev/core" in the NPM release workflow, package templates, and binary resolution logic, affecting platform-specific package naming and node_modules path resolution.

Changes

Cohort / File(s) Summary
Package Naming & Scoping
.github/workflows/release.yml, codegenerator/cli/npm/package.json.tmpl
Updated package naming from unscoped to scoped format: internal_name variable set to "core", and generated package name prefixed with "@envio-dev/" scope.
Platform-Specific Dependencies
codegenerator/cli/npm/envio/package.json.tmpl
Updated optionalDependencies entries from unscoped packages (envio-linux-x64, envio-darwin-x64, etc.) to scoped packages (@envio-dev/core-linux-x64, @envio-dev/core-darwin-x64, etc.).
Binary Resolution Logic
codegenerator/cli/npm/envio/bin.js
Updated require.resolve path and error messaging to point to scoped package location @envio-dev/core-${os}-${arch}/bin/envio${extension} instead of unscoped envio-${os}-${arch}.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • JonoPrest

Poem

🐰 A rabbit hops with glee so bright,
As envio becomes @envio-dev/core's light,
Scoped packages bound with npm care,
Platform-specific binaries everywhere!
The namespace grows, the code runs true,
Hopping forward with this brand new view! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: prefixing and scoping platform-specific packages with @envio-dev and renaming from 'envio' to 'core' across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch envio-prefix-core-packages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@codegenerator/cli/npm/envio/bin.js`:
- Around line 11-15: Update the JSDoc to match the actual package naming used in
the code: replace references to "@envio-dev/envio-${os}-${arch}" with
"@envio-dev/core-${os}-${arch}" and adjust the example accordingly so it aligns
with the string passed to require.resolve in bin.js (the require.resolve call
that constructs the platform-specific package name). Ensure the note about
Windows `.exe` behavior and the os/arch `@see` links remain accurate.

Comment on lines +11 to +15
* The naming convention is @envio-dev/envio-${os}-${arch}
* If the platform is `win32` or `cygwin`, executable will include a `.exe` extension
* @see https://nodejs.org/api/os.html#osarch
* @see https://nodejs.org/api/os.html#osplatform
* @example "x/xx/node_modules/envio-darwin-arm64"
* @example "x/xx/node_modules/@envio-dev/envio-darwin-arm64"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

JSDoc comments are inconsistent with the actual code.

Lines 11 and 15 still reference @envio-dev/envio-${os}-${arch}, but the actual require.resolve on line 31 uses @envio-dev/core-${os}-${arch}. These comments should be updated to match.

📝 Proposed fix
-  * The naming convention is `@envio-dev/envio-`${os}-${arch}
+  * The naming convention is `@envio-dev/core-`${os}-${arch}
   * If the platform is `win32` or `cygwin`, executable will include a `.exe` extension
   * `@see` https://nodejs.org/api/os.html#osarch
   * `@see` https://nodejs.org/api/os.html#osplatform
-  * `@example` "x/xx/node_modules/@envio-dev/envio-darwin-arm64"
+  * `@example` "x/xx/node_modules/@envio-dev/core-darwin-arm64"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* The naming convention is @envio-dev/envio-${os}-${arch}
* If the platform is `win32` or `cygwin`, executable will include a `.exe` extension
* @see https://nodejs.org/api/os.html#osarch
* @see https://nodejs.org/api/os.html#osplatform
* @example "x/xx/node_modules/envio-darwin-arm64"
* @example "x/xx/node_modules/@envio-dev/envio-darwin-arm64"
* The naming convention is `@envio-dev/core-`${os}-${arch}
* If the platform is `win32` or `cygwin`, executable will include a `.exe` extension
* `@see` https://nodejs.org/api/os.html#osarch
* `@see` https://nodejs.org/api/os.html#osplatform
* `@example` "x/xx/node_modules/@envio-dev/core-darwin-arm64"
🤖 Prompt for AI Agents
In `@codegenerator/cli/npm/envio/bin.js` around lines 11 - 15, Update the JSDoc to
match the actual package naming used in the code: replace references to
"@envio-dev/envio-${os}-${arch}" with "@envio-dev/core-${os}-${arch}" and adjust
the example accordingly so it aligns with the string passed to require.resolve
in bin.js (the require.resolve call that constructs the platform-specific
package name). Ensure the note about Windows `.exe` behavior and the os/arch
`@see` links remain accurate.

@DZakh
Copy link
Member

DZakh commented Feb 6, 2026

Sorry for the hustle, but I'd like to postpone it a little bit. I want to start using napi for the envio-cli package, so I'm not sure how it'll require changing the package name. I don't want to pollute npm with too many packages like this

@DZakh DZakh closed this Feb 6, 2026
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