From 1dedb7b2405527232df764b01f6cc9d106989771 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 9 Apr 2023 00:47:56 -0400 Subject: [PATCH] *patch b4a --- package.json | 3 ++- patches/b4a@1.6.3.patch | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 patches/b4a@1.6.3.patch diff --git a/package.json b/package.json index 325583f..6346f8e 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,8 @@ "protomux": "git+https://git.lumeweb.com/LumeWeb/kernel-protomux-client.git" }, "patchedDependencies": { - "@libp2p/tcp@6.1.5": "patches/@libp2p__tcp@6.1.5.patch" + "@libp2p/tcp@6.1.5": "patches/@libp2p__tcp@6.1.5.patch", + "b4a@1.6.3": "patches/b4a@1.6.3.patch" } } } diff --git a/patches/b4a@1.6.3.patch b/patches/b4a@1.6.3.patch new file mode 100644 index 0000000..13e4b09 --- /dev/null +++ b/patches/b4a@1.6.3.patch @@ -0,0 +1,36 @@ +diff --git a/browser.js b/browser.js +index e07f78d17b7b4a2963e4f0062047cc96e6025f9e..a9f266a2644f3f8ebd0f6684b3e11a7519059851 100644 +--- a/browser.js ++++ b/browser.js +@@ -3,6 +3,7 @@ const base64 = require('./lib/base64') + const hex = require('./lib/hex') + const utf8 = require('./lib/utf8') + const utf16le = require('./lib/utf16le') ++const Buffer = require('buffer').Buffer + + const LE = new Uint8Array(Uint16Array.of(0xff).buffer)[0] === 0xff + +diff --git a/index.js b/index.js +index a751d6b4d27c7dd903efbfdc87a98f61044a62b8..8bd32640afdcfbc475168d458c51f8b9162d1656 100644 +--- a/index.js ++++ b/index.js +@@ -1,3 +1,5 @@ ++const Buffer = require('buffer').Buffer ++ + function isBuffer (value) { + return Buffer.isBuffer(value) || value instanceof Uint8Array + } +diff --git a/package.json b/package.json +index eb0f792709b27e66f26658054781b4099507b5ed..69c4ff39c48b0bdd5f0bc7ebbade517e7c5d76e4 100644 +--- a/package.json ++++ b/package.json +@@ -8,9 +8,6 @@ + "index.js", + "lib" + ], +- "browser": { +- "./index.js": "./browser.js" +- }, + "scripts": { + "test": "standard && brittle test/*.mjs" + }, \ No newline at end of file