diff --git a/package.json b/package.json index 58026d0..fcd6e9b 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,8 @@ }, "pnpm": { "patchedDependencies": { - "@ctrl/irc@2.1.0": "patches/@ctrl__irc@2.1.0.patch" + "@ctrl/irc@2.1.0": "patches/@ctrl__irc@2.1.0.patch", + "b4a@1.6.1": "patches/b4a@1.6.1.patch" } } } diff --git a/patches/b4a@1.6.1.patch b/patches/b4a@1.6.1.patch new file mode 100644 index 0000000..13e4b09 --- /dev/null +++ b/patches/b4a@1.6.1.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 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e43dcf5..f5d3bdb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,9 @@ patchedDependencies: '@ctrl/irc@2.1.0': hash: jf4eywzpsmufg67tj3fpgxwdgi path: patches/@ctrl__irc@2.1.0.patch + b4a@1.6.1: + hash: fr4ta77ibyz2skijgsggfq2lxa + path: patches/b4a@1.6.1.patch specifiers: '@ctrl/irc': 2.1.0 @@ -361,9 +364,10 @@ packages: - debug dev: true - /b4a/1.6.1: + /b4a/1.6.1_fr4ta77ibyz2skijgsggfq2lxa: resolution: {integrity: sha512-AsKjNhz72yxteo/0EtQEiwkMUgk/tGmycXlbG4g3Ard2/ULtNLUykGOkeK0egmN27h0xMAhb76jYccW+XTBExA==} dev: false + patched: true /base32-decode/1.0.0: resolution: {integrity: sha512-KNWUX/R7wKenwE/G/qFMzGScOgVntOmbE27vvc6GrniDGYb6a5+qWcuoXl8WIOQL7q0TpK7nZDm1Y04Yi3Yn5g==} @@ -1066,7 +1070,7 @@ packages: '@lumeweb/peer-discovery': git.lumeweb.com/LumeWeb/peer-discovery/d2bd926275103d60fdd3c7c432eae5c278f49261 '@noble/ed25519': 1.7.1 '@noble/hashes': 1.1.5 - b4a: 1.6.1 + b4a: 1.6.1_fr4ta77ibyz2skijgsggfq2lxa json-stringify-deterministic: 1.0.8 transitivePeerDependencies: - supports-color @@ -1077,5 +1081,5 @@ packages: name: '@lumeweb/peer-discovery' version: 0.1.0 dependencies: - b4a: 1.6.1 + b4a: 1.6.1_fr4ta77ibyz2skijgsggfq2lxa dev: false