cross-spawn
npmv7.0.6Cross platform child_process#spawn and child_process#spawnSync
Adopt with care
cross-spawn is usable, with caveats. Last published 660 days ago. 4 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- CMaintenance: grade C, Fair — worth a look.
Last published 660 days ago. 4 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 5 transitive packages, about 95 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding cross-spawn to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing cross-spawn, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >= 8
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the cross-spawn README.
const spawn = require('cross-spawn');
// Spawn NPM asynchronously
const child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
// Spawn NPM synchronously
const result = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });cross-spawn vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| cross-spawnthis page | 0 | 9 | MIT | 1 year ago |
| path-key | 244.9M | 1 | MIT | 17 hours ago |
| open | 130.4M | 4 | MIT | 14 hours ago |
| log-symbols | 0 | 1 | MIT | 14 hours ago |
| shebang-command | 0 | 1 | MIT | 18 hours ago |
| is-wsl | 117.6M | 4 | MIT | 19 hours ago |
Dependencies
Declared by cross-spawn v7.0.6. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (13)
Used by
Popular packages that depend on cross-spawn.
Native-ESM powered web dev build tool
An AST-based pattern checker for JavaScript.
Wrapper around libsass
Model Context Protocol implementation for TypeScript
A Promise-based interface into processes created by child_process.spawn
Experimental debugger shell for React Native for use with @react-native/debugger-frontend
Model Context Protocol implementation for TypeScript - Client package
A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.
yargs the modern, pirate-themed, successor to optimist.
Relationship graph
Dependencies (left) and dependents (right) of cross-spawn.
Frequently installed together
Runtime typescript and ESM support for Node.js
TypeScript definitions for node
An AST-based pattern checker for JavaScript.
The semantic version parser used by npm.
Lightweight debugging utility for Node.js and the browser
Prettier is an opinionated code formatter
An extremely fast JavaScript and CSS bundler and minifier.
A pure JavaScript implementation of Sass.
Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol
Vite DevTools
BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
the most correct and second fastest glob implementation in JavaScript
Release history
No releases in the last two years, typically about 31 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 6.0.6 | 1 year ago | 18 KB | MIT |
| 7.0.6latest | 1 year ago | 16 KB | MIT |
| 7.0.5 | 1 year ago | 16 KB | MIT |
| 7.0.4 | 1 year ago | 16 KB | MIT |
| 7.0.3 | 6 years ago | 21 KB | MIT |
| 7.0.2 | 6 years ago | 20 KB | MIT |
| 7.0.1 | 7 years ago | 20 KB | MIT |
| 7.0.0 | 7 years ago | 20 KB | MIT |
| 6.0.5 | 8 years ago | 21 KB | MIT |
| 6.0.4 | 8 years ago | — | MIT |
| 6.0.3 | 8 years ago | — | MIT |
| 6.0.2 | 8 years ago | — | MIT |
| 6.0.1 | 8 years ago | — | MIT |
| 6.0.0 | 8 years ago | — | MIT |
| 5.1.0 | 9 years ago | — | MIT |
Overview
cross-spawn is an npm package that cross platform child_process#spawn and child_process#spawnSync. It has 9 known dependents in the graph. The latest version is 7.0.6, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need cross platform child_process#spawn and child_process#spawnSync and value a focused solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
Cons
- Large dependency tree (16 direct dependencies) increases install size and audit surface.
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use cross-spawn?
cross-spawn is usable, with caveats. Last published 660 days ago. 4 releases in the last 2 years.
How do I install cross-spawn?
Run `npm install cross-spawn` to add cross-spawn to your npm project.
How many dependencies does cross-spawn have?
cross-spawn declares 16 direct dependencies and pulls in 5 packages in total once its runtime tree is resolved totalling about 95 KB on disk.
What license is cross-spawn released under?
cross-spawn is distributed under the MIT license. Its dependency tree also includes: BlueOak-1.0.0, ISC, MIT.
How popular is cross-spawn?
npm does not publish download counts. Within PackageGraph's crawl, 9 known packages depend on cross-spawn.
Is cross-spawn still maintained?
The most recent release of cross-spawn (v7.0.6) was published 1 year ago.
Does cross-spawn run install scripts?
No. cross-spawn does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.