Skip to content
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

[Themes] Remove Ruby from theme push command #4559

Merged
merged 4 commits into from
Oct 8, 2024
Merged

Conversation

jamesmengo
Copy link
Contributor

@jamesmengo jamesmengo commented Oct 1, 2024

WHY are these changes introduced?

Fixes https://github.com/Shopify/develop-advanced-edits/issues/352

WHAT is this pull request doing?

  • Removes
  • Removes Ruby invocation for the theme push command

How to test your changes?

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Contributor

github-actions bot commented Oct 1, 2024

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/app-inner-loop

@@ -135,7 +130,7 @@ export default class Push extends ThemeCommand {
async run(): Promise<void> {
const {flags} = await this.parse(Push)

if (flags.password || flags.legacy) {
if (flags.password) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

github-actions bot commented Oct 1, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.6% (-0.07% 🔻)
8520/11735
🟡 Branches
69.55% (-0.1% 🔻)
4177/6006
🟡 Functions
71.61% (-0.11% 🔻)
2205/3079
🟡 Lines
72.92% (-0.09% 🔻)
8062/11056
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / function-upload-url-generate.ts
100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / app.test-data.ts
91.4% (-0.45% 🔻)
91.09%
81.01% (-1.04% 🔻)
90.8% (-0.47% 🔻)
🟢
... / app.ts
87.07%
70.89% (-0.72% 🔻)
92% 88.37%
🟢
... / loader.ts
94.35% (-0.03% 🔻)
86.21% (+0.41% 🔼)
98% (-0.02% 🔻)
95.38% (-0.03% 🔻)
🟢
... / specification.ts
93.1% (-1.81% 🔻)
90.48%
87.5% (-0.5% 🔻)
92% (-2.12% 🔻)
🟢
... / function.ts
86.36% (-0.59% 🔻)
86.36% 83.33%
86.36% (-0.59% 🔻)
🟢
... / context.ts
91.7% (-0.03% 🔻)
87.28% 88.57%
92.65% (-0.03% 🔻)
🔴
... / dev.ts
9.65% (-10.35% 🔻)
1.56% (-13.36% 🔻)
15.79% (-8.6% 🔻)
9.52% (-11.35% 🔻)
🟡
... / local-storage.ts
69.44% (-1.61% 🔻)
57.14% (-5.36% 🔻)
72.73%
67.65% (-1.8% 🔻)
🟢
... / link.ts
96.51% (-0.08% 🔻)
91.94% (-0.25% 🔻)
100%
96.39% (-0.09% 🔻)
🟡
... / update-extension.ts
64.86% (-5.14% 🔻)
54.55% (-3.79% 🔻)
60%
68.75% (-5.54% 🔻)
🟡
... / build.ts
74.49%
59.09% (-2.27% 🔻)
75.76% 72.22%
🔴
... / app-management-client.ts
20.75% (-0.09% 🔻)
10.26%
22.58% (-0.25% 🔻)
19% (-0.09% 🔻)
🔴
... / partners-client.ts
26.87% (-0.2% 🔻)
40%
18.18% (-0.34% 🔻)
26.56% (-0.21% 🔻)

Test suite run success

1938 tests passing in 873 suites.

Report generated by 🧪jest coverage report action from f71afcb

@50bbx
Copy link

50bbx commented Oct 3, 2024

As I can see from the docs the ruby dependency is not required anymore but this changes are still in draft. Was that intended?

And it looks like ruby is actually still required (version 3.67.0): image

Is this true?

@jamesmengo
Copy link
Contributor Author

@50bbx You should be able to run the TS implementation now without the need to install Ruby (depending on the version)

Could you share which version you're on + which command you're running? The --legacy or password flag may be configured in your environment variables, which is causing it to default to Ruby.

@jamesmengo
Copy link
Contributor Author

/snapit

Copy link
Contributor

github-actions bot commented Oct 3, 2024

🫰✨ Thanks @jamesmengo! Your snapshot has been published to npm.

Test the snapshot by intalling your package globally:

pnpm i -g @shopify/cli@0.0.0-snapshot-20241003192523

After installing, validate the version by running just shopify in your terminal
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@jamesmengo
Copy link
Contributor Author

/snapit

Copy link
Contributor

github-actions bot commented Oct 3, 2024

🫰✨ Thanks @jamesmengo! Your snapshot has been published to npm.

Test the snapshot by intalling your package globally:

pnpm i -g @shopify/cli@0.0.0-snapshot-20241003212351

After installing, validate the version by running just shopify in your terminal
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@jamesmengo jamesmengo marked this pull request as ready for review October 4, 2024 20:59
Copy link
Contributor

github-actions bot commented Oct 4, 2024

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset.
If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

@jamesmengo jamesmengo marked this pull request as draft October 4, 2024 21:00
@@ -135,11 +121,6 @@ export default class Push extends ThemeCommand {
async run(): Promise<void> {
const {flags} = await this.parse(Push)

if (flags.password || flags.legacy) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamesmengo jamesmengo added the #gsd:40767 Fortify local development experience for Liquid themes label Oct 7, 2024
@jamesmengo jamesmengo self-assigned this Oct 7, 2024
@jamesmengo jamesmengo marked this pull request as ready for review October 7, 2024 21:14
Copy link
Contributor

@frandiox frandiox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#feelsgood

Copy link
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @jamesmengo! LGTM and works as expected! I believe we just need to remove the cli2Flags variable, and then we will be ready to merge :)

@jamesmengo jamesmengo added this pull request to the merge queue Oct 8, 2024
Merged via the queue into main with commit 95989ce Oct 8, 2024
36 checks passed
@jamesmengo jamesmengo deleted the jm/remove-ruby/push branch October 8, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#gsd:40767 Fortify local development experience for Liquid themes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants