3232 process . exit ( 1 )
3333}
3434
35- // TODO this step is only required as long as we support GHE versions *OLDER THAN* 2.21
36- // as soon as 2.20 is deprecated on 2021-02-11, we can remove all graphql-ruby filtering
37- const removeHiddenMembersScript = path . join ( __dirname , './utils/remove-hidden-schema-members.rb' )
38-
3935const versionsToBuild = Object . keys ( allVersions )
4036
4137const currentLanguage = 'en'
@@ -81,9 +77,8 @@ async function main () {
8177 const schemaPath = getDataFilepath ( 'schemas' , graphqlVersion )
8278 const previousSchemaString = fs . readFileSync ( schemaPath , 'utf8' )
8379 const latestSchema = await getRemoteRawContent ( schemaPath , graphqlVersion )
84- const safeForPublicSchema = removeHiddenMembers ( schemaPath , latestSchema )
85- updateFile ( schemaPath , safeForPublicSchema )
86- const schemaJsonPerVersion = await processSchemas ( safeForPublicSchema , safeForPublicPreviews )
80+ updateFile ( schemaPath , latestSchema )
81+ const schemaJsonPerVersion = await processSchemas ( latestSchema , safeForPublicPreviews )
8782 updateStaticFile ( schemaJsonPerVersion , path . join ( graphqlStaticDir , `schema-${ graphqlVersion } .json` ) )
8883
8984 // Add some version specific data to the context
@@ -103,7 +98,7 @@ async function main () {
10398 // The Changelog is only build for free-pro-team@latest
10499 const changelogEntry = await createChangelogEntry (
105100 previousSchemaString ,
106- safeForPublicSchema ,
101+ latestSchema ,
107102 safeForPublicPreviews ,
108103 previousUpcomingChanges . upcoming_changes ,
109104 yaml . load ( safeForPublicChanges ) . upcoming_changes
@@ -196,14 +191,3 @@ function updateStaticFile (json, filepath) {
196191 const jsonString = JSON . stringify ( json , null , 2 )
197192 updateFile ( filepath , jsonString )
198193}
199-
200- // run Ruby script to remove featureFlagged directives and other hidden members
201- function removeHiddenMembers ( schemaPath , latestSchema ) {
202- // have to write a temp file because the schema is too big to store in memory
203- const tempSchemaFilePath = `${ schemaPath } -TEMP`
204- fs . writeFileSync ( tempSchemaFilePath , latestSchema )
205- const remoteClean = execSync ( `${ removeHiddenMembersScript } ${ tempSchemaFilePath } ` ) . toString ( )
206- fs . unlinkSync ( tempSchemaFilePath )
207-
208- return remoteClean
209- }
0 commit comments