github pnpm/pnpm v10.7.0
pnpm 10.7

latest release: v10.7.1
7 days ago

Minor Changes

  • pnpm config get and list also show settings set in pnpm-workspace.yaml files #9316.

  • It should be possible to use env variables in pnpm-workspace.yaml setting names and value.

  • Add an ability to patch dependencies by version ranges. Exact versions override version ranges, which in turn override name-only patches. Version range * is the same as name-only, except that patch application failure will not be ignored.

    For example:

    patchedDependencies:
      foo: patches/foo-1.patch
      foo@^2.0.0: patches/foo-2.patch
      foo@2.1.0: patches/foo-3.patch

    The above configuration would apply patches/foo-3.patch to foo@2.1.0, patches/foo-2.patch to all foo versions which satisfy ^2.0.0 except 2.1.0, and patches/foo-1.patch to the remaining foo versions.

    [!WARNING]
    The version ranges should not overlap. If you want to specialize a sub range, make sure to exclude it from the other keys. For example:

    # pnpm-workspace.yaml
    patchedDependencies:
      # the specialized sub range
      'foo@2.2.0-2.8.0': patches/foo.2.2.0-2.8.0.patch
      # the more general patch, excluding the sub range above
      'foo@>=2.0.0 <2.2.0 || >2.8.0': 'patches/foo.gte2.patch

    In most cases, however, it's sufficient to just define an exact version to override the range.

  • pnpm config set --location=project saves the setting to a pnpm-workspace.yaml file if no .npmrc file is present in the directory #9316.

  • Rename pnpm.allowNonAppliedPatches to pnpm.allowUnusedPatches. The old name is still supported but it would print a deprecation warning message.

  • Add pnpm.ignorePatchFailures to manage whether pnpm would ignore patch application failures.

    If ignorePatchFailures is not set, pnpm would throw an error when patches with exact versions or version ranges fail to apply, and it would ignore failures from name-only patches.

    If ignorePatchFailures is explicitly set to false, pnpm would throw an error when any type of patch fails to apply.

    If ignorePatchFailures is explicitly set to true, pnpm would print a warning when any type of patch fails to apply.

Patch Changes

  • Remove dependency paths from audit output to prevent out-of-memory errors #9280.

Platinum Sponsors

Bit Bit Syntax

Gold Sponsors

Discord
JetBrains Nx
CodeRabbit Route4Me
Workleap Stackblitz

Don't miss a new pnpm release

NewReleases is sending notifications on new releases.