Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

ESM disabling colored output? #622

Closed
damianobarbati opened this issue Oct 7, 2018 · 2 comments
Closed

ESM disabling colored output? #622

damianobarbati opened this issue Oct 7, 2018 · 2 comments
Labels

Comments

@damianobarbati
Copy link

//node test.js
const console = require('better-console');
console.error('this is red');

vs

//node -r esm test.js
import console from 'better-console';
console.error('this is not red');
@damianobarbati
Copy link
Author

Not sure because I just found out assert methods are able to print red messages.

$ node -r esm -e 'import { strict as assert } from "assert"; assert.deepStrictEqual(1, 2)'

@jdalton
Copy link
Member

jdalton commented Oct 10, 2018

Hi @damianobarbati!

Thanks. The issue is that I was incorrectly detecting shadowed identifiers. My strategy for detection works great for ESM identifiers but didn't account for global identifiers. I've patches this locally and will merge when I have tests written.

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

No branches or pull requests

2 participants