From c9012b45af6926f097c1f8e8ad3f327c6d1e5cb9 Mon Sep 17 00:00:00 2001 From: "Mark S. Miller" Date: Fri, 9 Jun 2023 14:00:29 -0700 Subject: [PATCH] update patches --- patches/bl++readable-stream+3.6.1.patch | 24 ------------- patches/express+4.18.1.patch | 28 --------------- patches/node-fetch+2.6.9.patch | 48 ------------------------- patches/rxjs+7.5.5.patch | 25 ------------- 4 files changed, 125 deletions(-) delete mode 100644 patches/bl++readable-stream+3.6.1.patch delete mode 100644 patches/express+4.18.1.patch delete mode 100644 patches/node-fetch+2.6.9.patch delete mode 100644 patches/rxjs+7.5.5.patch diff --git a/patches/bl++readable-stream+3.6.1.patch b/patches/bl++readable-stream+3.6.1.patch deleted file mode 100644 index 0eac150a0393..000000000000 --- a/patches/bl++readable-stream+3.6.1.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/node_modules/bl/node_modules/readable-stream/errors.js b/node_modules/bl/node_modules/readable-stream/errors.js -index 8471526..a4169da 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; diff --git a/patches/express+4.18.1.patch b/patches/express+4.18.1.patch deleted file mode 100644 index b230614591de..000000000000 --- a/patches/express+4.18.1.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/node_modules/express/lib/router/index.js b/node_modules/express/lib/router/index.js -index 5174c34..84076b7 100644 ---- a/node_modules/express/lib/router/index.js -+++ b/node_modules/express/lib/router/index.js -@@ -515,12 +515,17 @@ proto.route = function route(path) { - }; - - // create Router#VERB functions --methods.concat('all').forEach(function(method){ -- proto[method] = function(path){ -- var route = this.route(path) -- route[method].apply(route, slice.call(arguments, 1)); -- return this; -- }; -+methods.concat('all').forEach(function (method) { -+ Object.defineProperty(proto, method, { -+ value: function (path) { -+ var route = this.route(path) -+ route[method].apply(route, slice.call(arguments, 1)); -+ return this; -+ }, -+ writable: true, -+ enumerable: true, -+ configurable: true -+ }); - }); - - // append methods to a list of methods diff --git a/patches/node-fetch+2.6.9.patch b/patches/node-fetch+2.6.9.patch deleted file mode 100644 index 3322bbc40a79..000000000000 --- a/patches/node-fetch+2.6.9.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js -index 337d6e5..75b33d4 100644 ---- a/node_modules/node-fetch/lib/index.js -+++ b/node_modules/node-fetch/lib/index.js -@@ -1,3 +1,4 @@ -+// @ts-nocheck - 'use strict'; - - Object.defineProperty(exports, '__esModule', { value: true }); -@@ -154,9 +155,23 @@ function FetchError(message, type, systemError) { - Error.captureStackTrace(this, this.constructor); - } - --FetchError.prototype = Object.create(Error.prototype); --FetchError.prototype.constructor = FetchError; --FetchError.prototype.name = 'FetchError'; -+function makeErrorish(errorConstructor, name) { -+ errorConstructor.prototype = Object.create(Error.prototype, { -+ constructor: { -+ value: errorConstructor, -+ writable: true, -+ enumerable: true, -+ configurable: true -+ }, -+ name: { -+ value: name, -+ writable: true, -+ enumerable: true, -+ configurable: true -+ }, -+ }); -+} -+makeErrorish(FetchError, 'FetchError'); - - let convert; - try { -@@ -1400,10 +1415,7 @@ function AbortError(message) { - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); - } -- --AbortError.prototype = Object.create(Error.prototype); --AbortError.prototype.constructor = AbortError; --AbortError.prototype.name = 'AbortError'; -+makeErrorish(AbortError, 'AbortError'); - - const URL$1 = Url.URL || whatwgUrl.URL; - diff --git a/patches/rxjs+7.5.5.patch b/patches/rxjs+7.5.5.patch deleted file mode 100644 index 5e96e1fd8479..000000000000 --- a/patches/rxjs+7.5.5.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js b/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js -index 98a6e52..af7d91a 100644 ---- a/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js -+++ b/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;