From 1e25cfdf833bd35249449bcaed3cb99cd3f3de58 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Tue, 23 Jul 2024 18:04:02 +0200 Subject: [PATCH] refactor: rename superblocks.ts to curriculum (#55624) --- client/i18n/locales.test.ts | 2 +- client/src/assets/icons/superblock-icon.tsx | 2 +- client/src/components/Map/index.tsx | 2 +- client/src/components/growth-book/gitpod-note.tsx | 2 +- client/src/components/profile/components/time-line.tsx | 2 +- client/src/components/seo/index.tsx | 2 +- client/src/redux/prop-types.ts | 2 +- client/src/templates/Challenges/codeally/show.tsx | 2 +- client/src/templates/Challenges/components/side-panel.tsx | 2 +- .../src/templates/Introduction/components/block.test.tsx | 2 +- client/src/templates/Introduction/components/block.tsx | 2 +- .../templates/Introduction/components/cert-challenge.tsx | 2 +- .../src/templates/Introduction/components/challenges.tsx | 2 +- .../templates/Introduction/components/help-translate.tsx | 2 +- .../templates/Introduction/components/legacy-links.tsx | 2 +- .../Introduction/components/super-block-intro.tsx | 2 +- client/src/templates/Introduction/super-block-intro.tsx | 2 +- client/src/utils/curriculum-layout.ts | 2 +- client/src/utils/is-a-cert.ts | 2 +- client/src/utils/superblock-map-titles.ts | 2 +- curriculum/utils.js | 2 +- curriculum/utils.test.ts | 8 ++++---- e2e/landing.spec.ts | 4 ++-- e2e/map.spec.ts | 5 +---- e2e/projects.spec.ts | 2 +- e2e/seo.spec.ts | 2 +- shared/config/certification-settings.ts | 2 +- shared/config/{superblocks.test.ts => curriculum.test.ts} | 2 +- shared/config/{superblocks.ts => curriculum.ts} | 4 +++- shared/utils/is-audited.ts | 2 +- tools/challenge-auditor/index.ts | 2 +- tools/challenge-helper-scripts/commands.ts | 2 +- tools/challenge-helper-scripts/create-project.ts | 2 +- tools/challenge-helper-scripts/fs-utils.test.ts | 2 +- tools/challenge-helper-scripts/fs-utils.ts | 2 +- tools/scripts/build/build-external-curricula-data.test.ts | 2 +- tools/scripts/build/build-external-curricula-data.ts | 2 +- 37 files changed, 43 insertions(+), 44 deletions(-) rename shared/config/{superblocks.test.ts => curriculum.test.ts} (99%) rename shared/config/{superblocks.ts => curriculum.ts} (98%) diff --git a/client/i18n/locales.test.ts b/client/i18n/locales.test.ts index 6af5a87d443..289b0ca554b 100644 --- a/client/i18n/locales.test.ts +++ b/client/i18n/locales.test.ts @@ -1,7 +1,7 @@ import fs from 'fs'; import { setup } from 'jest-json-schema-extended'; import { availableLangs, LangNames, LangCodes } from '../../shared/config/i18n'; -import { SuperBlocks } from '../../shared/config/superblocks'; +import { SuperBlocks } from '../../shared/config/curriculum'; import intro from './locales/english/intro.json'; setup(); diff --git a/client/src/assets/icons/superblock-icon.tsx b/client/src/assets/icons/superblock-icon.tsx index f3eb5cef62f..70de5550a72 100644 --- a/client/src/assets/icons/superblock-icon.tsx +++ b/client/src/assets/icons/superblock-icon.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { SuperBlocks } from '../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../shared/config/curriculum'; import APIIcon from './api'; import D3Icon from './d3'; import DatabaseIcon from './database'; diff --git a/client/src/components/Map/index.tsx b/client/src/components/Map/index.tsx index b99213ac40e..0dbe5faec2d 100644 --- a/client/src/components/Map/index.tsx +++ b/client/src/components/Map/index.tsx @@ -7,7 +7,7 @@ import { SuperBlockStages, SuperBlocks, superBlockOrder -} from '../../../../shared/config/superblocks'; +} from '../../../../shared/config/curriculum'; import { SuperBlockIcon } from '../../assets/icons/superblock-icon'; import LinkButton from '../../assets/icons/link-button'; import { Spacer, ButtonLink } from '../helpers'; diff --git a/client/src/components/growth-book/gitpod-note.tsx b/client/src/components/growth-book/gitpod-note.tsx index aac2be1909c..d40a11f3f88 100644 --- a/client/src/components/growth-book/gitpod-note.tsx +++ b/client/src/components/growth-book/gitpod-note.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Alert } from '@freecodecamp/ui'; import { useFeatureValue } from '@growthbook/growthbook-react'; -import { SuperBlocks } from '../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../shared/config/curriculum'; import { Link } from '../helpers'; type GitpodNoteProps = { diff --git a/client/src/components/profile/components/time-line.tsx b/client/src/components/profile/components/time-line.tsx index 45c6d3459f2..6d814565d5e 100644 --- a/client/src/components/profile/components/time-line.tsx +++ b/client/src/components/profile/components/time-line.tsx @@ -18,7 +18,7 @@ import ExamResultsModal from '../../SolutionViewer/exam-results-modal'; import { openModal } from '../../../templates/Challenges/redux/actions'; import { Link, FullWidthRow, Spacer } from '../../helpers'; import { SolutionDisplayWidget } from '../../solution-display-widget'; -import { SuperBlocks } from '../../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../../shared/config/curriculum'; import TimelinePagination from './timeline-pagination'; const SolutionViewer = Loadable( diff --git a/client/src/components/seo/index.tsx b/client/src/components/seo/index.tsx index d3821db8499..c70c5852b3a 100644 --- a/client/src/components/seo/index.tsx +++ b/client/src/components/seo/index.tsx @@ -2,7 +2,7 @@ import { useStaticQuery, graphql } from 'gatsby'; import React from 'react'; import Helmet from 'react-helmet'; import { useTranslation } from 'react-i18next'; -import { SuperBlocks } from '../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../shared/config/curriculum'; interface SEOProps { title?: string; diff --git a/client/src/redux/prop-types.ts b/client/src/redux/prop-types.ts index d7b3a256247..c965096e151 100644 --- a/client/src/redux/prop-types.ts +++ b/client/src/redux/prop-types.ts @@ -1,5 +1,5 @@ import { HandlerProps } from 'react-reflex'; -import { SuperBlocks } from '../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../shared/config/curriculum'; import { Themes } from '../components/settings/theme'; import { type CertTitle } from '../../config/cert-and-project-map'; diff --git a/client/src/templates/Challenges/codeally/show.tsx b/client/src/templates/Challenges/codeally/show.tsx index 6e1c541a0ca..3845a207ad4 100644 --- a/client/src/templates/Challenges/codeally/show.tsx +++ b/client/src/templates/Challenges/codeally/show.tsx @@ -45,7 +45,7 @@ import { import ProjectToolPanel from '../projects/tool-panel'; import SolutionForm from '../projects/solution-form'; import { FlashMessages } from '../../../components/Flash/redux/flash-messages'; -import { SuperBlocks } from '../../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../../shared/config/curriculum'; import { CodeAllyDown } from '../../../components/growth-book/codeally-down'; import { postUserToken } from '../../../utils/ajax'; diff --git a/client/src/templates/Challenges/components/side-panel.tsx b/client/src/templates/Challenges/components/side-panel.tsx index 197edd318b3..cff57cdc13a 100644 --- a/client/src/templates/Challenges/components/side-panel.tsx +++ b/client/src/templates/Challenges/components/side-panel.tsx @@ -3,7 +3,7 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { Test } from '../../../redux/prop-types'; -import { SuperBlocks } from '../../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../../shared/config/curriculum'; import { initializeMathJax } from '../../../utils/math-jax'; import { challengeTestsSelector } from '../redux/selectors'; import TestSuite from './test-suite'; diff --git a/client/src/templates/Introduction/components/block.test.tsx b/client/src/templates/Introduction/components/block.test.tsx index b2ccf3f1615..99b18d5521d 100644 --- a/client/src/templates/Introduction/components/block.test.tsx +++ b/client/src/templates/Introduction/components/block.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import { Provider } from 'react-redux'; -import { SuperBlocks } from '../../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../../shared/config/curriculum'; import { createStore } from '../../../redux/create-store'; import { ChallengeFiles, diff --git a/client/src/templates/Introduction/components/block.tsx b/client/src/templates/Introduction/components/block.tsx index 894eaac4a94..271675379b1 100644 --- a/client/src/templates/Introduction/components/block.tsx +++ b/client/src/templates/Introduction/components/block.tsx @@ -6,7 +6,7 @@ import ScrollableAnchor from 'react-scrollable-anchor'; import { bindActionCreators, Dispatch } from 'redux'; import { createSelector } from 'reselect'; -import { SuperBlocks } from '../../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../../shared/config/curriculum'; import envData from '../../../../config/env.json'; import { isAuditedSuperBlock } from '../../../../../shared/utils/is-audited'; import Caret from '../../../assets/icons/caret'; diff --git a/client/src/templates/Introduction/components/cert-challenge.tsx b/client/src/templates/Introduction/components/cert-challenge.tsx index bceaaa67c7f..fe555b9b03e 100644 --- a/client/src/templates/Introduction/components/cert-challenge.tsx +++ b/client/src/templates/Introduction/components/cert-challenge.tsx @@ -8,7 +8,7 @@ import { certSlugTypeMap, superBlockCertTypeMap } from '../../../../../shared/config/certification-settings'; -import { SuperBlocks } from '../../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../../shared/config/curriculum'; import { isSignedInSelector, diff --git a/client/src/templates/Introduction/components/challenges.tsx b/client/src/templates/Introduction/components/challenges.tsx index d0e9f6a16f9..59e6ad339b9 100644 --- a/client/src/templates/Introduction/components/challenges.tsx +++ b/client/src/templates/Introduction/components/challenges.tsx @@ -5,7 +5,7 @@ import { withTranslation, useTranslation } from 'react-i18next'; import GreenNotCompleted from '../../../assets/icons/green-not-completed'; import GreenPass from '../../../assets/icons/green-pass'; import { ChallengeWithCompletedNode } from '../../../redux/prop-types'; -import { SuperBlocks } from '../../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../../shared/config/curriculum'; import { challengeTypes } from '../../../../../shared/config/challenge-types'; import { ButtonLink } from '../../../components/helpers/button-link'; diff --git a/client/src/templates/Introduction/components/help-translate.tsx b/client/src/templates/Introduction/components/help-translate.tsx index 530eca55f9e..a3cf59939ed 100644 --- a/client/src/templates/Introduction/components/help-translate.tsx +++ b/client/src/templates/Introduction/components/help-translate.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { SuperBlocks } from '../../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../../shared/config/curriculum'; import { isAuditedSuperBlock } from '../../../../../shared/utils/is-audited'; import { Link, Spacer } from '../../../components/helpers'; diff --git a/client/src/templates/Introduction/components/legacy-links.tsx b/client/src/templates/Introduction/components/legacy-links.tsx index 8284bf1bcd2..cc2833a75a3 100644 --- a/client/src/templates/Introduction/components/legacy-links.tsx +++ b/client/src/templates/Introduction/components/legacy-links.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Alert } from '@freecodecamp/ui'; -import { SuperBlocks } from '../../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../../shared/config/curriculum'; import { isOldRespCert, isRelationalDbCert, diff --git a/client/src/templates/Introduction/components/super-block-intro.tsx b/client/src/templates/Introduction/components/super-block-intro.tsx index 8402443e82b..47f7afbc41c 100644 --- a/client/src/templates/Introduction/components/super-block-intro.tsx +++ b/client/src/templates/Introduction/components/super-block-intro.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Alert } from '@freecodecamp/ui'; -import { SuperBlocks } from '../../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../../shared/config/curriculum'; import { SuperBlockIcon } from '../../../assets/icons/superblock-icon'; import { Spacer, Link } from '../../../components/helpers'; diff --git a/client/src/templates/Introduction/super-block-intro.tsx b/client/src/templates/Introduction/super-block-intro.tsx index d18c926363a..97c7ade85c9 100644 --- a/client/src/templates/Introduction/super-block-intro.tsx +++ b/client/src/templates/Introduction/super-block-intro.tsx @@ -10,7 +10,7 @@ import { bindActionCreators, Dispatch } from 'redux'; import { createSelector } from 'reselect'; import { Container, Col, Row } from '@freecodecamp/ui'; -import { SuperBlocks } from '../../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../../shared/config/curriculum'; import { getSuperBlockTitleForMap } from '../../utils/superblock-map-titles'; import DonateModal from '../../components/Donation/donation-modal'; import Login from '../../components/Header/components/login'; diff --git a/client/src/utils/curriculum-layout.ts b/client/src/utils/curriculum-layout.ts index c6e626dd050..fb6ff615cb1 100644 --- a/client/src/utils/curriculum-layout.ts +++ b/client/src/utils/curriculum-layout.ts @@ -1,5 +1,5 @@ import { challengeTypes } from '../../../shared/config/challenge-types'; -import { SuperBlocks } from '../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../shared/config/curriculum'; // Show a grid layout on the superblock level diff --git a/client/src/utils/is-a-cert.ts b/client/src/utils/is-a-cert.ts index 2c4c626a2ff..21db7cf73ab 100644 --- a/client/src/utils/is-a-cert.ts +++ b/client/src/utils/is-a-cert.ts @@ -1,4 +1,4 @@ -import { SuperBlocks } from '../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../shared/config/curriculum'; export function isOldRespCert(superBlock: string): boolean { return superBlock === String(SuperBlocks.RespWebDesign); diff --git a/client/src/utils/superblock-map-titles.ts b/client/src/utils/superblock-map-titles.ts index 242168b6cdb..717501f807b 100644 --- a/client/src/utils/superblock-map-titles.ts +++ b/client/src/utils/superblock-map-titles.ts @@ -1,5 +1,5 @@ import i18next from 'i18next'; -import { SuperBlocks } from '../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../shared/config/curriculum'; // these are keys from i18n translations.json files enum SuperBlockI18nKeys { diff --git a/curriculum/utils.js b/curriculum/utils.js index 7ebadab3914..1d3dface88d 100644 --- a/curriculum/utils.js +++ b/curriculum/utils.js @@ -2,7 +2,7 @@ const path = require('path'); const { createFlatSuperBlockMap, SuperBlocks -} = require('../shared/config/superblocks'); +} = require('../shared/config/curriculum'); require('dotenv').config({ path: path.resolve(__dirname, '../.env') }); diff --git a/curriculum/utils.test.ts b/curriculum/utils.test.ts index 6a2e122b8b4..44f55110bdc 100644 --- a/curriculum/utils.test.ts +++ b/curriculum/utils.test.ts @@ -4,7 +4,7 @@ import fs from 'fs'; import path from 'path'; import { config } from 'dotenv'; -import { SuperBlocks } from '../shared/config/superblocks'; +import { SuperBlocks } from '../shared/config/curriculum'; import { createSuperOrder, getSuperOrder, getSuperBlockFromDir } from './utils'; config({ path: path.resolve(__dirname, '../.env') }); @@ -70,12 +70,12 @@ describe('createSuperOrder', () => { }); describe('getSuperOrder', () => { - it('returns a number for valid superblocks', () => { + it('returns a number for valid curriculum', () => { expect.assertions(1); expect(typeof getSuperOrder('responsive-web-design')).toBe('number'); }); - it('throws for unknown superblocks', () => { + it('throws for unknown curriculum', () => { expect.assertions(4); expect(() => getSuperOrder()).toThrow(); expect(() => getSuperOrder(null)).toThrow(); @@ -88,7 +88,7 @@ describe('getSuperOrder', () => { expect(() => getSuperOrder('certifications')).toThrow(); }); - it.skip('returns unique numbers for all current superblocks', () => { + it.skip('returns unique numbers for all current curriculum', () => { if ( process.env.SHOW_NEW_CURRICULUM !== 'true' && process.env.SHOW_UPCOMING_CHANGES !== 'true' diff --git a/e2e/landing.spec.ts b/e2e/landing.spec.ts index 37a306653d3..9b265d99dc5 100644 --- a/e2e/landing.spec.ts +++ b/e2e/landing.spec.ts @@ -1,7 +1,7 @@ import { expect, test, type Page } from '@playwright/test'; import intro from '../client/i18n/locales/english/intro.json'; import translations from '../client/i18n/locales/english/translations.json'; -import { SuperBlocks } from '../shared/config/superblocks'; +import { SuperBlocks } from '../shared/config/curriculum'; const landingPageElements = { heading: 'landing-header', @@ -150,7 +150,7 @@ test('Testimonial endorser people have images, occupation, location and testimon } }); -test('Has links to all superblocks', async () => { +test('Has links to all curriculum', async () => { const curriculumBtns = page.getByTestId(landingPageElements.curriculumBtns); await expect(curriculumBtns).toHaveCount(21); for (let index = 0; index < superBlocks.length; index++) { diff --git a/e2e/map.spec.ts b/e2e/map.spec.ts index 8ddad7fa6c7..339f5abad77 100644 --- a/e2e/map.spec.ts +++ b/e2e/map.spec.ts @@ -2,10 +2,7 @@ import { test, expect } from '@playwright/test'; import translations from '../client/i18n/locales/english/translations.json'; import intro from '../client/i18n/locales/english/intro.json'; -import { - SuperBlockStages, - superBlockOrder -} from '../shared/config/superblocks'; +import { SuperBlockStages, superBlockOrder } from '../shared/config/curriculum'; test.beforeEach(async ({ page }) => { await page.goto('/learn'); diff --git a/e2e/projects.spec.ts b/e2e/projects.spec.ts index 8f10ec1aa0f..d7a6c6f245c 100644 --- a/e2e/projects.spec.ts +++ b/e2e/projects.spec.ts @@ -1,6 +1,6 @@ import { execSync } from 'child_process'; import { test, expect, Page } from '@playwright/test'; -import { SuperBlocks } from '../shared/config/superblocks'; +import { SuperBlocks } from '../shared/config/curriculum'; import tributePageHtml from './fixtures/tribute-page-html.json'; import tributePageCss from './fixtures/tribute-page-css.json'; import curriculum from './fixtures/js-ads-projects.json'; diff --git a/e2e/seo.spec.ts b/e2e/seo.spec.ts index d968b896393..ddc13fe4e35 100644 --- a/e2e/seo.spec.ts +++ b/e2e/seo.spec.ts @@ -1,5 +1,5 @@ import { test, expect } from '@playwright/test'; -import { SuperBlocks } from '../shared/config/superblocks'; +import { SuperBlocks } from '../shared/config/curriculum'; import type { ListItem } from '../client/src/components/seo/'; import metaTags from '../client/i18n/locales/english/meta-tags.json'; diff --git a/shared/config/certification-settings.ts b/shared/config/certification-settings.ts index 7a1b5f34367..9cdffe4a626 100644 --- a/shared/config/certification-settings.ts +++ b/shared/config/certification-settings.ts @@ -1,4 +1,4 @@ -import { SuperBlocks } from '../../shared/config/superblocks'; +import { SuperBlocks } from '../../shared/config/curriculum'; /** * Certifications are not equivalent to superblocks. Each superblock corresponds diff --git a/shared/config/superblocks.test.ts b/shared/config/curriculum.test.ts similarity index 99% rename from shared/config/superblocks.test.ts rename to shared/config/curriculum.test.ts index 6dad54f00c7..c059c6fece6 100644 --- a/shared/config/superblocks.test.ts +++ b/shared/config/curriculum.test.ts @@ -7,7 +7,7 @@ import { createSuperBlockMap, createFlatSuperBlockMap, getAuditedSuperBlocks -} from './superblocks'; +} from './curriculum'; describe('superBlockOrder', () => { it('should contain all SuperBlocks', () => { diff --git a/shared/config/superblocks.ts b/shared/config/curriculum.ts similarity index 98% rename from shared/config/superblocks.ts rename to shared/config/curriculum.ts index 4a68dfaf80e..00785150ca0 100644 --- a/shared/config/superblocks.ts +++ b/shared/config/curriculum.ts @@ -1,4 +1,6 @@ -import { Languages } from '../config/i18n'; +// TODO: eventually this should all flow from the curriculum service, since it +// defines the top-level structure of the curriculum. +import { Languages } from './i18n'; // all superblocks export enum SuperBlocks { diff --git a/shared/utils/is-audited.ts b/shared/utils/is-audited.ts index ddd3fb7f718..d31e7cebadd 100644 --- a/shared/utils/is-audited.ts +++ b/shared/utils/is-audited.ts @@ -1,7 +1,7 @@ import { type SuperBlocks, getAuditedSuperBlocks -} from '../../shared/config/superblocks'; +} from '../../shared/config/curriculum'; export function isAuditedSuperBlock( language: string, diff --git a/tools/challenge-auditor/index.ts b/tools/challenge-auditor/index.ts index bf92775493a..c12f6de0202 100644 --- a/tools/challenge-auditor/index.ts +++ b/tools/challenge-auditor/index.ts @@ -12,7 +12,7 @@ import { getChallengesForLang } from '../../curriculum/get-challenges'; import { SuperBlocks, getAuditedSuperBlocks -} from '../../shared/config/superblocks'; +} from '../../shared/config/curriculum'; // TODO: re-organise the types to a common 'types' folder that can be shared // between the workspaces so we don't have to declare ChallengeNode here and in diff --git a/tools/challenge-helper-scripts/commands.ts b/tools/challenge-helper-scripts/commands.ts index 8e7b9ccf540..d5244ff1b78 100644 --- a/tools/challenge-helper-scripts/commands.ts +++ b/tools/challenge-helper-scripts/commands.ts @@ -1,5 +1,5 @@ import fs from 'fs'; -import { SuperBlocks } from '../../shared/config/superblocks'; +import { SuperBlocks } from '../../shared/config/curriculum'; import { challengeTypes } from '../../shared/config/challenge-types'; import { getProjectPath } from './helpers/get-project-info'; import { getMetaData, updateMetaData } from './helpers/project-metadata'; diff --git a/tools/challenge-helper-scripts/create-project.ts b/tools/challenge-helper-scripts/create-project.ts index f0fb390126f..c1edd1c4517 100644 --- a/tools/challenge-helper-scripts/create-project.ts +++ b/tools/challenge-helper-scripts/create-project.ts @@ -5,7 +5,7 @@ import { prompt } from 'inquirer'; import { format } from 'prettier'; import ObjectID from 'bson-objectid'; -import { SuperBlocks } from '../../shared/config/superblocks'; +import { SuperBlocks } from '../../shared/config/curriculum'; import { createStepFile, validateBlockName } from './utils'; import { getSuperBlockSubPath } from './fs-utils'; import { Meta } from './helpers/project-metadata'; diff --git a/tools/challenge-helper-scripts/fs-utils.test.ts b/tools/challenge-helper-scripts/fs-utils.test.ts index 178af2761ee..d1dd2f8a759 100644 --- a/tools/challenge-helper-scripts/fs-utils.test.ts +++ b/tools/challenge-helper-scripts/fs-utils.test.ts @@ -1,6 +1,6 @@ import fs from 'fs/promises'; import path from 'path'; -import { SuperBlocks } from '../../shared/config/superblocks'; +import { SuperBlocks } from '../../shared/config/curriculum'; import { getSuperBlockSubPath } from './fs-utils'; describe('getSuperBlockSubPath', () => { diff --git a/tools/challenge-helper-scripts/fs-utils.ts b/tools/challenge-helper-scripts/fs-utils.ts index f8011d17765..b1b3e099bbd 100644 --- a/tools/challenge-helper-scripts/fs-utils.ts +++ b/tools/challenge-helper-scripts/fs-utils.ts @@ -1,4 +1,4 @@ -import { SuperBlocks } from '../../shared/config/superblocks'; +import { SuperBlocks } from '../../shared/config/curriculum'; export function getSuperBlockSubPath(superBlock: SuperBlocks): string { const pathMap = { diff --git a/tools/scripts/build/build-external-curricula-data.test.ts b/tools/scripts/build/build-external-curricula-data.test.ts index 99de21ab227..4e3efea44b0 100644 --- a/tools/scripts/build/build-external-curricula-data.test.ts +++ b/tools/scripts/build/build-external-curricula-data.test.ts @@ -4,7 +4,7 @@ import fs from 'fs'; import readdirp from 'readdirp'; // TODO: remove chai and use jest's assertion errors import { AssertionError } from 'chai'; -import { SuperBlocks } from '../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../shared/config/curriculum'; import { superblockSchemaValidator, availableSuperBlocksValidator diff --git a/tools/scripts/build/build-external-curricula-data.ts b/tools/scripts/build/build-external-curricula-data.ts index 3bbe53f0195..0c7e171bd60 100644 --- a/tools/scripts/build/build-external-curricula-data.ts +++ b/tools/scripts/build/build-external-curricula-data.ts @@ -2,7 +2,7 @@ import { mkdirSync, writeFileSync, readFileSync } from 'fs'; import { resolve, dirname } from 'path'; import { submitTypes } from '../../../shared/config/challenge-types'; import { type ChallengeNode } from '../../../client/src/redux/prop-types'; -import { SuperBlocks } from '../../../shared/config/superblocks'; +import { SuperBlocks } from '../../../shared/config/curriculum'; type Intro = { [keyValue in SuperBlocks]: IntroProps }; export type Curriculum = {