Skip to content

Support a config that makes pnpm recursive install link packages from the workspace #1259

Description

@zkochan

As noted by @donaldpipowitch, #1027 (comment)

One could think pnpm recursive link will link every local package to the global folder.

Seems like some users expect pnpm recursive install to behave like yarn install or lerna bootstrap. To support these users, we can add a config called link-workspace-packages.

If link-workspace-packages is true, pnpm recursive install links packages in the monorepo and installs the rest of the dependencies (the current behavior of pnpm recursive link as of pnpm v2.10)


Changes in pnpm install

This config will alter the behavior of pnpm install pkg when executed inside a multi-package repository. pkg will be first searched inside the repository. If a local pkg that satisfies the wanted range is found in the repository, it is linked. If not, it is installed from the registry.

If the package is installed without a spec and the latest version of the installed package does not equal the version in the workspace, then the package is downloaded from the registry.

Changes in pnpm update

If a newer version of a linked package is available in the registry, pnpm update may unlink the package and install the newer version from the registry

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions