Skip to content

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

@schragge

Description

@schragge

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions