-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(a3p-integration): Improve log output (#10485)
## Description Extracted from #10165 and best reviewed by commit. * Include relevant variable details (e.g., block height). * Omit output that doesn't convey new information "done", "reading", etc.). * Provide a common logging prefix for subtasks, inlining functions where relevant. * Remove endo/init/legacy.js from z:acceptance ava config to eliminate noisy `Object <[Object: null prototype] {}>` output. * Introduce a `logRecord` helper to concisely log possibly-remotable-bearing records and/or record entries. ### Security Considerations n/a ### Scaling Considerations n/a ### Documentation Considerations n/a ### Testing Considerations n/a ### Upgrade Considerations n/a
- Loading branch information
Showing
36 changed files
with
5,423 additions
and
323 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 @@ | ||
agoric-sdk/ |
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
45 changes: 45 additions & 0 deletions
45
a3p-integration/proposals/n:upgrade-next/.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
...integration/proposals/n:upgrade-next/.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; } }); | ||
|
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import test from 'ava'; | ||
import '@endo/init/debug.js'; | ||
|
||
import { getVatDetails } from '@agoric/synthetic-chain'; | ||
|
||
|
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
"type": "module", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"@agoric/client-utils": "dev", | ||
"@agoric/synthetic-chain": "^0.3.0", | ||
"@endo/init": "^1.1.6", | ||
"@endo/marshal": "^1.6.1", | ||
|
@@ -30,6 +31,12 @@ | |
}, | ||
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
"eslint": "^8.57.0", | ||
"npm-run-all": "^4.1.5", | ||
"typescript": "^5.6.3" | ||
}, | ||
"resolutions": { | ||
"axios@npm:^1.6.0": "patch:axios@npm%3A1.7.7#~/.yarn/patches/axios-npm-1.7.7-cfbedc233d.patch", | ||
"protobufjs@npm:^6.8.8": "patch:protobufjs@npm%3A6.11.4#~/.yarn/patches/protobufjs-npm-6.11.4-af11968b80.patch" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
a3p-integration/proposals/n:upgrade-next/priceFeed-follower-auction.test.js
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
1 change: 1 addition & 0 deletions
1
a3p-integration/proposals/n:upgrade-next/priceFeedUpdate.test.js
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import test from 'ava'; | ||
import '@endo/init/debug.js'; | ||
|
||
import { | ||
agops, | ||
|
2 changes: 1 addition & 1 deletion
2
a3p-integration/proposals/n:upgrade-next/replaceElectorate.test.js
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
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
72 changes: 0 additions & 72 deletions
72
a3p-integration/proposals/n:upgrade-next/test-lib/sync-tools.js
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/usr/bin/env node | ||
|
||
import '@endo/init/debug.js'; | ||
import { | ||
registerOraclesForBrand, | ||
generateOracleMap, | ||
|
Oops, something went wrong.