I have a package.json file that looks like this:
{
"name": "service",
"version": "1.0.0",
"private": true,
"description": "my service",
"license": "none",
"scripts": {
"build": "tsc"
},
"dependencies": {
"@mycompany/mypackage": "1.1.1"
}
}
I want to update the @mycompany/mypackage version to "1.2.1". I found articles like this and this suggesting jq.
When I run my jq command jq -r '"dependencies.@mycompany/mypackage" |= "1.2.1"' package.json
, I get this error: jq: error (at temp.json:13): Invalid path expression with result "dependencies.@mycompany/m...
From what I can tell the path is correct when I used jq play.
Does anyone have a suggestion what is wrong?