Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colorizing doesn't work with the latest json-colorizer 3.x #897

Open
schragge opened this issue Jul 7, 2024 · 0 comments
Open

Colorizing doesn't work with the latest json-colorizer 3.x #897

schragge opened this issue Jul 7, 2024 · 0 comments

Comments

@schragge
Copy link

schragge commented Jul 7, 2024

json-colorizer has been rewritten from scratch recently. Colorizing in jfq doesn't work with the latest version saying

colorize is not a function

This simple patch makes it work again

--- a/src/jfq.js
+++ b/src/jfq.js
@@ -1,4 +1,4 @@
-import colorize from 'json-colorizer'
+const { colorize } = require('json-colorizer');
 import jsonata from 'jsonata'
 import readInput from 'read-input'
 import getopts from './getopts'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant