File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 85
85
"@khala/commit-analyzer-wildcard" : " ^2.5.2" ,
86
86
"@khala/npm-release-monorepo" : " ^2.5.2" ,
87
87
"@khala/wildcard-release-notes" : " ^2.5.2" ,
88
+ "@semantic-release/exec" : " ^6.0.3" ,
88
89
"@semantic-release/git" : " ^9.0.1" ,
89
90
"@semantic-release/github" : " ^7.2.3" ,
90
91
"@semantic-release/npm" : " ^7.1.3" ,
178
179
],
179
180
"message" : " Release of new version: ${nextRelease.version} <no> [skip ci]"
180
181
}
182
+ ],
183
+ [
184
+ " @semantic-release/exec" , {
185
+ "prepareCmd" : " node ./scripts/update-common.js ${nextRelease.version}"
186
+ }
181
187
]
182
188
]
183
189
},
Original file line number Diff line number Diff line change
1
+ /* eslint-disable no-console */
2
+ const replace = require ( 'replace-in-file' ) ;
3
+ const glob = require ( 'glob' ) ;
4
+
5
+ const nextVersion = process . argv [ 2 ] ;
6
+ console . log ( 'Updating common package version!\n' ) ;
7
+ console . log ( 'Next version is:' , nextVersion , '\n' ) ;
8
+
9
+ const root = process . cwd ( ) ;
10
+ const files = glob . sync ( `${ root } /packages/*/package.json` ) ;
11
+
12
+ console . log ( 'Files to replace: ' , files . join ( ',\n' ) , '\n' ) ;
13
+ console . log ( 'Replacing to: ' , `"@data-driven-forms/common": "^${ nextVersion } "` , '\n' ) ;
14
+
15
+ const optionTypeScriptPath = {
16
+ files,
17
+ from : '"@data-driven-forms/common": "*"' ,
18
+ to : `"@data-driven-forms/common": "^${ nextVersion } "` ,
19
+ } ;
20
+
21
+ ( async ( ) => await replace ( optionTypeScriptPath ) ) ( ) ;
22
+
23
+ console . log ( 'Common package version successfully updated!\n' ) ;
Original file line number Diff line number Diff line change 3405
3405
resolved "https://registry.yarnpkg.com/@semantic-release/error/-/error-2.2.0.tgz#ee9d5a09c9969eade1ec864776aeda5c5cddbbf0"
3406
3406
integrity sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg==
3407
3407
3408
+ "@semantic-release/error@^3.0.0":
3409
+ version "3.0.0"
3410
+ resolved "https://registry.yarnpkg.com/@semantic-release/error/-/error-3.0.0.tgz#30a3b97bbb5844d695eb22f9d3aa40f6a92770c2"
3411
+ integrity sha512-5hiM4Un+tpl4cKw3lV4UgzJj+SmfNIDCLLw0TepzQxz9ZGV5ixnqkzIVF+3tp0ZHgcMKE+VNGHJjEeyFG2dcSw==
3412
+
3413
+ "@semantic-release/exec@^6.0.3":
3414
+ version "6.0.3"
3415
+ resolved "https://registry.yarnpkg.com/@semantic-release/exec/-/exec-6.0.3.tgz#d212fdf19633bdfb553de6cb6c7f8781933224db"
3416
+ integrity sha512-bxAq8vLOw76aV89vxxICecEa8jfaWwYITw6X74zzlO0mc/Bgieqx9kBRz9z96pHectiTAtsCwsQcUyLYWnp3VQ==
3417
+ dependencies:
3418
+ "@semantic-release/error" "^3.0.0"
3419
+ aggregate-error "^3.0.0"
3420
+ debug "^4.0.0"
3421
+ execa "^5.0.0"
3422
+ lodash "^4.17.4"
3423
+ parse-json "^5.0.0"
3424
+
3408
3425
"@semantic-release/git@^9.0.1":
3409
3426
version "9.0.1"
3410
3427
resolved "https://registry.yarnpkg.com/@semantic-release/git/-/git-9.0.1.tgz#7b5486578460084d8914c1aa4c4fff5087afa32a"
You can’t perform that action at this time.
0 commit comments