From fee4dbe952e557db8ca658dc08283ba6c7343af9 Mon Sep 17 00:00:00 2001 From: Sujith Date: Fri, 3 Mar 2023 15:11:24 +0530 Subject: [PATCH] fix: import correction and changeset Signed-off-by: Sujith --- .changeset/strange-terms-design.md | 44 ++++++++++++++++++++++ apps/reaction/src/checkNodeVersion.cjs | 2 +- apps/reaction/tests/util/setupJestTests.js | 3 -- 3 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 .changeset/strange-terms-design.md diff --git a/.changeset/strange-terms-design.md b/.changeset/strange-terms-design.md new file mode 100644 index 00000000000..b033bc64dab --- /dev/null +++ b/.changeset/strange-terms-design.md @@ -0,0 +1,44 @@ +--- +"@reactioncommerce/api-core": major +"@reactioncommerce/api-plugin-accounts": major +"@reactioncommerce/api-plugin-address-validation": major +"@reactioncommerce/api-plugin-address-validation-test": major +"@reactioncommerce/api-plugin-authentication": major +"@reactioncommerce/api-plugin-authorization-simple": major +"@reactioncommerce/api-plugin-carts": major +"@reactioncommerce/api-plugin-catalogs": major +"@reactioncommerce/api-plugin-discounts": major +"@reactioncommerce/api-plugin-discounts-codes": major +"@reactioncommerce/api-plugin-email": major +"@reactioncommerce/api-plugin-email-smtp": major +"@reactioncommerce/api-plugin-email-templates": major +"@reactioncommerce/api-plugin-files": major +"@reactioncommerce/api-plugin-i18n": major +"@reactioncommerce/api-plugin-inventory": major +"@reactioncommerce/api-plugin-inventory-simple": major +"@reactioncommerce/api-plugin-job-queue": major +"@reactioncommerce/api-plugin-navigation": major +"@reactioncommerce/api-plugin-notifications": major +"@reactioncommerce/api-plugin-orders": major +"@reactioncommerce/api-plugin-payments": major +"@reactioncommerce/api-plugin-payments-example": major +"@reactioncommerce/api-plugin-payments-stripe-sca": major +"@reactioncommerce/api-plugin-pricing-simple": major +"@reactioncommerce/api-plugin-products": major +"@reactioncommerce/api-plugin-sample-data": major +"@reactioncommerce/api-plugin-settings": major +"@reactioncommerce/api-plugin-shipments": major +"@reactioncommerce/api-plugin-shipments-flat-rate": major +"@reactioncommerce/api-plugin-shops": major +"@reactioncommerce/api-plugin-simple-schema": major +"@reactioncommerce/api-plugin-sitemap-generator": major +"@reactioncommerce/api-plugin-surcharges": major +"@reactioncommerce/api-plugin-system-information": major +"@reactioncommerce/api-plugin-tags": major +"@reactioncommerce/api-plugin-taxes": major +"@reactioncommerce/api-plugin-taxes-flat-rate": major +"@reactioncommerce/api-plugin-translations": major +"@reactioncommerce/api-utils": major +--- + +Node18 upgrade includes assert json diff --git a/apps/reaction/src/checkNodeVersion.cjs b/apps/reaction/src/checkNodeVersion.cjs index cfbbe7ae4d7..119e43314f7 100644 --- a/apps/reaction/src/checkNodeVersion.cjs +++ b/apps/reaction/src/checkNodeVersion.cjs @@ -4,8 +4,8 @@ // this check to work on older Node versions that // do not support ES modules. -const semver = require("semver"); import * as packageJson from "./package.json" assert { type: "json" }; +const semver = require("semver"); 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 b4d9fc55b7f..44003e30e50 100644 --- a/apps/reaction/tests/util/setupJestTests.js +++ b/apps/reaction/tests/util/setupJestTests.js @@ -1,7 +1,4 @@ /* eslint-disable no-undef */ -import { createRequire } from "module"; - -const require = createRequire(import.meta.url); import * as jestProcessEnv from "./jestProcessEnv.json" assert { type: "json" }; process.env = Object.assign(process.env, {