diff --git a/apps/reaction/src/checkNodeVersion.cjs b/apps/reaction/src/checkNodeVersion.cjs index b91bd5eb787..cfbbe7ae4d7 100644 --- a/apps/reaction/src/checkNodeVersion.cjs +++ b/apps/reaction/src/checkNodeVersion.cjs @@ -5,7 +5,7 @@ // do not support ES modules. const semver = require("semver"); -const packageJson = require("../package.json"); +import * as packageJson from "./package.json" assert { type: "json" }; const requiredNodeVersion = packageJson.engines.node; if (!semver.satisfies(process.version, requiredNodeVersion)) { diff --git a/apps/reaction/tests/util/setupJestTests.js b/apps/reaction/tests/util/setupJestTests.js index 6b9aeabb62e..b4d9fc55b7f 100644 --- a/apps/reaction/tests/util/setupJestTests.js +++ b/apps/reaction/tests/util/setupJestTests.js @@ -2,7 +2,7 @@ import { createRequire } from "module"; const require = createRequire(import.meta.url); -const jestProcessEnv = require("./jestProcessEnv.json"); +import * as jestProcessEnv from "./jestProcessEnv.json" assert { type: "json" }; process.env = Object.assign(process.env, { ...jestProcessEnv