fix: align Pro install machine fingerprint - #781
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe PR improves Pro license machine-id generation by integrating native system fingerprinting via ChangesPro Machine-ID Generation with Native Fingerprinting
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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 |
📊 Coverage ReportCoverage report not available
Generated by PR Automation (Story 6.1) |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/installer/tests/unit/pro-setup-machine-id.test.js (1)
4-4: ⚡ Quick winUse an absolute import for
pro-setup.Import this module through the package’s exported path instead of reaching into
../../src/...so the test follows the repo’s import rule and stays stable if the folder layout changes. As per coding guidelines, "Use absolute imports instead of relative imports in all code".🤖 Prompt for 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. In `@packages/installer/tests/unit/pro-setup-machine-id.test.js` at line 4, Replace the relative require('../../src/wizard/pro-setup') with the package’s public export path and import the _testing symbol from that export (e.g., require('installer/wizard/pro-setup') or the package root export that exposes pro-setup); update the statement that currently references _testing so it imports from the package’s exported module instead of ../../src/wizard/pro-setup to follow the absolute-import guideline and keep tests stable if folder layout changes.
🤖 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 `@packages/installer/tests/unit/pro-setup-machine-id.test.js`:
- Around line 7-15: Replace the relative import with the package's absolute
import for the pro-setup module and update the test to force the legacy branch:
require the pro-setup module (the one exporting generateMachineId,
generateNativeMachineId, generateLegacyMachineId and loadProModule) via absolute
import, mock the node-machine-id export so machineIdSync (or the module used by
generateNativeMachineId) throws or returns a non-string to make
generateNativeMachineId return null, mock the os APIs (hostname, cpus,
networkInterfaces) to fixed, deterministic values so generateLegacyMachineId
produces a stable hash, and mock loadProModule('license-crypto') to a
no-op/undefined so it doesn’t short-circuit the code path; then call
generateMachineId() and assert it equals the deterministic legacy hash.
---
Nitpick comments:
In `@packages/installer/tests/unit/pro-setup-machine-id.test.js`:
- Line 4: Replace the relative require('../../src/wizard/pro-setup') with the
package’s public export path and import the _testing symbol from that export
(e.g., require('installer/wizard/pro-setup') or the package root export that
exposes pro-setup); update the statement that currently references _testing so
it imports from the package’s exported module instead of
../../src/wizard/pro-setup to follow the absolute-import guideline and keep
tests stable if folder layout changes.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4e57d94a-976d-49ac-a0ad-80e422a096bb
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (3)
packages/installer/package.jsonpackages/installer/src/wizard/pro-setup.jspackages/installer/tests/unit/pro-setup-machine-id.test.js
* fix: align pro install machine fingerprint * test: cover pro install machine id fallback
|
🎉 This PR is included in version 5.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Validation
Notes
Summary by CodeRabbit
Improvements
Chores
Tests