mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor: remove SHOW_NEW_CURRICULUM (#57977)
This commit is contained in:
committed by
GitHub
parent
09a5415d03
commit
232f6d50aa
@@ -49,8 +49,7 @@ if (FREECODECAMP_NODE_ENV !== 'development') {
|
||||
'curriculumLocale',
|
||||
'deploymentEnv',
|
||||
'environment',
|
||||
'showUpcomingChanges',
|
||||
'showNewCurriculum'
|
||||
'showUpcomingChanges'
|
||||
];
|
||||
const searchKeys = ['algoliaAppId', 'algoliaAPIKey'];
|
||||
const donationKeys = ['stripePublicKey', 'paypalClientId', 'patreonClientId'];
|
||||
@@ -114,14 +113,9 @@ if (FREECODECAMP_NODE_ENV !== 'development') {
|
||||
checkCurriculumLocale();
|
||||
if (fs.existsSync(`${configPath}/env.json`)) {
|
||||
/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-unsafe-assignment */
|
||||
const { showNewCurriculum, showUpcomingChanges } = require(
|
||||
`${configPath}/env.json`
|
||||
);
|
||||
const { showUpcomingChanges } = require(`${configPath}/env.json`);
|
||||
/* eslint-enable @typescript-eslint/no-var-requires, @typescript-eslint/no-unsafe-assignment */
|
||||
if (
|
||||
env['showUpcomingChanges'] !== showUpcomingChanges ||
|
||||
env['showNewCurriculum'] !== showNewCurriculum
|
||||
) {
|
||||
if (env['showUpcomingChanges'] !== showUpcomingChanges) {
|
||||
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
||||
console.log('Feature flags have been changed, cleaning client cache.');
|
||||
const child = spawn('pnpm', ['run', '-w', 'clean:client']);
|
||||
|
||||
@@ -32,7 +32,6 @@ const {
|
||||
PATREON_CLIENT_ID: patreonClientId,
|
||||
DEPLOYMENT_ENV: deploymentEnv,
|
||||
SHOW_UPCOMING_CHANGES: showUpcomingChanges,
|
||||
SHOW_NEW_CURRICULUM: showNewCurriculum,
|
||||
GROWTHBOOK_URI: growthbookUri
|
||||
} = process.env;
|
||||
|
||||
@@ -72,7 +71,6 @@ export default Object.assign(locations, {
|
||||
? null
|
||||
: patreonClientId,
|
||||
showUpcomingChanges: showUpcomingChanges === 'true',
|
||||
showNewCurriculum: showNewCurriculum === 'true',
|
||||
growthbookUri:
|
||||
!growthbookUri || growthbookUri === 'api_URI_from_Growthbook_dashboard'
|
||||
? null
|
||||
|
||||
Reference in New Issue
Block a user