File tree 7 files changed +44
-68
lines changed
7 files changed +44
-68
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' skuba ' : patch
3
+ ---
4
+
5
+ ** deps:** runtypes ^6.0.0
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 84
84
"picomatch" : " ^2.2.2" ,
85
85
"prettier" : " 2.2.1" ,
86
86
"read-pkg-up" : " ^7.0.1" ,
87
- "runtypes" : " ^5 .0.1 " ,
87
+ "runtypes" : " ^6 .0.0 " ,
88
88
"semantic-release" : " ^17.3.8" ,
89
89
"serialize-error" : " ^8.0.1" ,
90
90
"source-map-support" : " ^0.5.19" ,
Original file line number Diff line number Diff line change @@ -251,11 +251,7 @@ const configureFromPipe = async (): Promise<InitConfig> => {
251
251
252
252
if ( ! result . success ) {
253
253
log . err ( 'Invalid data from stdin:' ) ;
254
- log . err (
255
- typeof result . key === 'undefined'
256
- ? result . message
257
- : `${ result . key } : ${ result . message } ` ,
258
- ) ;
254
+ log . err ( result . message ) ;
259
255
process . exit ( 1 ) ;
260
256
}
261
257
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const INIT_CONFIG_INPUT_FIELDS = {
12
12
ownerName : t . String ,
13
13
repoName : t . String ,
14
14
} )
15
- . And ( t . Dictionary ( t . String , 'string' ) ) ,
15
+ . And ( t . Dictionary ( t . String , t . String ) ) ,
16
16
templateName : t . String ,
17
17
} ;
18
18
@@ -22,30 +22,23 @@ export const InitConfigInput = t.Record(INIT_CONFIG_INPUT_FIELDS);
22
22
23
23
export type InitConfig = t . Static < typeof InitConfig > ;
24
24
25
- /**
26
- * TODO: migrate from `t.Partial` to `.optional()` once Runtypes 6 is released.
27
- */
28
- const InitConfig = t
29
- . Record ( {
30
- ...INIT_CONFIG_INPUT_FIELDS ,
31
-
32
- templateData : t
33
- . Record ( {
34
- ownerName : t . String ,
35
- repoName : t . String ,
36
-
37
- // Derived from ownerName
38
- orgName : t . String ,
39
- teamName : t . String ,
40
-
41
- // Generated by init command
42
- port : t . String ,
43
- } )
44
- . And ( t . Dictionary ( t . String , 'string' ) ) ,
45
- } )
46
- . And (
47
- t . Partial ( {
48
- entryPoint : t . String ,
49
- type : ProjectType ,
50
- } ) ,
51
- ) ;
25
+ const InitConfig = t . Record ( {
26
+ ...INIT_CONFIG_INPUT_FIELDS ,
27
+
28
+ templateData : t
29
+ . Record ( {
30
+ ownerName : t . String ,
31
+ repoName : t . String ,
32
+
33
+ // Derived from ownerName
34
+ orgName : t . String ,
35
+ teamName : t . String ,
36
+
37
+ // Generated by init command
38
+ port : t . String ,
39
+ } )
40
+ . And ( t . Dictionary ( t . String , t . String ) ) ,
41
+
42
+ entryPoint : t . String . optional ( ) ,
43
+ type : ProjectType . optional ( ) ,
44
+ } ) ;
Original file line number Diff line number Diff line change @@ -9,32 +9,19 @@ import { ProjectType } from './manifest';
9
9
10
10
export type TemplateConfig = t . Static < typeof TemplateConfig > ;
11
11
12
- /**
13
- * TODO: migrate from `t.Partial` to `.optional()` once Runtypes 6 is released.
14
- */
15
- export const TemplateConfig = t
16
- . Record ( {
17
- fields : t . Array (
18
- t
19
- . Record ( {
20
- name : t . String ,
21
- message : t . String ,
22
- initial : t . String ,
23
- } )
24
- . And (
25
- t . Partial ( {
26
- validate : t . Function ,
27
- } ) ,
28
- ) ,
29
- ) ,
30
- } )
31
- . And (
32
- t . Partial ( {
33
- entryPoint : t . String ,
34
- noSkip : t . Boolean ,
35
- type : ProjectType ,
12
+ export const TemplateConfig = t . Record ( {
13
+ fields : t . Array (
14
+ t . Record ( {
15
+ name : t . String ,
16
+ message : t . String ,
17
+ initial : t . String ,
18
+ validate : t . Function . optional ( ) ,
36
19
} ) ,
37
- ) ;
20
+ ) ,
21
+ entryPoint : t . String . optional ( ) ,
22
+ noSkip : t . Boolean . optional ( ) ,
23
+ type : ProjectType . optional ( ) ,
24
+ } ) ;
38
25
39
26
export const TEMPLATE_CONFIG_FILENAME = 'skuba.template.js' ;
40
27
Original file line number Diff line number Diff line change @@ -8554,10 +8554,10 @@ run-parallel@^1.1.9:
8554
8554
dependencies :
8555
8555
queue-microtask "^1.2.2"
8556
8556
8557
- runtypes@^5 .0.1 :
8558
- version "5 .0.1 "
8559
- resolved "https://registry.yarnpkg.com/runtypes/-/runtypes-5 .0.1 .tgz#406d140410266f6ece17c3501a37234f91faa346 "
8560
- integrity sha512-+TWVlCmFsgrG4Nd2u+ambpNFO8Yp4heAflGQi9oNj6GRkxZo8aSDBxO1Y0vlKIQCWKKFxato+8Hn67XeAqKhRA ==
8557
+ runtypes@^6 .0.0 :
8558
+ version "6 .0.0 "
8559
+ resolved "https://registry.yarnpkg.com/runtypes/-/runtypes-6 .0.0 .tgz#0010e7e050a41d4ab38b6138051dfb8774a53f07 "
8560
+ integrity sha512-hVBZ2S0i9MmyViSpwCU7TGFuEZxjPIeTMbhCpz59/8C3IGbPL6N03bIVALGfVWZQ+MTXORjWpWnZUP3hPyw96w ==
8561
8561
8562
8562
rxjs@^6.6.3 :
8563
8563
version "6.6.6"
You can’t perform that action at this time.
0 commit comments