Bug 1465327 - command line tool json-diff is not packaged in nodejs-json-diff
command line tool json-diff is not packaged in nodejs-json-diff
Product: Fedora
Classification: Fedora
Component: nodejs-json-diff (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Piotr Popieluch
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-06-27 04:40 EDT by Martin Bukatovic
Modified: 2017-12-15 15:42 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-12-12 05:31:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Martin Bukatovic 2017-06-27 04:40:34 EDT
Description of problem

Command line tool json-diff based on the json-diff library is not provided by
nodejs-json-diff rpm package.

Version-Release number of selected component


Steps to Reproduce

1. dnf install nodejs-json-diff
2. try to run json-diff tool (and/or check tools provided in the package)

Actual results

$ json-diff
-bash: json-diff: command not found

There is no command line tool provided in the package:

$ rpm -ql nodejs-json-diff | grep '/bin'

Expected results

There is json-diff tool in nodejs-json-diff package:

$ rpm -ql nodejs-json-diff | grep '/bin'

Additional info

Latest build for fedora 26 doesn't provide the cli tool neither:

$ rpm -qlp nodejs-json-diff-0.3.1-3.fc26.noarch.rpm | grep '/bin'

The command line interface is provided by upstream here:


There is no direct clash at this point:

$ dnf provides '/usr/bin/json-diff'
Failed to synchronize cache for repo 'psss-edd', disabling.
Last metadata expiration check: 1:57:02 ago on Tue Jun 27 08:39:48 2017.
Error: No Matches foud

but there is a similar named python tool:

$ dnf provides '/usr/bin/json_diff'
Failed to synchronize cache for repo 'psss-edd', disabling.
Last metadata expiration check: 1:58:12 ago on Tue Jun 27 08:39:48 2017.
json_diff-1.3.4-4.fc25.noarch : Generates diff between two JSON files
Repo        : @System

json_diff-1.3.4-4.fc25.noarch : Generates diff between two JSON files
Repo        : fedora
Comment 1 Martin Bukatovic 2017-06-27 04:46:53 EDT
I tried to create json-diff file myself based on upstream code:

$ cat ~/bin/json-diff 
#!/usr/bin/env node

But this first idea I had doesn't work:

$ json-diff --help
            throw new Error("Array must follow a command spec: " + (JSON.stringify(spec)));

Error: Array must follow a command spec: "  first.json              Old file #var(file1) #required"
    at Syntax.add (/usr/lib/node_modules/dreamopt/lib/dreamopt.js:491:19)
    at parse (/usr/lib/node_modules/dreamopt/lib/dreamopt.js:866:12)
    at module.exports (/usr/lib/node_modules/json-diff/lib/cli.js:56:34)
    at Object.<anonymous> (/home/martin/bin/json-diff:2:54)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)

And I'm not a javascript expert, so I'm not exactly sure who's to blame here.
Comment 2 Piotr Popieluch 2017-06-28 07:04:53 EDT
It works after I recompile the source with iced-coffee-script. iced-coffee-script is not in Fedora yet so it will need to be packaged first.

Also note that the error handling in json-diff is far from perfect, it throws an exception when I don't supply any arguments.
Comment 3 Piotr Popieluch 2017-07-10 16:00:25 EDT
Adding Jared, what should we do about this?
Comment 4 Fedora End Of Life 2017-11-16 13:58:42 EST
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 5 Fedora End Of Life 2017-12-12 05:31:44 EST
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 6 Jared Smith 2017-12-15 15:42:27 EST
Sorry for the delay -- I've gone ahead and fixed this in RAWHIDE as part of a version upgrade on json-diff.  If you'd like me to push it to F26 or F27, please let me know.

Note You need to log in before you can comment on or make changes to this bug.