colors.js icon indicating copy to clipboard operation
colors.js copied to clipboard

Expose safe lib

Open marikaner opened this issue 6 years ago • 1 comments

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.

marikaner avatar Oct 24 '19 15:10 marikaner

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 😄

dackmin avatar Dec 06 '19 07:12 dackmin