From 6f930f56b835b1444d7ae6d2aa69acb03460ac35 Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Mon, 14 Aug 2023 22:43:12 +0100 Subject: [PATCH] chore(tests): Add ".loader" infix to shim filenames. Per suggestion on PR #7380, have buildShims name the shims ${chunk.name}.loader.mjs instead of just `${chunk.name}.mjs`. --- scripts/gulpfiles/build_tasks.js | 5 +++-- tests/multi_playground.html | 4 ++-- tests/playground.html | 14 +++++++------- tests/playgrounds/advanced_playground.html | 4 ++-- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/scripts/gulpfiles/build_tasks.js b/scripts/gulpfiles/build_tasks.js index cd80b132e..ed81e7cc1 100644 --- a/scripts/gulpfiles/build_tasks.js +++ b/scripts/gulpfiles/build_tasks.js @@ -677,7 +677,8 @@ function buildCompiled() { /** * This task builds the shims used by the playgrounds and tests to * load Blockly in either compressed or uncompressed mode, creating - * build/blockly.mjs, blocks.mjs, javascript.mjs, etc. + * build/blockly.loader.mjs, blocks.loader.mjs, javascript.loader.mjs, + * etc. * * Prerequisite: getChunkOptions (via buildCompiled, for chunks[].parent). */ @@ -702,7 +703,7 @@ async function buildShims() { const modulePath = posixPath(chunk.moduleEntry ?? chunk.entry); const scriptPath = path.posix.join(RELEASE_DIR, `${chunk.name}${COMPILED_SUFFIX}.js`); - const shimPath = path.join(BUILD_DIR, `${chunk.name}.mjs`); + const shimPath = path.join(BUILD_DIR, `${chunk.name}.loader.mjs`); const parentImport = chunk.parent ? `import ${quote(`./${chunk.parent.name}.mjs`)};` : ''; const exports = await import(`../../${modulePath}`); diff --git a/tests/multi_playground.html b/tests/multi_playground.html index e225be23a..f929de8d8 100644 --- a/tests/multi_playground.html +++ b/tests/multi_playground.html @@ -7,8 +7,8 @@