File tree 2 files changed +22
-21
lines changed
packages/proxy-agent/test
2 files changed +22
-21
lines changed Original file line number Diff line number Diff line change @@ -329,10 +329,13 @@ describe('ProxyAgent', () => {
329
329
process . env . WSS_PROXY = httpProxyServerUrl . href ;
330
330
const agent = new ProxyAgent ( ) ;
331
331
332
- const ws = new WebSocket ( httpsServerUrl . href . replace ( 'https' , 'wss' ) , {
333
- agent,
334
- rejectUnauthorized : false
335
- } ) ;
332
+ const ws = new WebSocket (
333
+ httpsServerUrl . href . replace ( 'https' , 'wss' ) ,
334
+ {
335
+ agent,
336
+ rejectUnauthorized : false ,
337
+ }
338
+ ) ;
336
339
const [ message ] = await once ( ws , 'message' ) ;
337
340
expect ( connectionCount ) . toEqual ( 1 ) ;
338
341
expect ( requestCount ) . toEqual ( 0 ) ;
Original file line number Diff line number Diff line change 1
1
import 'zx/globals' ;
2
2
3
- const sha = process . argv [ 2 ] || process . env . GITHUB_SHA ;
3
+ const sha = process . argv [ 2 ] || process . env . GITHUB_SHA || 'HEAD' ;
4
4
5
- await $ `git show ${ sha } ` ;
5
+ try {
6
+ const modifiedPackages =
7
+ await $ `git show ${ sha } --pretty="format:" --name-only -- packages/*/package.json` . nothrow ( ) ;
6
8
7
- const modifiedPackages =
8
- await $ `git show ${ sha } --pretty="format:" --name-only -- packages/*/package.json` ;
9
+ const packageJsonPaths = modifiedPackages . stdout . trim ( ) . split ( '\n' ) ;
9
10
10
- const packageJsonPaths = modifiedPackages . stdout . trim ( ) . split ( '\n' ) ;
11
+ const packageJsons = await Promise . all (
12
+ packageJsonPaths . map ( ( p ) => fs . readJson ( p ) )
13
+ ) ;
11
14
12
- if ( packageJsonPaths . length ) {
13
- const packageJsons = await Promise . all (
14
- packageJsonPaths . map ( ( p ) => fs . readJson ( p ) )
15
- ) ;
16
-
17
- for ( const packageJson of packageJsons ) {
18
- const tag = `${ packageJson . name } @${ packageJson . version } ` ;
19
- //await $`git tag ${tag}`;
20
- console . log ( { tag } )
21
- }
22
- } else {
23
- console . log ( 'No tags need to be created' ) ;
15
+ for ( const packageJson of packageJsons ) {
16
+ const tag = `${ packageJson . name } @${ packageJson . version } ` ;
17
+ //await $`git tag ${tag}`;
18
+ console . log ( { tag } ) ;
19
+ }
20
+ } catch {
21
+ console . log ( 'No tags need to be created' ) ;
24
22
}
You can’t perform that action at this time.
0 commit comments