Marak / colors.js

get colors in your node.js console
https://github.com/Marak/colors.js
Other
5.16k stars 446 forks source link

Expose safe lib #269

Open marikaner opened 4 years ago

marikaner commented 4 years ago

The safe lib is currently not exposed from the root of the project, which can lead to linting errors: https://palantir.github.io/tslint/rules/no-submodule-imports/

An easy way to fix this would be to expose safe from the index.

dackmin commented 4 years ago

It also became an issue starting with node 12 & ES modules as import now only resolves deep imports using file extensions.

e.g import colors from 'colors/safe' (perfectly working in node 10) has to be replaced with import colors from 'colors/safe.js' in order to work with node 12.

I know modules are still in stage 1, even with node 13, but removing the need of a submodule for safe mode might solve this ES module issue in the process without "officially" supporting ES modules 😄