Skip to content

RFC: pnpm config dependency#2070

Draft
zbrydon wants to merge 12 commits intomainfrom
rfc-pnpm-config-deps
Draft

RFC: pnpm config dependency#2070
zbrydon wants to merge 12 commits intomainfrom
rfc-pnpm-config-deps

Conversation

@zbrydon
Copy link
Contributor

@zbrydon zbrydon commented Sep 22, 2025

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Sep 22, 2025

⚠️ No Changeset found

Latest commit: 54f8265

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@72636c 72636c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable enough, though agree with Sam that magic is not ideal 🥲

"repository": {
"type": "git",
"url": "git+https://github.com/seek-oss/skuba.git",
"directory": "packages/pnpm-plugin"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh TIL directory, we should probably set it for our other packages

// @ts-expect-error Property isn't in PnpmSettings for some reason
config.publicHoistPattern ??= [];
// @ts-expect-error Property isn't in PnpmSettings for some reason
config.publicHoistPattern.push(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should our patterns be prepended so consumers can define overrides with !?

https://pnpm.io/settings#publichoistpattern

Comment on lines +21 to +22
// @ts-expect-error Property isn't in PnpmSettings for some reason
config.packageManagerStrictVersion = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar question on whether stuff like this should be ??= to allow consumer to override 🤔

Comment on lines +26 to +28
"peerDependencies": {
"pnpm": "<10.13.0"
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would assume not, but worth testing alongside https://docs.npmjs.com/cli/v11/configuring-npm/package-json#engines and https://docs.npmjs.com/cli/v11/configuring-npm/package-json#devengines. Also depends on whether we want to log a warning or fail the install if an older pnpm version is detected.

@zbrydon zbrydon marked this pull request as ready for review September 23, 2025 01:17
@zbrydon zbrydon requested a review from a team as a code owner September 23, 2025 01:17
Comment on lines +13 to +22
config.publicHoistPattern ??= [
'@types*',
'eslint',
'eslint-config-skuba',
'prettier',
'esbuild',
'jest',
'tsconfig-seek',
'typescript',
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support merging, the array configs could be like

Suggested change
config.publicHoistPattern ??= [
'@types*',
'eslint',
'eslint-config-skuba',
'prettier',
'esbuild',
'jest',
'tsconfig-seek',
'typescript',
];
(config.publicHoistPattern ??= []).unshift(
'@types*',
'eslint',
'eslint-config-skuba',
'prettier',
'esbuild',
'jest',
'tsconfig-seek',
'typescript',
);

Or, if the above is too spooky to look at:

Suggested change
config.publicHoistPattern ??= [
'@types*',
'eslint',
'eslint-config-skuba',
'prettier',
'esbuild',
'jest',
'tsconfig-seek',
'typescript',
];
config.publicHoistPattern = [
'@types*',
'eslint',
'eslint-config-skuba',
'prettier',
'esbuild',
'jest',
'tsconfig-seek',
'typescript',
...(config.publicHoistPattern ?? []),
];

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:\ I'm still not a huge fan of this being done in the background where it's less obvious to consumers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to imply that plugins don't work properly with pnpm fetch and pnpm install --offline 🤔

@zbrydon zbrydon marked this pull request as draft September 30, 2025 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants