File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ async function main(): Promise<void> {
28
28
if ( results . type === "none" ) {
29
29
console . log ( `\n📦 ${ results . package } v${ results . version } is already published to NPM` ) ;
30
30
}
31
- else if ( results . type === "dry-run" ) {
31
+ else if ( results . dryRun ) {
32
32
console . log ( `\n📦 ${ results . package } v${ results . version } successfully built but not published to NPM` ) ;
33
33
}
34
34
else {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export async function main(args: string[]): Promise<void> {
37
37
if ( results . type === "none" ) {
38
38
console . log ( `\n📦 ${ results . package } v${ results . version } is already published to NPM` ) ;
39
39
}
40
- else if ( results . type === "dry-run" ) {
40
+ else if ( results . dryRun ) {
41
41
console . log ( `\n📦 ${ results . package } v${ results . version } successfully built but not published to NPM` ) ;
42
42
}
43
43
else {
Original file line number Diff line number Diff line change @@ -25,9 +25,10 @@ export async function npmPublish(opts: Options = {}): Promise<Results> {
25
25
26
26
let results : Results = {
27
27
package : manifest . name ,
28
- type : options . dryRun ? "dry-run" : ( diff || "none" ) ,
28
+ type : diff || "none" ,
29
29
version : manifest . version . raw ,
30
30
oldVersion : publishedVersion . raw ,
31
+ dryRun : options . dryRun
31
32
} ;
32
33
33
34
options . debug ( "OUTPUT:" , results ) ;
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ import { ReleaseType } from "semver";
3
3
export { ReleaseType } ;
4
4
5
5
/**
6
- * Results of the ` publish
6
+ * Results of the publish
7
7
*/
8
8
export interface Results {
9
9
/**
10
10
* The type of version change that occurred
11
11
*/
12
- type : ReleaseType | "none" | "dry-run" ;
12
+ type : ReleaseType | "none" ;
13
13
14
14
/**
15
15
* The name of the NPM package that was published
@@ -25,4 +25,9 @@ export interface Results {
25
25
* The version number that was previously published to NPM
26
26
*/
27
27
oldVersion : string ;
28
+
29
+ /**
30
+ * Whether this was a dry run (not published to NPM)
31
+ */
32
+ dryRun : boolean ;
28
33
}
You can’t perform that action at this time.
0 commit comments