-
Notifications
You must be signed in to change notification settings - Fork 9
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
polyfill node's fs.cp. #6
Conversation
i just landed #7 which reduces the CI test matrix a bit and makes that a little less scary (currently a lot of the failures in CI are due to testing on node versions that npm doesn't officially support) can you rebase this on the latest additionally, we'll need you to put the license for cp in a separate file at after those two changes we'll have a more clear picture of what still may need fixing, but judging by what i'm seeing we have at least one test that has failing assertions, and we're missing a line of coverage, both in Windows. i'm happy to help you track down how to fix those after a rebase! |
I need `fs.cp` in `npm copy` to copy node_modules files. I'm adapting node's [lib/internal/fs/cp/cp.js][0]. I'm checking in the original so I can record changes in git. ref npm/cli#4082 [0]: https://github.com/nodejs/node/blob/1fa507f098ca7a89012f76f0c849fa698e73a1a1/lib/internal/fs/cp/cp.js
I added this test trying to cover L158-163. It worked on linux and covered the block but not windows.
awesome! one last thing, can you add a note to the README about this module providing an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful! thank you!
just published this as thank you again, this is great! |
I need recursive copy to implement npm/cli#4082. I can probably use mkdir --recursive and paclist to copy module's files but I'll need cp recursive to copy modules in node_modules.
Like lib/rm/polyfill.js this is a copy/modification of code in nodejs, which is in turn lifted from a popular npm package (fs-extra in this case).