From 003a1772abd3d79de13ed348d2841553751ac31b Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Wed, 21 Dec 2022 16:04:29 -0500 Subject: [PATCH] Fix broken import path in test262-preprocessor Previously we weren't ever clearing the `dist` directory so there were likely some vestigial files left over from previous builds that might have confused the import path. This commit fixes the import path and also deletes the `dist` directory on every build to ensure a clean slate. --- compiler/forget/package.json | 3 ++- compiler/forget/scripts/test262-preprocessor.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/forget/package.json b/compiler/forget/package.json index 468530560c..bec0552525 100644 --- a/compiler/forget/package.json +++ b/compiler/forget/package.json @@ -8,7 +8,7 @@ "src" ], "scripts": { - "build": "tsc && scripts/hash-dist.sh", + "build": "rimraf dist && tsc && scripts/hash-dist.sh", "bundle:meta": "scripts/bundle-meta.sh", "dev": "concurrently --kill-others \"tsc --watch\" \"yarn:playground\"", "playground": "cd packages/playground && yarn && yarn dev", @@ -59,6 +59,7 @@ "jest-environment-jsdom": "^29.0.3", "react": "^18.2.0", "react-dom": "^18.2.0", + "rimraf": "^3.0.2", "test262-harness": "^8.0.0", "ts-jest": "^29.0.1", "ts-node": "^10.9.1", diff --git a/compiler/forget/scripts/test262-preprocessor.js b/compiler/forget/scripts/test262-preprocessor.js index 3d367bb02f..1967756233 100644 --- a/compiler/forget/scripts/test262-preprocessor.js +++ b/compiler/forget/scripts/test262-preprocessor.js @@ -1,4 +1,4 @@ -const BabelPluginReactForget = require("../dist/BabelPlugin").default; +const BabelPluginReactForget = require("../dist/Babel/BabelPlugin").default; const transformSync = require("@babel/core").transformSync; // Preprocessor that runs Forget on the test262 test prior to execution. Compilation errors short