ITADN

Wrong assumption in Node version check for version below 1.0.0

#778Closedidleberg 创建于 2026-01-28
I
idlebergcommented
## Description I believe that version 11 introduced a check, notifying the user about incorrect version bumps when `engines.node` has been updated. This check does not respect the peculiarities of releases below 1.0.0 For example, I raised `engines.node` from `>= 20` to `>= 20.19` and bumped my packages from `0.1.2` to `0.2.0`. This produced an error: > ✖ Error: Raising minimum Node.js version from 20.0.0 to 20.19.0 requires a major version bump. The current release is a minor bump. ## Steps to reproduce 1. Create a package with any version below 1.0.0 2. Do a minor version bump for `engines.node` 3. Try publishing a minor release of the package ## Expected behavior Releases below 1.0.0 have their own SemVer logic, a minor version bump is qualified to include a breaking change. The check should not produce an error. ## Environment <!-- Mention which versions of np, Node.js, npm and Git you're using, as well as your OS and version --> np - 11.0.1 Node.js - 22.21.1 npm - 10.9.4 Git - 2.52.2 OS - macOS 26.2
关闭于 2026-01-29 0 条评论