forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove versions feature flag code (#15793)
* remove FEATURE_NEW_VERSIONS from feature-flags.json * remove process.env.FEATURE_NEW_VERSIONS from include files * remove process.env.FEATURE_NEW_VERSIONS from lib files * remove process.env.FEATURE_NEW_VERSIONS from middleware files * remove process.env.FEATURE_NEW_VERSIONS from script files * remove process.env.FEATURE_NEW_VERSIONS from test files * update test fixtures to use new versions as canonical fixtures
- Loading branch information
Showing
95 changed files
with
1,342 additions
and
3,974 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"FEATURE_TEST_TRUE": true, | ||
"FEATURE_TEST_FALSE": false, | ||
"FEATURE_NEW_VERSIONS": true | ||
"FEATURE_TEST_FALSE": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,45 @@ | ||
const enterpriseServerReleases = require('./enterprise-server-releases') | ||
|
||
if (!process.env.FEATURE_NEW_VERSIONS) { | ||
module.exports = ['dotcom'].concat(enterpriseServerReleases.supported) | ||
} | ||
|
||
if (process.env.FEATURE_NEW_VERSIONS) { | ||
// version = "plan"@"release" | ||
// example: enterprise-server@2.21 | ||
// where "enterprise-server" is the plan and "2.21" is the release | ||
const versionDelimiter = '@' | ||
const latestNonNumberedRelease = 'latest' | ||
|
||
const plans = [ | ||
{ | ||
plan: 'free-pro-team', | ||
planTitle: 'Free, Pro, and Team', | ||
releases: [latestNonNumberedRelease], | ||
latestRelease: latestNonNumberedRelease, | ||
nonEnterpriseDefault: true // permanent way to refer to this plan if the name changes | ||
}, | ||
{ | ||
plan: 'enterprise-server', | ||
planTitle: 'Enterprise Server', | ||
releases: enterpriseServerReleases.supported, | ||
latestRelease: enterpriseServerReleases.latest, | ||
hasNumberedReleases: true | ||
// version = "plan"@"release" | ||
// example: enterprise-server@2.21 | ||
// where "enterprise-server" is the plan and "2.21" is the release | ||
const versionDelimiter = '@' | ||
const latestNonNumberedRelease = 'latest' | ||
|
||
const plans = [ | ||
{ | ||
plan: 'free-pro-team', | ||
planTitle: 'Free, Pro, and Team', | ||
releases: [latestNonNumberedRelease], | ||
latestRelease: latestNonNumberedRelease, | ||
nonEnterpriseDefault: true // permanent way to refer to this plan if the name changes | ||
}, | ||
{ | ||
plan: 'enterprise-server', | ||
planTitle: 'Enterprise Server', | ||
releases: enterpriseServerReleases.supported, | ||
latestRelease: enterpriseServerReleases.latest, | ||
hasNumberedReleases: true | ||
} | ||
] | ||
|
||
const allVersions = {} | ||
|
||
// combine the plans and releases to get allVersions object | ||
// e.g. free-pro-team@latest, enterprise-server@2.21, enterprise-server@2.20, etc. | ||
plans.forEach(planObj => { | ||
planObj.releases.forEach(release => { | ||
const version = `${planObj.plan}${versionDelimiter}${release}` | ||
|
||
const versionObj = { | ||
version, | ||
versionTitle: planObj.hasNumberedReleases ? `${planObj.planTitle} ${release}` : planObj.planTitle, | ||
latestVersion: `${planObj.plan}${versionDelimiter}${planObj.latestRelease}`, | ||
currentRelease: release | ||
} | ||
] | ||
|
||
const allVersions = {} | ||
|
||
// combine the plans and releases to get allVersions object | ||
// e.g. free-pro-team@latest, enterprise-server@2.21, enterprise-server@2.20, etc. | ||
plans.forEach(planObj => { | ||
planObj.releases.forEach(release => { | ||
const version = `${planObj.plan}${versionDelimiter}${release}` | ||
|
||
const versionObj = { | ||
version, | ||
versionTitle: planObj.hasNumberedReleases ? `${planObj.planTitle} ${release}` : planObj.planTitle, | ||
latestVersion: `${planObj.plan}${versionDelimiter}${planObj.latestRelease}`, | ||
currentRelease: release | ||
} | ||
|
||
allVersions[version] = Object.assign(versionObj, planObj) | ||
}) | ||
allVersions[version] = Object.assign(versionObj, planObj) | ||
}) | ||
}) | ||
|
||
module.exports = allVersions | ||
} | ||
module.exports = allVersions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.