-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: patch vega fix fixme, patch d3, others
- Loading branch information
Showing
6 changed files
with
185 additions
and
8 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
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,18 @@ | ||
diff --git a/node_modules/d3-color/dist/d3-color.js b/node_modules/d3-color/dist/d3-color.js | ||
index ba46026..5742b8c 100644 | ||
--- a/node_modules/d3-color/dist/d3-color.js | ||
+++ b/node_modules/d3-color/dist/d3-color.js | ||
@@ -7,7 +7,12 @@ typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
|
||
function define(constructor, factory, prototype) { | ||
constructor.prototype = factory.prototype = prototype; | ||
- prototype.constructor = constructor; | ||
+ Object.defineProperty(prototype, 'constructor', { | ||
+ value: constructor, | ||
+ writable: true, | ||
+ enumerable: true, | ||
+ configurable: true | ||
+ }); | ||
} | ||
|
||
function extend(parent, definition) { |
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 69e6d38..085e61e 100644 | ||
--- a/node_modules/express/lib/router/index.js | ||
+++ b/node_modules/express/lib/router/index.js | ||
@@ -504,12 +504,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,40 @@ | ||
diff --git a/node_modules/external-editor/main/errors/CreateFileError.js b/node_modules/external-editor/main/errors/CreateFileError.js | ||
index 7faa34c..7b49f68 100644 | ||
--- a/node_modules/external-editor/main/errors/CreateFileError.js | ||
+++ b/node_modules/external-editor/main/errors/CreateFileError.js | ||
@@ -14,7 +14,14 @@ var __extends = (this && this.__extends) || (function () { | ||
}; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
- function __() { this.constructor = d; } | ||
+ function __() { | ||
+ Object.defineProperty(this, 'constructor', { | ||
+ value: d, | ||
+ writable: true, | ||
+ enumerable: true, | ||
+ configurable: true | ||
+ }); | ||
+ } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
diff --git a/node_modules/external-editor/main/errors/LaunchEditorError.js b/node_modules/external-editor/main/errors/LaunchEditorError.js | ||
index 85a164e..217f192 100644 | ||
--- a/node_modules/external-editor/main/errors/LaunchEditorError.js | ||
+++ b/node_modules/external-editor/main/errors/LaunchEditorError.js | ||
@@ -14,7 +14,14 @@ var __extends = (this && this.__extends) || (function () { | ||
}; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
- function __() { this.constructor = d; } | ||
+ function __() { | ||
+ Object.defineProperty(this, 'constructor', { | ||
+ value: d, | ||
+ writable: true, | ||
+ enumerable: true, | ||
+ configurable: true | ||
+ }); | ||
+ } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); |
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,43 @@ | ||
diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js | ||
index 4b241bf..c5f1165 100644 | ||
--- a/node_modules/node-fetch/lib/index.js | ||
+++ b/node_modules/node-fetch/lib/index.js | ||
@@ -153,9 +153,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 { | ||
@@ -1378,10 +1392,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'); | ||
|
||
// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 | ||
const PassThrough$1 = Stream.PassThrough; |
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,56 @@ | ||
diff --git a/node_modules/vega-util/build/vega-util.js b/node_modules/vega-util/build/vega-util.js | ||
index 0b40c91..bd0a2e4 100644 | ||
--- a/node_modules/vega-util/build/vega-util.js | ||
+++ b/node_modules/vega-util/build/vega-util.js | ||
@@ -611,7 +611,12 @@ | ||
|
||
function inherits (child, parent, members) { | ||
const proto = child.prototype = Object.create(parent.prototype); | ||
- proto.constructor = child; | ||
+ Object.defineProperty(proto, 'constructor', { | ||
+ value: child, | ||
+ writable: true, | ||
+ enumerable: true, | ||
+ configurable: true | ||
+ }); | ||
return extend(proto, members); | ||
} | ||
|
||
@@ -859,7 +864,6 @@ | ||
exports.fastmap = fastmap; | ||
exports.field = field; | ||
exports.flush = flush; | ||
- exports.hasOwnProperty = has; | ||
exports.id = id; | ||
exports.identity = identity; | ||
exports.inherits = inherits; | ||
@@ -895,7 +899,6 @@ | ||
exports.toDate = toDate; | ||
exports.toNumber = toNumber; | ||
exports.toSet = toSet; | ||
- exports.toString = toString; | ||
exports.truncate = truncate; | ||
exports.truthy = truthy; | ||
exports.utcquarter = utcquarter; | ||
@@ -907,6 +910,21 @@ | ||
exports.zoomPow = zoomPow; | ||
exports.zoomSymlog = zoomSymlog; | ||
|
||
+ Object.defineProperties(exports, { | ||
+ hasOwnProperty: { | ||
+ value: has, | ||
+ writable: true, | ||
+ enumerable: true, | ||
+ configurable: true | ||
+ }, | ||
+ toString: { | ||
+ value: toString, | ||
+ writable: true, | ||
+ enumerable: true, | ||
+ configurable: true | ||
+ } | ||
+ }); | ||
+ | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}))); |