
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@fortify-ts/bulkhead
Advanced tools
Bulkhead (concurrency limiter) pattern for the Fortify-TS resilience library.
npm install @fortify-ts/bulkhead
# or
pnpm add @fortify-ts/bulkhead
import { Bulkhead } from '@fortify-ts/bulkhead';
const bulkhead = new Bulkhead<Response>({
maxConcurrent: 10,
});
try {
const result = await bulkhead.execute(async (signal) => {
return fetch('/api/data', { signal });
});
} catch (error) {
if (error instanceof BulkheadFullError) {
console.log('Too many concurrent requests');
}
}
const bulkhead = new Bulkhead<Response>({
maxConcurrent: 10,
maxQueue: 100, // Queue up to 100 requests
queueTimeout: 5000, // 5 second queue timeout
});
const bulkhead = new Bulkhead<Response>({
// Maximum concurrent executions
maxConcurrent: 10,
// Maximum queued requests (0 = no queue)
maxQueue: 100,
// Queue timeout in milliseconds
queueTimeout: 5000,
// Rejection callback
onRejected: (activeCount, queuedCount) => {
console.log(`Rejected: ${activeCount} active, ${queuedCount} queued`);
},
// Optional logger
logger: myLogger,
});
// Get current counts
const activeCount = bulkhead.getActiveCount();
const queuedCount = bulkhead.getQueuedCount();
// Check if at capacity
const isFull = activeCount >= config.maxConcurrent;
// Close bulkhead (rejects queued requests)
await bulkhead.close();
| Option | Type | Default | Description |
|---|---|---|---|
maxConcurrent | number | 10 | Max parallel executions |
maxQueue | number | 0 | Max queued requests |
queueTimeout | number | - | Queue timeout (ms) |
onRejected | function | - | Rejection callback |
logger | FortifyLogger | - | Optional logger |
| Error | Description |
|---|---|
BulkheadFullError | Bulkhead and queue at capacity |
BulkheadClosedError | Bulkhead has been closed |
MIT
FAQs
Concurrency limiter bulkhead pattern for @fortify-ts
We found that @fortify-ts/bulkhead 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.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.