@@ -58,21 +58,15 @@ async function main () {
5858
5959 // 2. UPDATE UPCOMING CHANGES
6060 const upcomingChangesPath = getDataFilepath ( 'upcomingChanges' , graphqlVersion )
61- let previousUpcomingChanges = null
62- if ( fs . existsSync ( upcomingChangesPath ) ) {
63- previousUpcomingChanges = yaml . safeLoad ( fs . readFileSync ( upcomingChangesPath , 'utf8' ) )
64- }
61+ const previousUpcomingChanges = yaml . safeLoad ( fs . readFileSync ( upcomingChangesPath , 'utf8' ) )
6562 const safeForPublicChanges = await getRemoteRawContent ( upcomingChangesPath , graphqlVersion )
6663 updateFile ( upcomingChangesPath , safeForPublicChanges )
6764 upcomingChangesJson [ graphqlVersion ] = await processUpcomingChanges ( safeForPublicChanges )
6865
6966 // 3. UPDATE SCHEMAS
7067 // note: schemas live in separate files per version
7168 const schemaPath = getDataFilepath ( 'schemas' , graphqlVersion )
72- let previousSchemaString = null
73- if ( fs . existsSync ( upcomingChangesPath ) ) {
74- previousSchemaString = fs . readFileSync ( schemaPath , 'utf8' )
75- }
69+ const previousSchemaString = fs . readFileSync ( schemaPath , 'utf8' )
7670 const latestSchema = await getRemoteRawContent ( schemaPath , graphqlVersion )
7771 const safeForPublicSchema = removeHiddenMembers ( schemaPath , latestSchema )
7872 updateFile ( schemaPath , safeForPublicSchema )
@@ -83,9 +77,10 @@ async function main () {
8377 // because the objects page is too big to render on page load
8478 prerenderedObjects [ graphqlVersion ] = await prerenderObjects ( schemaJsonPerVersion )
8579
80+ // 5. UPDATE CHANGELOG
8681 if ( allVersions [ version ] . nonEnterpriseDefault ) {
8782 // The Changelog is only build for free-pro-team@latest
88- const changelogEntry = createChangelogEntry (
83+ const changelogEntry = await createChangelogEntry (
8984 previousSchemaString ,
9085 safeForPublicSchema ,
9186 safeForPublicPreviews ,
0 commit comments