Registry / devops / exeq
library3.0.0jsnpmunverified

A shell command executor that runs commands sequentially in a queue, supporting promises and event-based control. Version 3.0.0 is the latest stable release. It allows execution of shell commands as strings or arrays, captures stdout/stderr, supports changing working directories via cd, and provides kill/event features. Unlike parallel executors like execa, exeq enforces sequential execution by default. The package has a small footprint with no dependencies, but is not actively maintained (last release 2019). It works in Node.js environments (>= 0.10) but does not support ESM or TypeScript natively.

npm install exeq
INSTALL
IMPORT
SIG · EXEQ
E
exeq
devopsjavascriptv3.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

exeq
import exeq from 'exeq';
const { exeq } = require('exeq');
Default export, not named. In CommonJS, use require('exeq') directly.
exeq
const exeq = require('exeq');
const { default: exeq } = require('exeq');
CommonJS compatible default import.
exeq
import exeq from 'exeq';
import { exeq } from 'exeq';
Named import is incorrect; exeq is a default export.
exeq
const exeq = require('exeq');
import * as exeq from 'exeq';
Namespace import works but is unconventional; prefer default import.

Runs a series of shell commands sequentially, prints stdout per command, and catches errors.

import exeq from 'exeq'; const commands = [ 'echo "Starting build..."', 'mkdir -p output', 'echo "Step 2 done"', 'ls -la > output/files.txt', 'echo "Finished"' ]; exeq(commands) .then(results => { results.forEach((r, i) => console.log(`Command ${i}: ${r.stdout}`)); }) .catch(err => { console.error('Error:', err.stderr || err.message); });
Debug
Known issues
gotchaCommands are executed in the same shell context, so 'cd' persists across commands.
fix
Use absolute paths or explicit 'cd' to change directory as needed.
affects: >=1.0.0
gotchaError object in catch has 'code' and 'stderr' but not always 'message'.
fix
Access err.stderr for stderr output and err.code for exit code.
affects: >=2.0.0
deprecatedEvent 'stdour' is a typo; should be 'stdout' but it's misspelled in the library.
fix
Use 'stdout' event name (or check documentation for actual event names).
affects: >=1.0.0
gotchaPromise only resolves when all commands succeed; first failure rejects immediately.
fix
Use .catch to handle errors; remaining commands are not executed after failure.
affects: >=2.0.0
breakingVersion 2.0.0 introduced Promise-based API; callbacks removed.
fix
Update to Promise usage: exeq(commands).then(...).catch(...).
affects: >=2.0.0
gotchaCommand strings are passed to child_process.spawn with shell: true by default.
fix
Be aware of shell injection risks; sanitize user input.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: exeq is not a function
Using named import instead of default import.
fix
Use const exeq = require('exeq') or import exeq from 'exeq'.
UnhandledPromiseRejectionWarning: [object Object]
Promise rejection not caught; error object is not a plain Error.
fix
Attach .catch(err => console.error(err.stderr || err.message)).
Error: spawn ENOENT
Command not found or invalid shell command.
fix
Verify command exists and is in PATH; use absolute paths if needed.
TypeError: Cannot read property 'stdout' of undefined
Accessing results before Promise resolves or catch returns undefined.
fix
Ensure Promise is resolved; check results inside .then().
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
packageexeq
exeq — npm install exeq · libregistry