
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
Copy files
$ npm install --save cpy
const cpy = require('cpy');
cpy(['src/*.png', '!src/goat.png'], 'dist']).then(() => {
console.log('files copied');
});
Type: array
Files to copy.
Type: string
Destination directory.
Type: object
Options are passed to cp-file and glob.
Type: string
Default: process.cwd()
Working directory to find source files.
Type: boolean
Default: false
Preserve path structure.
Type: string
Filename used to rename every file in files.
MIT © Sindre Sorhus
The ncp (node-copy-paste) package is similar to cpy and provides asynchronous recursive file copying with Node.js. It is an older package and does not provide as modern a syntax as cpy, which uses promises.
fs-extra is a package that extends the built-in fs module and includes file copying functionality. It offers a broader set of file system operations compared to cpy, including copying, moving, deleting files, and more.
copyfiles is a package that provides a command-line utility to copy files. It can be used in npm scripts and has a flat option to copy all files to a single directory level. It is less feature-rich than cpy when it comes to API usage within Node.js code.
FAQs
Copy files
The npm package cpy receives a total of 528,588 weekly downloads. As such, cpy popularity was classified as popular.
We found that cpy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.