Skip to content

Conversation

liamcmitchell
Copy link
Contributor

While investigating CI failure in #8537, I found unrelated test failures when running locally on windows.

prune with lockfile with implicit optional peer dependencies fixed by adding files to fixture node_modules, avoiding network, also reduced package lock to minimum and removed unhelpful snapshots

move aside symlink clutter fixed by creating problematic symlink in t.testdir() instead of in reifyPackages hook

@liamcmitchell liamcmitchell requested a review from a team as a code owner August 29, 2025 10:45
@owlstronaut owlstronaut changed the title Win test test: fix pruner and reify tests for optional peer deps Sep 3, 2025
@owlstronaut owlstronaut changed the title test: fix pruner and reify tests for optional peer deps chore: fix pruner and reify tests for optional peer deps Sep 3, 2025
@owlstronaut owlstronaut merged commit 619d43e into npm:latest Sep 3, 2025
17 checks passed
@github-actions github-actions bot mentioned this pull request Sep 3, 2025
@G-Rath
Copy link
Contributor

G-Rath commented Sep 9, 2025

awesome thanks for helping improve this! just one note:

also reduced package lock to minimum and removed unhelpful snapshots

While I agree we don't need all the packages, I think it would be best to have retained a few of the child dependencies because that would show direct-dependencies-of-optional-peer-dependencies are marked as such, and thus are also successfully pruned (ideally it'd also be good to have a test going the other way, with a dependency that is both used by e.g. babel-plugin-macros and a direct dependency, and thus should not be pruned)

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.

3 participants