Repository navigation
feat(cli): warn that the next major will require Node 20+ #2411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,11 @@ if (parseInt(process.version.split('.')[0].substring(1), 10) < 14) { | |
| process.exit(1); | ||
| } | ||
|
|
||
| // heads up ahead of the next major release, which raises the minimum to Node 20 | ||
| console.warn('Heads up! The next major version of @percy/cli will require Node 20+. ' + ( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Medium] Warning has no mute switch and prints on every invocation Every other user-facing warning in this codebase can be silenced — Suggestion: Called out as intentional in the PR description, so not blocking — but it is a product decision with wide reach and deserves an explicit second sign-off. If the noise proves excessive, Reviewer: stack-code-reviewer |
||
| 'Either pin @percy/cli to its current major version, or make sure your setup runs ' + | ||
| 'on Node 20+, before the next major release.')); | ||
|
|
||
| import('../dist/index.js') | ||
| .then(async ({ percy, checkForUpdate }) => { | ||
| await checkForUpdate(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Low] No tracking reference for removal, and no note on why
console.warnTwo small things this comment could carry:
engines.nodeto>=20. If forgotten it becomes permanently wrong — telling Node 20+ users that "the next major" will require Node 20+, which they are already past.console.warnis correct here (@percy/loggeronly exists after the dynamicimport('../dist/index.js')resolves), but nothing says so — a future contributor "cleaning this up" intologger.warn(...)would introduce a load-order bug.Suggestion:
// TODO(PER-XXXX): remove once vX ships with engines.node >=20. Uses console.warn because @percy/logger is not loaded until the import below.Reviewer: stack-code-reviewer