Skip to content

v2.11.2: Faster aube add on large lockfiles, and add no longer changes unrelated locked packages

Latest

Choose a tag to compare

@jdx jdx released this 02 Dec 00:09
· 3 commits to main since this release
Immutable release. Only release title and notes can be modified.
999ba18

aube add is up to 4x faster on large lockfiles and no longer changes unrelated packages in the lockfile. Interrupted installs also no longer leave temporary files in the store.

Fixed

  • aube add kept direct dependencies at their locked version (#2019): when another package in the tree locked an older version of a direct dependency, adding an unrelated package could move the direct dependency to that version. For example, a root tslib could move from 2.9.1 to 2.8.1. aube now keeps the importer's locked version, as pnpm does, as long as the manifest specifier is unchanged, the version still satisfies the range and it isn't flagged as vulnerable. When an npm alias points to a new package (for example npm:old-pkg@^1 changed to npm:new-pkg@^1), aube no longer reuses the old package's lockfile entry. aube update doesn't change.
  • Optional peer bindings kept on lockfile reuse (#2017): a package can bind an optional peer to different versions in different parts of the tree, such as debug with supports-color@8.1.1 in most places and supports-color@7.2.0 in one. Before, aube add of an unrelated package rebound that peer everywhere to one version. On vlt's babylon fixture, adding del changed about 1,970 lockfile lines and relinked 237 unrelated packages. After both fixes, the same add changes only the 74 lines for del and its new dependencies.
  • Temporary files from interrupted installs are cleaned up (#2018): an install killed during a download (SIGKILL, OOM, a cancelled CI job) left .aube-stream-* files in the store's v1/files/ directory. Only aube store prune removed them, so the store kept growing. Now, when aube opens the store for writing and no other aube process is writing to it, aube deletes these files first. A store that is in use is skipped, and aube doesn't wait for it. Embedders can call the new Store::try_lock_for_maintenance() and then remove_abandoned_stream_files().

Changed

  • Faster aube add and non-frozen installs on large lockfiles (#2014, #2015, #2008, #2009, #2010, #2007):

    • Peer suffixes for packages that refer to each other through peers now settle in a few passes. This affects common ESLint setups with eslint-plugin-import and eslint-import-resolver-webpack. Before, the keys nested deeper on every pass until the pass limit was reached. The next resolving install rewrites these keys once in aube-lock.yaml. Frozen installs read the lockfile as it is.
    • For packages already in the lockfile, aube reads dependency metadata from the local cache or the bundled primer instead of downloading it again. Metadata reads that are still needed run at the same time.
    • The OSV, release-age and download-count checks before an add run at the same time. Large OSV checks send up to two batches at once.
    • Cached store indexes are verified in parallel, and new packages are no longer linked twice on warm installs.

    On vlt's benchmark fixtures, aube add on babylon and large fell from 11.5 s to 3.0 s and from 3.2 s to 0.8 s. Mid-size fixtures are about 1.5x faster.

  • Faster installs from a warm packument cache (#2016): on Unix, cached packuments are memory-mapped, and aube skips re-hashing a file that has not changed since it was last checked. Without a lockfile, these installs are 4–26% faster on vlt's fixtures, and peak memory on next fell from 681 MB to 280 MB. For fresh installs, aube downloads the OSV bloom filter while it resolves instead of after.

  • Minimum supported Rust version is now 1.97 (#2012): this only affects building aube from source. Prebuilt binaries, npm, Homebrew, the Ubuntu PPA and COPR packages don't change.

Full Changelog: v2.11.1...v2.11.2

💚 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.