1. Docs
  2. Migration

Version 3.0 → 3.1

Faster core. Same flow.

FIFO execution, explicit this.next(), CommonJS syntax, classic scripts, and the stack path remain available.

What changed

Two internals. One floor.

Task logic stays the same. Upgrade Node, then install.

Modules

One Node source

import and require both load queue.js. The duplicate CJS build is gone.

State

Private fields

Instance state no longer pays for external WeakMap lookups.

Runtime

Node 22.13 or newer

This floor supports warning-free synchronous CommonJS loading of the shared ES module.

Stack

easy-stack 2.1

The LIFO entry uses the same private-field and shared-module design.

No queue API rewrite.

Keep your imports, requires, task functions, and this.next() hand-offs.

Upgrade checklist

Verify the edges, then run.

  • Move production and CI to Node 22.13 or newer.
  • Keep ESM imports or CommonJS requires unchanged.
  • Keep classic browser pages on queue-vanilla.js.
  • Run the application integration suite.
  • Compare your workload with npm run benchmark.