-
Notifications
You must be signed in to change notification settings - Fork 30
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 command runner #708
base: main
Are you sure you want to change the base?
Conversation
412a06c
to
18d4a09
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.
Thanks!
@@ -0,0 +1,5 @@ | |||
--- |
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.
Curious if you need a changeset for a functionality neutral refactor
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.
I think changesets with [internal]
get removed. But you are correct we don't need it here.
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.
+1 we can prob do without a changeset for internal changes
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.
No. You do need a changeset because if vscode-extension depends on this and it doesn't get a bump, then you'll have in-prod-only errors. We should always have a changeset for changes to exports. Even if only used internally.
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.
It's less relevant for vscode-extension, but I want to make this clear:
Think of this situation:
theme-check
is version1.0.0
theme-language-server
is version2.0.0
theme-check
has a new export but doesn't get a changesettheme-language-server
uses that export, creates a changeset- next time we publish
- theme-check-common stays at
1.0.0
. 1.0.0 does NOT have the new export! - theme-language-server becomes
2.1.0
, depends on1.0.0
- theme-check-common stays at
- Works fine locally because you use code from the folder
- Folks that download theme-language-server from npm get
2.1.0
and1.0.0
- 1.0.0 doesn't have the export
- Uh oh! Breaks in prod.
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.
Thanks for the info @charlespwd!
const executables = stdout | ||
.replace(/\r/g, '') | ||
.split('\n') | ||
.filter((exe) => exe.endsWith('bat')); |
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.
For my own learning: When do we encounter a bat
? How did you you test this on windows / know what cases to cover?
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.
.bat
is the .sh
of Windows. Most scripts are shipped as .bat
on windows and IIRC the where.exe
thing will give you a couple of results and you usually want the .bat
one.
const shopifyCliPathPromise = getShopifyCliPath(); | ||
|
||
async function getShopifyCliPath() { | ||
if (isWin) { |
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.
Is this worth testing?
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.
I see that this is just an extraction - left some non-blocking questions
TIL win32
applies to 64bit as well
What are you adding in this PR?
Follows up comment by @madmath #597 (comment)
Refactor our
metafields pull
command into a proper CLI command runnerBefore you deploy
changeset