File tree Expand file tree Collapse file tree 6 files changed +258
-458
lines changed Expand file tree Collapse file tree 6 files changed +258
-458
lines changed Original file line number Diff line number Diff line change 34
34
},
35
35
"devDependencies" : {
36
36
"@oclif/plugin-command-snapshot" : " ^5.2.7" ,
37
- "@salesforce/dev-scripts" : " ^10.2.2 " ,
37
+ "@salesforce/dev-scripts" : " ^10.2.4 " ,
38
38
"@salesforce/ts-sinon" : " ^1.4.22" ,
39
39
"@types/semver" : " ^7.5.8" ,
40
40
"@types/shelljs" : " ^0.8.15" ,
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ type GetObjectOption = Omit<GetObjectRequest, 'Bucket'>;
29
29
30
30
type AmazonS3Options = {
31
31
bucket ?: string ;
32
- cli ? : CLI ;
32
+ cli : CLI ;
33
33
channel ?: Channel ;
34
34
baseUrl ?: string ;
35
35
credentials ?: CredentialsOptions ;
Original file line number Diff line number Diff line change @@ -298,8 +298,8 @@ export default class build extends SfCommand<void> {
298
298
const email = await this . exec ( 'git config user.email' , true ) ;
299
299
if ( ! username || ! email ) {
300
300
const user = await octokit . request ( 'GET /user' ) ;
301
- if ( ! username ) await this . exec ( `git config user.name "${ user . data . name } "` ) ;
302
- if ( ! email ) await this . exec ( `git config user.email "${ user . data . email } "` ) ;
301
+ if ( ! username && user . data . name ) await this . exec ( `git config user.name "${ user . data . name } "` ) ;
302
+ if ( ! email && user . data . email ) await this . exec ( `git config user.email "${ user . data . email } "` ) ;
303
303
}
304
304
}
305
305
}
Original file line number Diff line number Diff line change @@ -81,14 +81,14 @@ export default class ReleaseNotes extends SfCommand<ChangesByPlugin> {
81
81
if ( differences . upgraded . size ) {
82
82
this . styledHeader ( 'Upgraded Plugins' ) ;
83
83
for ( const [ plugin , version ] of differences . upgraded . entries ( ) ) {
84
- this . log ( `• ${ plugin } ${ oldPlugins . get ( plugin ) } => ${ version } ` ) ;
84
+ this . log ( `• ${ plugin } ${ oldPlugins . get ( plugin ) ?? '<no match in old plugins>' } => ${ version } ` ) ;
85
85
}
86
86
}
87
87
88
88
if ( differences . downgraded . size ) {
89
89
this . styledHeader ( 'Downgraded Plugins' ) ;
90
90
for ( const [ plugin , version ] of differences . downgraded . entries ( ) ) {
91
- this . log ( `• ${ plugin } ${ oldPlugins . get ( plugin ) } => ${ version } ` ) ;
91
+ this . log ( `• ${ plugin } ${ oldPlugins . get ( plugin ) ?? '<no match in old plugins>' } => ${ version } ` ) ;
92
92
}
93
93
}
94
94
@@ -155,10 +155,9 @@ export default class ReleaseNotes extends SfCommand<ChangesByPlugin> {
155
155
( pr ) => pr . merged_at && ( ! publishDate || pr . merged_at > publishDate ) && ! pr . user ?. login . includes ( 'dependabot' )
156
156
)
157
157
. map ( async ( pr ) => {
158
- const username = await this . getNameOfUser (
159
- ensureString ( pr . user ?. login , `No user.login property found for ${ JSON . stringify ( pr ) } ` )
160
- ) ;
161
- const author = pr . user ?. login === username ? username : `${ username } (${ pr . user ?. login } )` ;
158
+ const prUserLogin = ensureString ( pr . user ?. login , `No user.login property found for ${ JSON . stringify ( pr ) } ` ) ;
159
+ const username = await this . getNameOfUser ( prUserLogin ) ;
160
+ const author = pr . user ?. login === username ? username : `${ username } (${ prUserLogin } )` ;
162
161
return {
163
162
author,
164
163
mergedAt : pr . merged_at ,
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ export class Registry {
31
31
* Return a properly formatted --registry string
32
32
*/
33
33
public getRegistryParameter ( ) : string {
34
+ if ( ! this . registryUrl ) {
35
+ throw new SfError ( 'registry is not set' ) ;
36
+ }
34
37
return `--registry ${ this . registryUrl } ` ;
35
38
}
36
39
@@ -47,12 +50,12 @@ export class Registry {
47
50
npmrc = npmrc . map ( ( line ) => {
48
51
if ( line . includes ( 'registry=' ) ) {
49
52
if ( this . registryUrl && line . endsWith ( this . registryUrl ) ) return line ;
50
- return `registry=${ this . registryUrl } ` ;
53
+ return `registry=${ this . registryUrl ?? '' } ` ;
51
54
}
52
55
return line ;
53
56
} ) ;
54
57
} else {
55
- npmrc . push ( `registry=${ this . registryUrl } ` ) ;
58
+ npmrc . push ( `registry=${ this . registryUrl ?? '' } ` ) ;
56
59
}
57
60
await this . writeNpmrc ( packageDirectory , npmrc ) ;
58
61
}
@@ -75,7 +78,7 @@ export class Registry {
75
78
npmrc = npmrc . map ( ( line ) => {
76
79
if ( line . includes ( '_authToken' ) ) {
77
80
if ( line . includes ( normalizedRegistry ) ) return line ;
78
- return `${ normalizedRegistry } :_authToken="${ this . authToken } "` ;
81
+ return `${ normalizedRegistry } :_authToken="${ this . authToken ?? '' } "` ;
79
82
}
80
83
return line ;
81
84
} ) ;
You can’t perform that action at this time.
0 commit comments