From e5a8ee68650728ff8cef2e7b4629a735a5737f45 Mon Sep 17 00:00:00 2001 From: Carl-Erik Kopseng Date: Wed, 11 Sep 2024 07:19:59 +0200 Subject: [PATCH 1/2] Remove deprecated 'assert' import syntax in favor of 'with' fixes #35825 --- scripts/up-to-date-check.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/up-to-date-check.js b/scripts/up-to-date-check.js index 342fb1a14c7b632..a1928b8b0ed363e 100644 --- a/scripts/up-to-date-check.js +++ b/scripts/up-to-date-check.js @@ -1,5 +1,5 @@ -import yariPackageJson from "@mdn/yari/package.json" assert { type: "json" }; -import thisPackageJson from "../package.json" assert { type: "json" }; +import yariPackageJson from "@mdn/yari/package.json" with { type: "json" }; +import thisPackageJson from "../package.json" with { type: "json" }; const availableYariVersion = thisPackageJson.dependencies["@mdn/yari"]; const installedYariVersion = yariPackageJson.version; From 29398a2098eab5515366448d60c88510d5127a82 Mon Sep 17 00:00:00 2001 From: Carl-Erik Kopseng Date: Wed, 11 Sep 2024 07:24:49 +0200 Subject: [PATCH 2/2] Set minimum Node version in `.engines` field to 18.20.0 This is the minimum version that supports the new `import ... with` syntax. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 03cf12eb06ed34e..ed7b0407806ba4f 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "url": "git+https://github.com/mdn/content.git" }, "engines": { - "node": ">=18.18.0" + "node": ">=18.20.0" }, "type": "module", "scripts": {