Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

convert to ESM#217

Open
milahu wants to merge 2 commits intoaclap-dev:masterfrom
milahu:convert-to-esm
Open

convert to ESM#217
milahu wants to merge 2 commits intoaclap-dev:masterfrom
milahu:convert-to-esm

Conversation

@milahu
Copy link

@milahu milahu commented Apr 1, 2024

ESM is required for top level await

if (process.argv[2] == "install") {
  (await import("./native-autoinstall.js")).install();

this is a by-product of my attempt to fix

  // note: this disables the exception handler
  // so exceptions will silently fail
  // for (let e of ["exit", "SIGINT", "SIGTERM", "uncaughtException"]) {
  converter = await import('./converter.js');

importing converter.js on the top level disables the exception handler

@paulrouget
Copy link
Member

Sorry for the late reply.

That's great! Does it work proper with an older version of Node (version 10)? We sadly have to support old Node for older OSes.

@milahu
Copy link
Author

milahu commented Apr 17, 2024

We sadly have to support old Node

oof, thats always a pain...
sorry, but for me thats out of scope

@paulrouget
Copy link
Member

Yeah, to drop Node 10 support, we would have to also drop Linux 32bits, Windows 7, and MacOS 10.13.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants