Toolchains for pnpm

import org.ysb33r.gradle.jse.pnpm.toolchains.JsePnpmToolchain

plugins {
  id 'org.ysb33r.jsecosystem.pnpm.base' version '5.3.0-alpha.1'
}

jsEcosystem {
  toolchains {
    pnpm(JsePnpmToolchain) {
        executableByVersion('1.2.3') (1)
        executableByPath('/path/to/pnpm') (2)
        executableBySearchPath() (3)
        executableByPackageJson('path/to/package.json') (4)
        executableByPackageJsonWithNode('path/to/package.json') (5)

        withNodeToolchain('nodejs') (6)
        withNodeToolchain(toolchains.named('nodejs', JseNodeToolchain)) (7)
        withPnpmNode() (8)
        withPnpmNode('1.2.3') (9)
    }
  }
}
1 Use a specific version of pnpm.
2 Provide a hardcoded path topnpm.
3 Look for pnpm in the system search path.
4 Read the version of pnpm from the given package.json file. Will throw an exception if a semantic version could not be retrieved.
5 Reads both the version of pnpm and node from package.json. This effectively means that withPnpmNode(VER) will be executed under the hood.
6 Associate a node toolchain called nodejs with this toolchain.
7 Associate a node toolchain using a provider.
8 Let pnpm manage its own version of node.
9 Let pnpm manage a specific version of node.

Using Linux GLIBC packages

If you are running pnpm on a GLIBC-based Linux and you see a message related to a missing libatomic.so, then you need to install the missing library with the specific Linux distribution’s package manager. See PNPM Linux Runtime Requirements.

Using Linux MUSL packages

As from v11, pnpm is available on Linux as a musl package. If you need those packages, set org.ysb33r.gradle.pnpm.use-musl=true as a Gradle or system property.