-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(treasury): Convert RESM to NESM #3645
Conversation
50a07e0
to
b1f825f
Compare
I think @Chris-Hibbert is better suited for this review. |
|
||
async function writeSourceBundle(contractFilename, outputPath) { | ||
const path = require.resolve(contractFilename); | ||
const path = new URL(await importMetaResolve(contractFilename, import.meta.url)).pathname; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint should be asking for a line break here. If it doesn't insist, we should break anyway for consistency.
Also there's a non-top-level await embedded here.
@@ -28,7 +34,7 @@ const makeInstall = async (root, zoe) => { | |||
|
|||
test('bootstrap payment', async t => { | |||
const zoe = makeZoe(fakeVatAdmin); | |||
const autoswapInstall = await makeInstall(autoswapRoot, zoe); | |||
const autoswapInstall = await makeInstall(await autoswapRoot, zoe); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a non-top-level await. Is that going to be allowed? Can we put the await inside makeInstall()
instead?
packages/treasury/test/test-vault.js
Outdated
@@ -46,7 +46,8 @@ trace('makeZoe'); | |||
* @param {string} sourceRoot | |||
*/ | |||
async function launch(zoeP, sourceRoot) { | |||
const contractBundle = await bundleSource(require.resolve(sourceRoot)); | |||
const contractPath = new URL(await importMetaResolve(sourceRoot, import.meta.url)).pathname; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await is not top-level here.
7d12ddb
to
c457a83
Compare
55c4115
to
e0409c5
Compare
2fc9441
to
ceba76f
Compare
61589dc
to
416ef36
Compare
416ef36
to
87d915e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
87d915e
to
fe4b988
Compare
fe4b988
to
bfa7fb3
Compare
4d764f9
to
bd992a6
Compare
Refs #527