Describe the feature
Summary
Add support for TC39 Explicit Resource Management (ERM) proposal, enabling using and await using declarations in jiti.
Motivation
The Explicit Resource Management proposal (Stage 3, targeting ES2026) provides
a standardized way to manage resource cleanup using Symbol.dispose and Symbol.asyncDispose.
using file = openFile("data.txt");
// file is automatically disposed when exiting scope
Since jiti transpiles to CJS for execution, Node.js native ERM support is not available. Babel transformation is required.
Proposed Solution
Integrate @babel/plugin-transform-explicit-resource-management to transpile using/await using declarations into try-finally patterns.
References
Additional information
Describe the feature
Summary
Add support for TC39 Explicit Resource Management (ERM) proposal, enabling
usingandawait usingdeclarations in jiti.Motivation
The Explicit Resource Management proposal (Stage 3, targeting ES2026) provides
a standardized way to manage resource cleanup using
Symbol.disposeandSymbol.asyncDispose.Since jiti transpiles to CJS for execution, Node.js native ERM support is not available. Babel transformation is required.
Proposed Solution
Integrate @babel/plugin-transform-explicit-resource-management to transpile using/await using declarations into try-finally patterns.
References
Additional information