Closed Codex- closed 7 months ago
Not sure if this is the preferred solution. I think this could be properly tackled by https://github.com/open-cli-tools/concurrently/issues/399 instead. Also I think it's about time to go full ESM, things are getting messy. I'll look into this more detailed later on this day.
I noticed this previously but it's consistently reproducible with Bun.
The esm based
index.mjs
export forconcurrently
,export default concurrently.default
, in some cases depending on the way you're executingconcurrently
can have the default function onconcurrently
itself which makes this export not work as expect, asdefault
is undefined.This PR adds a simple fallback
export default concurrently.default || concurrently
that allows some defense against this behaviour.I have added tests for both Node and Bun that test the
commonjs
andesm
import behaviour, as well as a directts
import case testing both for Bun's case.Also, I've noticed Node 19 is targetted here but Node 20 enters LTS next month, should this target 20 instead of 19?