github pnpm/pnpm v7.0.0-beta.0

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

What's Changed

  • feat!: breaking config changes for v7 by @zkochan in #4253
  • feat(pack)!: limit what files are packed as executables by @zkochan in #4266
  • feat!: pnpx is an alias of pnpm dlx by @zkochan in #4267
  • feat: run scripts without -- by @gluxon in #4290
  • fix: revert backwards compatible handling of -- for run by @gluxon in #4291
  • feat!: global bins should be created only in predefined locations by @zkochan in #4280
  • ci: use pnpm v7 by @zkochan in #4307
  • feat!: remove -W option by @zkochan in #4308
  • test(audit): fix for 2022-02-15 by @gluxon in #4340
  • feat: -F is a short alias of --filter by @zkochan in #4342
  • feat: onlyBuiltDependencies by @zkochan in #4014
  • fix(make-dedicated-lockfile): don't re-resolve dependency versions in dedicated lockfile by @David-Collins in #4350
  • test(audit): mock responses from audit endpoint by @zkochan in #4354
  • fix: bad packageManager field by @Jack-Works in #4356
  • feat: use the versions from overrides when adding deps without specs by @zkochan in #4355
  • chore: document the interface of command packages by @illright in #3828
  • fix: print an info message when NODE_ENV is set to production by @zkochan in #4362
  • test: ignore override if a version is specified at install by @nikoladev in #4366
  • fix: ignore case, when verifying package name in the store by @zkochan in #4368
  • fix: peerDependencyRules with * as range by @zkochan in #4370
  • feat: run scripts without --unsafe-perm by @zkochan in #4369
  • chore(github): add welcome bot app by @BlackHole1 in #4373
  • fix: onlyBuiltDependencies should work by @zkochan in #4377
  • fix: pnpm i should work on virtual drives by @kazuare in #4386
  • fix: throw a meaningful error message on broken lockfile by @zkochan in #4387
  • fix: don't write data from the lockfile to the global store by @zkochan in #4395
  • fix(resolve-dependencies): a sequence of injected deps via the file protocol by @zkochan in #4415
  • feat: the file protocol should always inject the dependency by @zkochan in #4408
  • feat: add own implementation of the init command by @zkochan in #4422
  • feat: strict-peer-dependencies is true by default by @zkochan in #4427
  • feat: respect the npmrc by @Spencer17x in #4425
  • feat: a prerelease version is always saved as an exact version by @zkochan in #4435
  • feat: prevent deep imports using exports by @zkochan in #4440

New Contributors

Full Changelog: v6.31.0...v7.0.0-beta.0

Don't miss a new pnpm release

NewReleases is sending notifications on new releases.