Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup .bin folders from node_modules #1213

Merged
merged 1 commit into from
Apr 17, 2020
Merged

Cleanup .bin folders from node_modules #1213

merged 1 commit into from
Apr 17, 2020

Conversation

larixer
Copy link
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
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
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

@@ -1371,6 +1371,7 @@ describe(`Plug'n'Play`, () => {
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
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
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