*patch b4a

This commit is contained in:
Derrick Hammer 2023-04-09 00:47:56 -04:00
parent 17bb912927
commit 1dedb7b240
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 38 additions and 1 deletions

View File

@ -108,7 +108,8 @@
"protomux": "git+https://git.lumeweb.com/LumeWeb/kernel-protomux-client.git" "protomux": "git+https://git.lumeweb.com/LumeWeb/kernel-protomux-client.git"
}, },
"patchedDependencies": { "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"
} }
} }
} }

36
patches/b4a@1.6.3.patch Normal file
View File

@ -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"
},