@@ -33,12 +33,16 @@ export default class SecurityReleaseSteward {
3333 const req = new Request ( credentials ) ;
3434 const release = new PrepareSecurityRelease ( req ) ;
3535 const releaseDate = await release . promptReleaseDate ( cli ) ;
36- validateDate ( releaseDate ) ;
36+ if ( releaseDate !== 'TBD' ) {
37+ validateDate ( releaseDate ) ;
38+ }
39+
3740 const createVulnerabilitiesJSON = await release . promptVulnerabilitiesJSON ( cli ) ;
3841
3942 let securityReleasePRUrl ;
4043 if ( createVulnerabilitiesJSON ) {
41- securityReleasePRUrl = await this . createVulnerabilitiesJSON ( req , release , { cli } ) ;
44+ securityReleasePRUrl = await this . createVulnerabilitiesJSON (
45+ req , release , releaseDate , { cli } ) ;
4246 }
4347
4448 const createIssue = await release . promptCreateRelaseIssue ( cli ) ;
@@ -51,7 +55,7 @@ export default class SecurityReleaseSteward {
5155 cli . ok ( 'Done!' ) ;
5256 }
5357
54- async createVulnerabilitiesJSON ( req , release , { cli } ) {
58+ async createVulnerabilitiesJSON ( req , release , releaseDate , { cli } ) {
5559 // checkout on the next-security-release branch
5660 checkoutOnSecurityReleaseBranch ( cli , this . repository ) ;
5761
@@ -61,8 +65,7 @@ export default class SecurityReleaseSteward {
6165 const deps = _ . groupBy ( depUpdates , 'name' ) ;
6266
6367 // create the vulnerabilities.json file in the security-release repo
64- const filePath = await release . createVulnerabilitiesJSON ( reports , deps , { cli } ) ;
65-
68+ const filePath = await release . createVulnerabilitiesJSON ( reports , deps , releaseDate , { cli } ) ;
6669 // review the vulnerabilities.json file
6770 const review = await release . promptReviewVulnerabilitiesJSON ( cli ) ;
6871
@@ -127,7 +130,7 @@ class PrepareSecurityRelease {
127130 nextWeekDate . setDate ( nextWeekDate . getDate ( ) + 7 ) ;
128131 // Format the date as YYYY/MM/DD
129132 const formattedDate = nextWeekDate . toISOString ( ) . slice ( 0 , 10 ) . replace ( / - / g, '/' ) ;
130- return cli . prompt ( 'Enter target release date in YYYY/MM/DD format:' , {
133+ return cli . prompt ( 'Enter target release date in YYYY/MM/DD format (TBD if not defined yet) :' , {
131134 questionType : 'input' ,
132135 defaultAnswer : formattedDate
133136 } ) ;
@@ -217,9 +220,10 @@ class PrepareSecurityRelease {
217220 return selectedReports ;
218221 }
219222
220- async createVulnerabilitiesJSON ( reports , dependencies , { cli } ) {
223+ async createVulnerabilitiesJSON ( reports , dependencies , releaseDate , { cli } ) {
221224 cli . separator ( 'Creating vulnerabilities.json...' ) ;
222225 const file = JSON . stringify ( {
226+ releaseDate,
223227 reports,
224228 dependencies
225229 } , null , 2 ) ;
0 commit comments