Version 1.0.0
@stackline/git-spawned-stream
Create a readable stream from a spawned git process.
Independent maintenance of git-spawned-stream 1.0.1. Original authors and licenses are retained.
Installation
# Preserve existing imports with an npm alias
npm install git-spawned-stream@npm:@stackline/git-spawned-stream@1.0.0
# Or use the scoped package name in your imports
npm install @stackline/git-spawned-stream@1.0.0Node.js: See compatibility notes. Read the compatibility and maintenance notes before migrating.
Usage and API
The reference below may retain upstream package names. Use the alias installation above to run those imports with this Stackline release.
@stackline/git-spawned-stream
Independent maintenance fork of git-spawned-stream@1.0.1. Original API, module format, runtime dependency ranges, and supported Node.js engines are preserved.
npm install @stackline/git-spawned-stream
# Preserve existing imports with an npm alias:
npm install git-spawned-stream@npm:@stackline/git-spawned-stream@1.0.0
See UPSTREAM.md for the exact source and issue review, and CHANGELOG.md for focused maintenance changes. Development and release tooling runs on Node.js 24; that does not change the library runtime requirement.
Maintained by Stackline. Issues · npm.
Upstream documentation
git-spawned-stream
Create a readable stream from a spawned git process.
Usage
gitSpawnedStream(repoPath, spawnArguments, limitInBytes, gitBinary)
Arguments:
repoPath- the path to the repo, ex: /home/alex/node/.git (or the path to the git bare repo)spawnArguments- the arguments that will be passed to thechild_process.spawnfunctionlimitInBytes- kill the process if it exceeds the imposed limit (sends more data than allowed)gitBinary- path to the git binary to use (use the one inPATHby default)
Example:
var gitSpawnedStream = require('git-spawned-stream');
var path = require('path');
var repoPath = process.env.REPO || path.join(__dirname, '.git');
repoPath = path.resolve(repoPath);
var byteLimit = 5 * 1024 * 1024; // 5 Mb
// sort of a git log -n 2
var stream = gitSpawnedStream(repoPath, [
'rev-list',
'--max-count=2',
'--header',
'HEAD'
], byteLimit);
stream.on('data', function(data) {
console.log('DATA', data.toString('utf8'));
}).on('error', function(err) {
console.error('An error occurred:');
console.error('-----------------\n');
console.error(err.message);
process.exit(1);
}).on('end', function(killed) {
// when the stream is cut, killed === true
console.log("\n±±±±±±±±±±±±±±±±±\nThat's all folks!");
});
License
MIT
Upstream issues and maintenance review
Upstream and issue review
Base: alessioalex/git-spawned-stream, npm git-spawned-stream@1.0.1, commit 97f1d37151a253296f5b1595a0a9044ba4ae9383. Full Git history and upstream attribution are retained. Last npm publication: 2018-10-12T10:00:28.003Z. Release inactivity does not by itself prove abandonment.
Review: 2026-09-29T00:21:44.959274+00:00. Source coverage: Most recently updated 100 open and 30 closed issue/PR entries; PRs removed. This is triage evidence, not a claim of exhaustive review.
Open #3 requests custom stdin and #1 remote repository operations; these are feature requests, not confirmed defects in the existing four-argument streaming API. Do not change spawning or argument semantics. Preserve debug/spawn-to-readstream dependency ranges; do not recursively fork them in this task. Added actual git subprocess tests for success, invalid command and executable errors, argument immutability and binary overload. Runtime source is unchanged; the original delegation test also runs.
Reviewed issue entries
- alessioalex/git-spawned-stream#3 (open): How to add an option for custom stdin to the spawned process.
- alessioalex/git-spawned-stream#1 (open): Support for remote repos
Release changes
Stackline changes
1.0.0 — 2026-09-28
Independent maintenance fork of git-spawned-stream 1.0.1. Preserve published API, module exports and runtime engine compatibility. Open #3 requests custom stdin and #1 remote repository operations; these are feature requests, not confirmed defects in the existing four-argument streaming API. Do not change spawning or argument semantics. Preserve debug/spawn-to-readstream dependency ranges; do not recursively fork them in this task. Added actual git subprocess tests for success, invalid command and executable errors, argument immutability and binary overload. Runtime source is unchanged; the original delegation test also runs.
Pinned development tools, real API and packed-consumer checks, GitHub CI/CodeQL gates, exact-artifact npm provenance and immutable release evidence are added. See UPSTREAM.md for limits of issue triage.
Release files and references
- README.md
- UPSTREAM.md
- CHANGELOG.md
- LICENSE
- NOTICE
- Package and publication metadata
- Full text documentation
Package bytes, npm provenance and the immutable GitHub release were verified for this version. Security checks describe the reviewed release; documented compatibility risks and upstream reports are not blanket claims of resolution.