aboutsummaryrefslogtreecommitdiffstats
path: root/0007-Build-Don-t-use-import-assertions.patch
diff options
context:
space:
mode:
Diffstat (limited to '0007-Build-Don-t-use-import-assertions.patch')
-rw-r--r--0007-Build-Don-t-use-import-assertions.patch30
1 files changed, 0 insertions, 30 deletions
diff --git a/0007-Build-Don-t-use-import-assertions.patch b/0007-Build-Don-t-use-import-assertions.patch
deleted file mode 100644
index 6e43e48..0000000
--- a/0007-Build-Don-t-use-import-assertions.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 88417678f3b38b3f2af056f2a34f9c6eb99d591f Mon Sep 17 00:00:00 2001
-From: 1024x2 <2pow11@gmail.com>
-Date: Fri, 26 Apr 2024 13:56:19 +0100
-Subject: [PATCH 7/7] Build: Don't use import assertions
-
-Node.js 22 removed the "assert" syntax because we obviously can't keep
-things working for more than 5 minutes.
-We can just call readFileSync instead, which works on all currently
-supported Node.js versions.
----
- scripts/build/common.mjs | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/scripts/build/common.mjs b/scripts/build/common.mjs
-index 5c34ad0..ff9b854 100644
---- a/scripts/build/common.mjs
-+++ b/scripts/build/common.mjs
-@@ -25,8 +25,7 @@ import { access, readdir, readFile } from "fs/promises";
- import { join, relative } from "path";
- import { promisify } from "util";
-
--// wtf is this assert syntax
--import PackageJSON from "../../package.json" assert { type: "json" };
-+const PackageJSON = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf-8"));
- import { getPluginTarget } from "../utils.mjs";
-
- export const VERSION = PackageJSON.version;
---
-2.44.0
-