dvdln / jsonpath-object-transform

Transform an object literal using JSONPath.
MIT License
121 stars 42 forks source link

jsonPath conflit #18

Open gauravagrwl opened 6 years ago

gauravagrwl commented 6 years ago

Hello Dvdln, Below is my package declaration,

I am trying to use both jsonpath-object-transform and jsonpath.

{
  "name": "TestRules",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "jsonpath-object-transform": "^1.0.4",
    "jsonpath": "^1.0.0",
    "validator": "^10.4.0"
  },
  "author": "",
  "license": ""
}

Internally jsonpath-object-transform use "JSONPath": "^0.10.0"

Because of conflict of version in JSONPath and jsonpath, it throws an error at runtime.

After looking into the code of jsonpath-object-transform, a quick fix will be to modify the package.json to include "jsonpath" updated version instead of JSONPath.

"dependencies": {
    "jsonpath": "^1.0.0",
  },

Please advice.

Regards Gaurav