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() {
9090 const { preReleaseTag } = versionMatch . groups ;
9191
9292 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 ] ;
9496 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.` ,
97100 ) ;
98101
99102 assert ( ! packageJSON . publishConfig , 'Can not override "publishConfig".' ) ;
100- packageJSON . publishConfig = { tag : tag || 'latest' } ;
103+ packageJSON . publishConfig = { tag : publishTag || 'latest' } ;
101104 }
102105
103106 return packageJSON ;
You can’t perform that action at this time.
0 commit comments