Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: patch mistaken overrides #5569

Merged
merged 2 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions patches/bl++readable-stream+3.6.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/node_modules/bl/node_modules/readable-stream/errors.js b/node_modules/bl/node_modules/readable-stream/errors.js
index 8471526..c1c08cf 100644
--- a/node_modules/bl/node_modules/readable-stream/errors.js
+++ b/node_modules/bl/node_modules/readable-stream/errors.js
@@ -21,7 +21,18 @@ function createErrorType(code, message, Base) {
}
}

- NodeError.prototype.name = Base.name;
+ Object.defineProperties(NodeError.prototype, {
+ name: {
+ value: Base.name,
+ writable: true,
+ // enumerable: true would accurately preserve the behavior of the
+ // original assignment, but I'm guessing that was not intentional.
+ // For an actual error subclass, this property would not
+ // be enumerable.
+ enumerable: false,
+ configurable: true,
+ }
+ })
NodeError.prototype.code = code;

codes[code] = NodeError;
50 changes: 50 additions & 0 deletions patches/cosmjs-types++protobufjs+6.11.3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
diff --git a/node_modules/cosmjs-types/node_modules/protobufjs/src/util/minimal.js b/node_modules/cosmjs-types/node_modules/protobufjs/src/util/minimal.js
index 3c406de..fb88de4 100644
--- a/node_modules/cosmjs-types/node_modules/protobufjs/src/util/minimal.js
+++ b/node_modules/cosmjs-types/node_modules/protobufjs/src/util/minimal.js
@@ -280,13 +280,38 @@ function newError(name) {
merge(this, properties);
}

- (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
-
- Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } });
-
- CustomError.prototype.toString = function toString() {
- return this.name + ": " + this.message;
- };
+ CustomError.prototype = Object.create(Error.prototype, {
+ constructor: {
+ value: CustomError,
+ writable: true,
+ // enumerable: true would accurately preserve the behavior of the
+ // original assignment, but I'm guessing that was not intentional.
+ // For an actual error subclass, this property would not
+ // be enumerable.
+ enumerable: false,
+ configurable: true,
+ },
+ name: {
+ get() { return name; },
+ set: undefined,
+ enumerable: false,
+ // configurable: false would accurately preserve the behavior of
+ // the original, but I'm guessing that was not intentional.
+ // For an actual error subclass, this property would
+ // be configurable.
+ configurable: true,
+ },
+ toString: {
+ value() { return this.name + ": " + this.message; },
+ writable: true,
+ // enumerable: true would accurately preserve the behavior of the
+ // original assignment, but I'm guessing that was not intentional.
+ // For an actual error subclass, this property would not
+ // be enumerable.
+ enumerable: false,
+ configurable: true,
+ },
+ });

return CustomError;
}
25 changes: 25 additions & 0 deletions patches/inquirer++rxjs+7.5.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/node_modules/inquirer/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js b/node_modules/inquirer/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js
index 98a6e52..af7d91a 100644
--- a/node_modules/inquirer/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js
+++ b/node_modules/inquirer/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js
@@ -7,8 +7,18 @@ function createErrorClass(createImpl) {
instance.stack = new Error().stack;
};
var ctorFunc = createImpl(_super);
- ctorFunc.prototype = Object.create(Error.prototype);
- ctorFunc.prototype.constructor = ctorFunc;
+ ctorFunc.prototype = Object.create(Error.prototype, {
+ constructor: {
+ value: ctorFunc,
+ writable: true,
+ // enumerable: true would accurately preserve the behavior of the
+ // original assignment, but I'm guessing that was not intentional.
+ // For an actual error subclass, this property would not
+ // be enumerable.
+ enumerable: false,
+ configurable: true,
+ }
+ });
return ctorFunc;
}
exports.createErrorClass = createErrorClass;