File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -90,14 +90,17 @@ function buildPackageJSON() {
90
90
const { preReleaseTag } = versionMatch . groups ;
91
91
92
92
if ( preReleaseTag != null ) {
93
- const [ tag ] = preReleaseTag . split ( '.' ) ;
93
+ const splittedTag = preReleaseTag . split ( '.' ) ;
94
+ // Note: `experimental-*` take precedence over `alpha`, `beta` or `rc`.
95
+ const publishTag = splittedTag [ 2 ] ?? splittedTag [ 0 ] ;
94
96
assert (
95
- tag . startsWith ( 'experimental-' ) || [ 'alpha' , 'beta' , 'rc' ] . includes ( tag ) ,
96
- `"${ tag } " tag is supported.` ,
97
+ [ 'alpha' , 'beta' , 'rc' ] . includes ( publishTag ) ||
98
+ publishTag . startsWith ( 'experimental-' ) ,
99
+ `"${ publishTag } " tag is supported.` ,
97
100
) ;
98
101
99
102
assert ( ! packageJSON . publishConfig , 'Can not override "publishConfig".' ) ;
100
- packageJSON . publishConfig = { tag : tag || 'latest' } ;
103
+ packageJSON . publishConfig = { tag : publishTag || 'latest' } ;
101
104
}
102
105
103
106
return packageJSON ;
You can’t perform that action at this time.
0 commit comments