Repository navigation
v2.10.0: npm shim workspace flags, workspace-wide audit, and lockfile compatibility fixes
·
33 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
The npm shim now handles npm's --workspace/--workspaces, --audit, and --fund flags. aube audit now checks every workspace package, and this release fixes several lockfile, resolver, and registry bugs.
Added
--no-include-workspace-root(#1917, @jdx): this hidden global flag leaves the workspace root out of recursive selections unless a selector names it directly. It overridesincludeWorkspaceRoot: trueand--include-workspace-root.aube -r --no-include-workspace-root run build
Fixed
- npm
--workspace/--workspacesin the npm shim (#1916, #1917, @jdx): the npm shim now translates these flags forrun,test,start,stop,restart, andexec. Before, the flags reached the root script as arguments. A root script that callednpm run build --workspacesthen ran itself again and again. Like npm,--workspacesnow skips the root unless you also pass--include-workspace-root. Arguments after--are passed through unchanged.npm run build --workspaces -> aube -r --no-include-workspace-root run build npm run build -w @scope/child -> aube --filter @scope/child run build npm run build -w packages/child -> aube --filter ./packages/child run build - npm
--audit/--fundflags (#1908, @jdx): forinstall,add,ci, andremoveand their aliases, the npm shim now drops--audit,--no-audit,--fund,--no-fund, and their=<bool>forms. Before, tools that pass these flags, such as the shadcn CLI, failed withunknown option '--no-audit'. aube auditin workspaces (#1927, @jdx):aube auditnow checks the direct dependencies of every workspace package, aspnpm auditdoes. It also finds the workspace lockfile when run from a member directory. Before, a workspace whose root had no dependencies printedNo dependencies to audit.and exited 0. Running it from a member failed with "no lockfile found".--jsondependency counts now add up all workspace packages.aube audit --fixandaube sbomstill check only the root.- pnpm lockfile compatibility (#1904, #1914, @jdx): aube no longer writes entries that pnpm rejects:
- It no longer adds
gitHosted: truetotype: gitresolutions, such as GitHub dependencies pinned to a short commit. - It no longer adds
gitHosted: trueto GitHub Packages (npm.pkg.github.com) tarballs. It removes this field from existing GitHub Packages entries when it rewrites the lockfile. - It now omits
peerDependenciesMetaentries that are not optional, such as vitest'svite: {}. These entries madepnpm install --frozen-lockfilefail withERR_PNPM_BROKEN_LOCKFILE.
- It no longer adds
- Yarn Classic
optionalDependencies(#1922, @jdx): aube now keeps theoptionalDependencies:entries inyarn.lockwhen it reads and writes the file. Before, aube skipped platform binaries such as@rolldown/binding-darwin-arm64, so tools like vite 8 failed at runtime. Yarn 1 doesn't recordos/cpuin the lockfile, so aube may install optional packages for every platform for now. - Removing a package that provides an optional peer (#1920, @Aschenbath): when you remove a direct dependency that provides an optional peer, aube now removes it from the lockfile and from hidden hoisting if nothing else needs it. Before, the package stayed resolvable through
NODE_PATH. When aube reuses a lockfile, it also no longer treats a remembered optional-peer binding as a declared dependency. latestwith a minimum release age (#1928, @jdx): whenminimumReleaseAgeis set and thelatestdist-tag points to a prerelease older than the cutoff, aube now resolves to that prerelease. Before, it chose the highest stable version, andminimumReleaseAgeExcludehad no effect. This affectsinstall,add, andoutdated.- Vercel CLI with
trustPolicy=no-downgrade(#1910, @jdx):vercel@>=58.5.1is now in the defaulttrustPolicyExclude. These releases are built from a private repository, so they have no provenance and failed the downgrade check. aube still checks earlier releases. - HTTP/2
too_many_data_frameserrors (#1912, @jdx): some registries, such asnpm.flatt.tech, send large package metadata in many small HTTP/2 frames, which caused the HTTP/2 client to close the connection. When this error occurs, aube now retries over HTTP/1.1 and keeps using HTTP/1.1 for metadata requests for the rest of the process. - Zero-padded tarball versions (#1926, @jdx): aube now accepts packages whose tarball
package.jsonuses a zero-padded version, such as2024.04.13, that matches the registry version2024.4.13. Before, these installs failed with a content mismatch error.
Documentation
- The installation guide now says that shell completions don't require a separate
usageinstall. It also lists the supported shells: Bash, Zsh, Fish, PowerShell, Elvish, and Nushell (#1915, @jdx).
Full Changelog: v2.9.0...v2.10.0
💚 Sponsor aube
aube is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If aube saves your team install time or CI minutes, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep aube fast, free, and independent.