FredKSchott / rollup-plugin-polyfill-node

A modern Node.js polyfill for your Rollup bundle.
Other
177 stars 57 forks source link

Upstream peer dependency should be forwarded #32

Closed heygrady closed 2 years ago

heygrady commented 3 years ago

The problem is minor. This generates a warning in Yarn 2 and above. This is happening for me in Yarn 3. It's doesn't actually break anything.

The rollup-plugin-polyfill-node package relies on @rollup/plugin-inject.

The crux is that the upstream dependency (@rollup/plugin-inject) specifies a peerDependency on rollup, which is not provided as a direct dependency of rollup-plugin-polyfill-node.

https://github.com/snowpackjs/rollup-plugin-polyfill-node/blob/14eebcaf607aef8f93d702aa29f5c2884ea2b7c3/package.json#L28-L30

https://github.com/rollup/plugins/blob/master/packages/inject/package.json#L46-L48

The fix to to add a peerDependency for rollup that satisfies both rollup-plugin-polyfill-node and @rollup/plugin-inject.

The error I'm getting in my rig:

➤ YN0002: │ rollup-plugin-polyfill-node@npm:0.7.0 doesn't provide rollup (pNNN), requested by @rollup/plugin-inject
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
FredKSchott commented 2 years ago

Fixed in #30