-
-
Notifications
You must be signed in to change notification settings - Fork 337
Open
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected] for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/sax/lib/sax.js b/node_modules/sax/lib/sax.js
index 122ad8e..ec41c06 100644
--- a/node_modules/sax/lib/sax.js
+++ b/node_modules/sax/lib/sax.js
@@ -237,7 +237,11 @@
typeof Buffer.isBuffer === 'function' &&
Buffer.isBuffer(data)) {
if (!this._decoder) {
- var SD = require('string_decoder').StringDecoder
+ var SD = class {
+ constructor() { this.decoder = new TextDecoder("utf-8"); }
+ write(buffer) { return this.decoder.decode(buffer, { stream: true }); }
+ end(buffer) { return this.decoder.decode(buffer); }
+ };
this._decoder = new SD('utf8')
}
data = this._decoder.write(data)This issue body was partially generated by patch-package.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels