unstale

npm / import-in-the-middle

import-in-the-middle

What changed in import-in-the-middle 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.

1 breaking3 new APIs and options4 performance2 behavior and defaults24 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.1 on npm

import-in-the-middle 320 changes

Breaking changes 1

  • Support for Node.js versions below 18 has been dropped.

    3.0.0release notes

New APIs and options 3

  • CJS source stripping can now be disabled.

    3.4.0release notes

  • Adds a predicate for matching consumer-owned modules.

    3.2.0release notes

  • Adds synchronous loader hooks via module.registerHooks.

    3.1.0release notes

Performance 3

Behavior and default changes 2

  • Adds support for es-module-lexer v3, allowing developers to use that version with import-in-the-middle.

    3.5.0release notes

  • Instrumentation now supports type-stripped TypeScript modules.

    3.3.0release notes

Fixes and other changes 11

  • Duplicate TypeScript export names are removed.

    3.5.2release notes

  • Restores compatibility with legacy bundlers.

    3.5.1release notes

  • TypeScript is stripped after loaders normalize the format.

    3.3.3release notes

  • Code generation is skipped on broken maglev.

    3.3.2release notes

  • Loader URLs are escaped in generated wrappers.

    3.3.2release notes

  • Tagged modules are delegated to their owning loader.

    3.3.2release notes

  • Guards against circular recursion when processing export-star declarations.

    3.3.0release notes

  • Keeps get-esm-exports synchronous so require() continues to work.

    3.3.0release notes

  • Resolves re-exported values from the module where they are defined.

    3.3.0release notes

  • Updated proxying logic for builtins used as CJS.

    3.0.2release notes

  • File specifiers from turbopacked packages are handled better.

    3.0.1release notes

import-in-the-middle 214 changes

Performance 1

  • Improves performance by calculating fewer stack frames and using fast paths.

    2.0.3release notes

Fixes and other changes 13

  • Fixes issues with duplicate entries.

    2.0.6release notes

  • The callback name argument is now the module name when matching the module main file, including when the internals option is used.

    2.0.6release notes

  • Builtin modules that require the node: prefix are now properly hooked.

    2.0.6release notes

  • Fixes issues with specifier (submodule) matching.

    2.0.6release notes

  • Recognizes the entrypoint as CommonJS when loader chains add query params to file URLs.

    2.0.5release notes

  • Handles lazy initialization and circular dependencies.

    2.0.5release notes

  • Top-level modules are no longer instrumented.

    2.0.4release notes

  • Removes a small memory leak.

    2.0.3release notes

  • No longer crashes when setters are missing.

    2.0.3release notes

  • Handles undefined exports properly.

    2.0.3release notes

  • Properly handles internals when the specifier matches.

    2.0.2release notes

  • Properly hooks submodule package exports.

    2.0.1release notes

  • Modules running in the loader thread were converted to ESM to work around loader issues.

    2.0.0release notes