diff --git a/patches/express+4.18.2.patch b/patches/express+4.18.2.patch new file mode 100644 index 00000000000..b230614591d --- /dev/null +++ b/patches/express+4.18.2.patch @@ -0,0 +1,28 @@ +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.11.patch b/patches/node-fetch+2.6.11.patch new file mode 100644 index 00000000000..3322bbc40a7 --- /dev/null +++ b/patches/node-fetch+2.6.11.patch @@ -0,0 +1,48 @@ +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.8.1.patch b/patches/rxjs+7.8.1.patch new file mode 100644 index 00000000000..7777c27aa8a --- /dev/null +++ b/patches/rxjs+7.8.1.patch @@ -0,0 +1,25 @@ +diff --git a/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js b/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js +index 98a6e52..815dd25 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;