-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! feat: add agoric-upgrade-18 (proposal 83)
add patches
- Loading branch information
1 parent
6454613
commit 8cb322e
Showing
2 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
proposals/83:upgrade-18/.yarn/patches/axios-npm-1.7.7-cfbedc233d.patch
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,45 @@ | ||
diff --git a/dist/node/axios.cjs b/dist/node/axios.cjs | ||
index db4997bee1aa48aca215c6b2e7443292c94c086f..fb39f7e0046c66b1c0275c1a82ed49d3cc7cff83 100644 | ||
--- a/dist/node/axios.cjs | ||
+++ b/dist/node/axios.cjs | ||
@@ -371,9 +371,18 @@ function merge(/* obj1, obj2, obj3, ... */) { | ||
const extend = (a, b, thisArg, {allOwnKeys}= {}) => { | ||
forEach(b, (val, key) => { | ||
if (thisArg && isFunction(val)) { | ||
- a[key] = bind(val, thisArg); | ||
- } else { | ||
+ val = bind(val, thisArg); | ||
+ } | ||
+ const oldDesc = Object.getOwnPropertyDescriptor(a, key); | ||
+ if (oldDesc) { | ||
a[key] = val; | ||
+ } else { | ||
+ Object.defineProperty(a, key, { | ||
+ value: val, | ||
+ writable: true, | ||
+ enumerable: true, | ||
+ configurable: true | ||
+ }); | ||
} | ||
}, {allOwnKeys}); | ||
return a; | ||
@@ -404,7 +413,9 @@ const stripBOM = (content) => { | ||
*/ | ||
const inherits = (constructor, superConstructor, props, descriptors) => { | ||
constructor.prototype = Object.create(superConstructor.prototype, descriptors); | ||
- constructor.prototype.constructor = constructor; | ||
+ Object.defineProperty(constructor.prototype, 'constructor', { | ||
+ value: constructor | ||
+ }); | ||
Object.defineProperty(constructor, 'super', { | ||
value: superConstructor.prototype | ||
}); | ||
@@ -566,7 +577,7 @@ const isRegExp = kindOfTest('RegExp'); | ||
|
||
const reduceDescriptors = (obj, reducer) => { | ||
const descriptors = Object.getOwnPropertyDescriptors(obj); | ||
- const reducedDescriptors = {}; | ||
+ const reducedDescriptors = Object.create(null); | ||
|
||
forEach(descriptors, (descriptor, name) => { | ||
let ret; |
36 changes: 36 additions & 0 deletions
36
proposals/83:upgrade-18/.yarn/patches/protobufjs-npm-6.11.4-af11968b80.patch
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,36 @@ | ||
diff --git a/src/util/minimal.js b/src/util/minimal.js | ||
index 3c406dee753b5c6fb29dda2e64d4482e754e7873..564e5dadaa50e4ad05fc18b767ee276c99e9f0f9 100644 | ||
--- a/src/util/minimal.js | ||
+++ b/src/util/minimal.js | ||
@@ -280,7 +280,30 @@ function newError(name) { | ||
merge(this, properties); | ||
} | ||
|
||
- (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError; | ||
+ CustomError.prototype = Object.create(Error.prototype, { | ||
+ constructor: { | ||
+ value: CustomError, | ||
+ writable: true, | ||
+ 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: false, | ||
+ configurable: true, | ||
+ }, | ||
+ }); | ||
|
||
Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } }); | ||
|