googleapis / googleapis/release-please

How to use @ at jsonpath

Open
#2,494 1 comment 0 reactions 1 assignee Claimed by @chingor13 View on GitHub
priority: p3 type: question
Dominant language
TypeScript
Stars
7.5k
Forks
588
Avg merge
12h 16m
Merged PRs (30d)
7

Description

We used release-please in a monorepo with TypeScript applications. We want to use extra files to change the version of @components/shared in package.json.

We have this directory structure:
/libs/shared/package.json
/libs/kyc/package.json

The package.json from the kyc directory has the following contents:
{
"name": "@components/kyc",
"version": "1.3.26",
"main": "./react-lib.js",
"module": "./index.d.ts",
"type": "module",
"scripts": {
"test": "vitest --ui"
},
"dependencies": {
"@components/shared": "1.3.27"
},
"verze": "1.1.1",
"exports": {
".": {
"import": "./react-lib.js",
"require": "./react-lib.umd.cjs"
}
}
}

The release-please configuration looks like this:
{
"release-type": "node",
"separate-pull-requests": false,
"sequential-calls": true,
"draft-pull-request": false,
"draft": false,
"prerelease": false,
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"packages": {
"libs/shared": {
"package-name": "shared",
"component": "shared",
"changelog-path": "CHANGELOG.md",
"extra-files": [
{
"path": "version.json",
"type": "json",
"jsonpath": "$.version"
},
{
"path": "/libs/kyc/package.json",
"type": "json",
"jsonpath": "$.dependencies['@components/shared']"
},
{
"path": "/libs/kyc/package.json",
"type": "json",
"jsonpath": "$.verze"
}
]
},
"libs/kyc": {
"package-name": "kyc",
"component": "kyc",
"changelog-path": "CHANGELOG.md",
"extra-files": [
{
"path": "version.json",
"type": "json",
"jsonpath": "$.version"
}
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

If I add the second part of extra files, which sets the jsonpath parameter to "verze", it works OK.

How can i change version of of @components/shared?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.