From e42a864e1228ece91c06f77d7d721fafb647eee5 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Wed, 22 Oct 2025 15:07:59 +0200 Subject: [PATCH] fix: direct import from curriculum (#62931) --- .../gatsby-source-challenges/gatsby-node.js | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/tools/client-plugins/gatsby-source-challenges/gatsby-node.js b/tools/client-plugins/gatsby-source-challenges/gatsby-node.js index cccf3c1b87e..99658762a57 100644 --- a/tools/client-plugins/gatsby-source-challenges/gatsby-node.js +++ b/tools/client-plugins/gatsby-source-challenges/gatsby-node.js @@ -1,6 +1,8 @@ -const path = require('path'); const chokidar = require('chokidar'); const { getSuperblockStructure } = require('../../../curriculum/file-handler'); +const { + superBlockToFilename +} = require('../../../curriculum/build-curriculum'); const { createChallengeNode } = require('./create-challenge-nodes'); @@ -91,21 +93,6 @@ exports.sourceNodes = function sourceChallengesSourceNodes( } function createSuperBlockStructureNodes() { - const buildCurriculumPath = path.resolve( - curriculumPath, - '..', - '..', - 'build-curriculum' - ); - const buildCurriculum = require(buildCurriculumPath); - const superBlockToFilename = buildCurriculum.superBlockToFilename; - - if (!superBlockToFilename) { - reporter.panic( - 'superBlockToFilename is missing from build-curriculum. This map is required.' - ); - } - Object.keys(superBlockToFilename).forEach(superBlock => { const filename = superBlockToFilename[superBlock] || superBlock; try {