Skip to content

Cleanup .bin folders from node_modules#1213

Merged
arcanis merged 1 commit into
masterfrom
pnp-cleanup-dot-bin
Apr 17, 2020
Merged

Cleanup .bin folders from node_modules#1213
arcanis merged 1 commit into
masterfrom
pnp-cleanup-dot-bin

Conversation

@larixer
Copy link
Copy Markdown
Member

@larixer larixer commented Apr 17, 2020

What's the problem this PR addresses?

Pnp linker cleans up all node_modules folders except dot folders inside them. This leaves out .bin folders that are certainly not needed for pnp mode.

How did you fix it?

Added removal of .bin entries inside node_modules as well.

@arcanis
Copy link
Copy Markdown
Member

arcanis commented Apr 17, 2020

Perfect 👍

Can you add a test in pnp.test.js? Cf the existing dot-folder test in the same file.

@larixer
Copy link
Copy Markdown
Member Author

larixer commented Apr 17, 2020

@arcanis I have modified the test that already checked how node_modules is being cleared, I have added creation of .bin into that test

test(
`it should remove lingering folders from the node_modules even when they contain dot-folders`,
makeTemporaryEnv({}, async ({path, run, source}) => {
await xfs.mkdirpPromise(`${path}/node_modules/.bin`);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this line was added to existing test

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah! Missed that, thanks 👍

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.

2 participants