feat: add isNub runtime detection#197
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds an ChangesisNub detection flag
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: Related PRs: None identified. Suggested labels: None identified. Poem A tiny flag joins runtime lore, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 20-27: The README has two consecutive `> [!NOTE]` blockquotes
separated by a blank line, which markdownlint flags as ambiguous. In the README
section containing the `isNode` and `isNub` notes, remove the empty line between
the two note blocks so they read as separate adjacent blockquotes without extra
separation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4a22bfad-e009-4f3b-8444-abeca2dded4f
📒 Files selected for processing (5)
AGENTS.mdREADME.mdsrc/index.tssrc/runtimes.tstest/index.test.ts
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #197 +/- ##
===========================================
+ Coverage 82.08% 95.23% +13.15%
===========================================
Files 10 5 -5
Lines 374 63 -311
Branches 33 21 -12
===========================================
- Hits 307 60 -247
+ Misses 61 2 -59
+ Partials 6 1 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds
isNubto detect Nub, a CLI that augments Node.js through Node's own extension surfaces — not a separate runtime. Under Nub,process.versions.nodeis set, so detection is additive:isNubistruewhileisNodestaystrueandruntimestays"node". It's a layer on Node, not a sibling of Bun/Deno, so it's deliberately not inruntimeChecksorRuntimeName.The signal is
process.versions.nub, Nub's self-identification marker (process.versions.<runtime>convention, cf..bun,.electron) — mirroringisNode = !!process?.versions?.node. Absent under Nub's--node/NODE_COMPATpassthrough.Summary by CodeRabbit
New Features
isNub, to detect Nub environments.isNubfrom the main package entry point.Documentation
isNub.isNodeandruntimeremain unchanged.Tests
isNubisfalseby default.