Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ describe('@nx/workspace:generateWorkspaceFiles', () => {
- "packages/*"

autoInstallPeers: true
allowBuilds:
nx: true
onlyBuiltDependencies:
- nx
"
`);
expect(tree.exists('proj/.npmrc')).toBeFalsy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,16 @@ async function createReadme(
});
}

// ensure that pnpm install add all the missing peer deps

// pnpm 11 requires allowBuilds for packages with postinstall scripts;
// onlyBuiltDependencies is the pnpm 10 equivalent (unknown keys are ignored).
function addPnpmSettings(tree: Tree, options: NormalizedSchema) {
tree.write(
join(options.directory, 'pnpm-workspace.yaml'),
`autoInstallPeers: true
allowBuilds:
nx: true
onlyBuiltDependencies:
- nx
`
);
}
Expand Down
Loading