Drop-in replacement for the deprecated inflight package, using lru-cache under the hood. Version 1.0.0 provides the same API as the original inflight (add, remove, has, list, clear) but backed by an LRU cache to prevent memory leaks. Useful as a resolution override in package.json for Yarn/npm to replace the deprecated inflight dependency used by many npm packages (e.g., glob, rimraf). Published manually; no release cadence established.
npm install inflight-lruNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating an inflight function with the same API as original, using lru-cache for deduplication.
Set a larger max option when creating the inflight instance (not yet configurable in v1.0.0). Or avoid relying on long-lived inflight keys.
Use inflight-lru as a resolution override to replace inflight in your dependency tree.
Use createRequire: import { createRequire } from 'module'; const require = createRequire(import.meta.url); const inflight = require('inflight-lru');npm install -D @types/inflight and add "inflight-lru": ["inflight"] in tsconfig paths, or create a .d.ts file: declare module 'inflight-lru';
If you need newer features, consider forking or using the original lru-cache directly with your own inflight implementation.
Run npm install inflight-lru@^1.0.0 or add to package.json resolutions.
Use const inflight = require('inflight-lru'); (default import).Use createRequire from 'module' as described above.
Change to require() or add "type": "module" in package.json and ensure Node version supports ESM.