diff --git a/docs/api/versions.js b/docs/api/versions.json similarity index 68% rename from docs/api/versions.js rename to docs/api/versions.json index 8b8e56d47f..4be4fed8fe 100644 --- a/docs/api/versions.js +++ b/docs/api/versions.json @@ -1,5 +1,6 @@ -export default [ +[ "1.19.0", "1.18.1", "1.18.0" ] + diff --git a/scripts/after-bump.js b/scripts/after-bump.js index 17a85f4891..23c58420eb 100644 --- a/scripts/after-bump.js +++ b/scripts/after-bump.js @@ -3,10 +3,14 @@ const path = require('path'); const { transformFile, version, jsonStringify, apiDocsDir } = require('./util'); function updateDocumentationMd() { - transformFile(path.resolve('DOCUMENTATION.md'), documentation => documentation.split('\n') - .map(line => line.startsWith('## Version:') ? `## Version: ${version}` : line) - .join('\n') - ) + transformFile(path.resolve('DOCUMENTATION.md'), documentation => + documentation + .split('\n') + .map(line => + line.startsWith('## Version:') ? `## Version: ${version}` : line + ) + .join('\n') + ); } function updateTypeDocConfig() { @@ -19,15 +23,12 @@ function updateTypeDocConfig() { } function updateDocsVersions() { - transformFile( - path.resolve('docs', '_data', 'versions.json'), - versionsJson => { - const versions = JSON.parse(versionsJson); - return versions.includes(version) - ? versionsJson - : jsonStringify([version, ...versions]); - } - ); + transformFile(path.resolve('docs', 'api', 'versions.json'), versionsJson => { + const versions = JSON.parse(versionsJson); + return versions.includes(version) + ? versionsJson + : jsonStringify([version, ...versions]); + }); } const nextChangelogTemplate = [ @@ -80,8 +81,6 @@ function updateChangelog() { ); } - - function afterBump() { updateDocumentationMd(); updateTypeDocConfig();