-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |