github pnpm/pnpm v7.0.0-rc.3

latest releases: v9.1.1, v9.1.0, v8.15.8...
pre-release2 years ago

Major Changes

  • Node.js 12 is not supported.

  • The root package is excluded by default, when running pnpm -r exec|run|add #2769.

  • Filtering by path is done by globs.

    In pnpm v6, in order to pick packages under a certain directory, the following filter was used: --filter=./apps

    In pnpm v7, a glob should be used: --filter=./apps/**

  • The NODE_PATH env variable is not set in the command shims (the files in node_modules/.bin). This env variable was really long and frequently caused errors on Windows.

    Also, the extend-node-path setting is removed.

    Related PR: #4253

  • The embed-readme setting is false by default.

  • When using pnpm run <script>, all command line arguments after the script name are now passed to the script's argv, even --. For example, pnpm run echo --hello -- world will now pass --hello -- world to the echo script's argv. Previously flagged arguments (e.g. --silent) were intepreted as pnpm arguments unless -- came before it.

  • Side effects cache is turned on by default. To turn it off, use side-effects-cache=false.

  • The npm_config_argv env variable is not set for scripts #4153.

  • pnpx is now just an alias of pnpm dlx.

    If you want to just execute the command of a dependency, run pnpm <cmd>. For instance, pnpm eslint.

    If you want to install and execute, use pnpm dlx <pkg name>.

  • pnpm install -g pkg will add the global command only to a predefined location. pnpm will not try to add a bin to the global Node.js or npm folder. To set the global bin directory, either set the PNPM_HOME env variable or the global-bin-dir setting.

  • pnpm pack should only pack a file as an executable if it's a bin or listed in the publishConfig.executableFiles array.

  • -W is not an alias of --ignore-workspace-root-check anymore. Just use -w or --workspace-root instead, which will also allow to install dependencies in the root of the workspace.

  • Allow to execute a lifecycle script in a directory that doesn't match the package's name. Previously this was only allowed with the --unsafe-perm CLI option #3709.

  • Local dependencies referenced through the file: protocol are hard linked (not symlinked) #4408. If you need to symlink a dependency, use the link: protocol instead.

  • strict-peer-dependencies is true by default #4427.

  • A prerelease version is always added as an exact version to package.json. If the next version of foo is 1.0.0-beta.1 then running pnpm add foo@next will add this to package.json:

    {
      "dependencies": {
        "foo": "1.0.0-beta.1"
      }
    }

    PR: #4435

  • Dependencies of the root workspace project are not used to resolve peer dependencies of other workspace projects #4469.

  • Don't hoist types by default to the root of node_modules #4459.

  • Any package with "prettier" in its name is hoisted.

  • Changed the location of the global store from ~/.pnpm-store to <pnpm home directory>/store

    On Linux, by default it will be ~/.local/share/pnpm/store
    On Windows: %LOCALAPPDATA%/pnpm/store
    On macOS: ~/Library/pnpm/store

    Related issue: #2574

  • 4bed585: The next deprecated settings were removed:

    • frozen-shrinkwrap
    • prefer-frozen-shrinkwrap
    • shared-workspace-shrinkwrap
    • shrinkwrap-directory
    • lockfile-directory
    • shrinkwrap-only
    • store

Patch Changes

  • Peer dependency should be correctly resolved from the workspace, when it is declared using a workspace protocol #4529.
  • Linked in dependencies should be considered when resolving peer dependencies #4541.

What's Changed

  • fix: the file protocol should link all files by default by @zkochan in #4532
  • fix: dependenciesMeta should be saved into the lockfile by @zkochan in #4538
  • fix: resolve peers from linked in dependencies by @zkochan in #4541
  • fix: peer dependency has workspace protocol by @zkochan in #4540

Full Changelog: v7.0.0-rc.2...v7.0.0-rc.3

Don't miss a new pnpm release

NewReleases is sending notifications on new releases.