File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 2222 "format" : " biome format" ,
2323 "check" : " biome check" ,
2424 "prepare" : " husky" ,
25- "version" : " npm version $npm_package_version --workspaces --git-tag-version false --ignore- scripts && git add '**/package.json' " ,
25+ "version" : " node scripts/versionAllPackages.mts " ,
2626 "publish" : " npm run publish --workspaces"
2727 },
2828 "devDependencies" : {
Original file line number Diff line number Diff line change 1+ // Cross environment script to update all package.json versions in a monorepo
2+ // A port of the following bash script:
3+ // npm version $npm_package_version --workspaces --git-tag-version false --ignore-scripts && git add '**/package.json'
4+
5+ import { execSync } from 'node:child_process' ;
6+
7+ const packages = [ 'tanstack-query-builder' , 'tanstack-query-builder-example-mocks' ] ;
8+
9+ const version = process . env . npm_package_version ;
10+ const cwd = process . cwd ( ) ;
11+
12+ execSync ( `npm version ${ version } --workspaces --git-tag-version false --ignore-scripts` , { cwd } ) ;
13+ execSync ( `npm update --save --workspaces ${ packages . join ( ' ' ) } ` , { cwd } ) ;
14+ execSync ( `git add "**/package.json"` , { cwd } ) ;
You can’t perform that action at this time.
0 commit comments