Skip to content

Commit 84153b4

Browse files
committed
Add a description to CHANGES_TO_REPORT
1 parent 15dbbee commit 84153b4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

script/graphql/build-changelog.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const fs = require('fs')
1212
function prependDatedEntry (changelogEntry, targetPath) {
1313
// Build a `yyyy-mm-dd`-formatted date string
1414
// and tag the changelog entry with it
15-
const today = new Date().toISOString().slice(0, 10)
15+
const todayString = new Date().toISOString().slice(0, 10)
1616
changelogEntry.date = todayString
1717

1818
const previousChangelogString = fs.readFileSync(targetPath)
@@ -200,6 +200,11 @@ function segmentPreviewChanges (changesToReport, previews) {
200200
return { schemaChangesToReport: schemaChanges, previewChangesToReport: changesByPreview }
201201
}
202202

203+
// We only want to report changes to schema structure.
204+
// Deprecations are covered by "upcoming changes."
205+
// By listing the changes explicitly here, we can make sure that,
206+
// if the library changes, we don't miss publishing anything that we mean to.
207+
// This was originally ported from https://github.com/github/graphql-docs/blob/7e6a5ccbf13cc7d875fee65527b25bc49e886b41/lib/graphql_docs/update_internal_developer/change_log.rb#L35-L103
203208
const CHANGES_TO_REPORT = [
204209
ChangeType.FieldArgumentDefaultChanged,
205210
ChangeType.FieldArgumentTypeChanged,

0 commit comments

Comments
 (0)