-
Notifications
You must be signed in to change notification settings - Fork 202
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(cli): refactor to esm #417
Conversation
@@ -1,47 +0,0 @@ | |||
import { Arguments, CommandBuilder } from "yargs"; |
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.
@Kooshaba this is not used in sky strife anymore, is it?
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.
chatted on discord, seems like sky strife is actually still using this command, so we shouldn't remove it for now
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 looks good to me! Tested a couple commands locally and everything still works as expected. Good to go once main
was merged into v2
to avoid a conflict with the changes in createFaucetService
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.
unfortunately we actually do need sync-art
, see #417 (comment)
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.
(or maybe sync-art
could be a standalone script outside the mud cli)
Yeah this would be my preference, since |
@alvrs rebased; test some commands again just to make sure it still works.
It makes sense to put that script into sky strife repo. It's small, self-contained and very project-specific. Leaving sync-art removed for now, unless you disagree |
Yes, I think that makes sense, I'm all for merging v2 into main as soon as possible.
Agreed |
The gas-report cli is failing because the |
Right, missed that one |
Replaces #397
From my testing this is the best solution for table autogeneration, and should be neutral for current use-cases.
Latest main should be merged into v2 before this PR (
network
'screateFaucetService
is duplicated in both)There're no significant logic changes here, but I remove some seemingly deprecated commands to do less refactoring (deploy, diamond-abi, sync-art).
Added
reuseComponents
todeploy-contracts
since it was only indeploy
.I've started going from
no bundler
+ts-node-esm
+moduleResolution nodenext
(which doesn't work well yet) to eventuallytsup with some inlining
+node
+moduleResolution node
. The changes that make the 1st more extreme version work could be removed, but they are a strict improvement and could simplify things in the future.Notably:
.js
suffixes for filesservices
changestsc --moduleResolution nodenext
execLog
refactor was just me testing stuff, but it should be a strict improvement worth keeping@holic create-mud was working without
@latticexyz/utils
seemingly because it wascli
's dependency, even though cli didn't (and couldn't) use it. And since it's std-client's peerDep it's best to add it anyways.@authcall
importSuffix=.js
helps with future compatibility with es module resolution. (It'd be even better ifts-proto
andprotobufjs
would replacelong
withbigint
entirely protobufjs/protobuf.js#1557).