github pnpm/pnpm v7.4.0-0

latest releases: v9.11.0, v9.10.0, v9.9.0...
pre-release2 years ago

Minor Changes

  • Dependencies patching is possible via the pnpm.patchedDependencies field of the package.json.
    To patch a package, the package name, exact version, and the relative path to the patch file should be specified. For instance:

    {
      "pnpm": {
        "patchedDependencies": {
          "eslint@1.0.0": "./patches/eslint@1.0.0.patch"
        }
      }
    }
  • Two new commands added: pnpm patch and pnpm patch-commit.

    pnpm patch <pkg> prepares a package for patching. For instance, if you want to patch express v1, run:

    pnpm patch express@1.0.0
    

    pnpm will create a temporary directory with express@1.0.0 that you can modify with your changes.
    Once you are read with your changes, run:

    pnpm patch-commit <path to temp folder>
    

    This will create a patch file and write it to <project>/patches/express@1.0.0.patch.
    Also, it will reference this new patch file from the patchedDependencies field in package.json:

    {
      "pnpm": {
        "patchedDependencies": {
          "express@1.0.0": "patches/express@1.0.0.patch"
        }
      }
    }
  • package-import-method supports a new option: clone-or-copy.

Patch Changes

  • Don't crash when pnpm update --interactive is cancelled with Ctrl+c.

  • The use-node-version setting should work with prerelease Node.js versions. For instance:

    use-node-version=18.0.0-rc.3
    

Our Gold Sponsors

Our Silver Sponsors

What's Changed

  • feat: patch package by @zkochan in #4885
  • feat: add patch and patch-commit commands by @zkochan in #4900
  • fix(env): use-node-version should work with prerelease versions by @zkochan in #4903
  • refactor: create @pnpm/node.fetcher by @zkochan in #4908
  • feat(patch): update patched dependencies on install by @zkochan in #4905
  • fix: throw an error if not all patches were applied by @zkochan in #4911

Full Changelog: v7.3.0...v7.4.0-0

Don't miss a new pnpm release

NewReleases is sending notifications on new releases.