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

Fix running Javy and function-runner on Windows #4274

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

jeffcharles
Copy link
Contributor

Fixes bug on Windows where Javy and function-runner binaries are not executing because the file names do not end with .exe. Also adds installing and executing both binaries to the test suite.

WHY are these changes introduced?

Javy was not was not running on Windows because the executable did not end in .exe.

WHAT is this pull request doing?

Adds .exe to the Javy and function-runner binary names on Windows.

How to test your changes?

If you're on Windows, using cmd:

  1. Create a Shopify app containing at least one JS Function extension if you do not already have one.
  2. pnpm shopify app build --path <path_to_app> will perform the initial download of Javy.
  3. Verify there are no errors reported.
  4. pnpm shopify app build --path <path_to_app> will test that it uses the downloaded version of Javy.
  5. Verify there are no errors reported.
  6. echo {} | pnpm shopify app function run --path <path_to_js_function_extension> will test the initial download of function-runner.
  7. Verify there are no errors reported.
  8. echo {} | pnpm shopify app function run --path <path_to_js_function_extension> will it uses the downloaded version of function-runner.
  9. Verify there are no errors reported.

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 Aug 6, 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-management

Copy link
Contributor

github-actions bot commented Aug 6, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.62% (+0.11% 🔼)
7914/10898
🟡 Branches
69.38% (+0.05% 🔼)
3886/5601
🟡 Functions
71.33% (+0.03% 🔼)
2077/2912
🟡 Lines
72.95% (+0.12% 🔼)
7479/10252

Test suite run success

1807 tests passing in 822 suites.

Report generated by 🧪jest coverage report action from 8fa8542

@jeffcharles
Copy link
Contributor Author

/snapit

Copy link
Contributor

github-actions bot commented Aug 6, 2024

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

Test the snapshot by intalling your package globally:

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.

@jeffcharles jeffcharles marked this pull request as ready for review August 6, 2024 20:51

This comment has been minimized.

@jeffcharles
Copy link
Contributor Author

Should I be including a changeset entry for this change? I didn't on the original change because it should have been invisible to the end user.

@amcaplan
Copy link
Contributor

amcaplan commented Aug 7, 2024

@jeffcharles This definitely needs a patch-level changeset if we will be releasing the bugfix as a patch to the current minor version. Otherwise the release system won't be able to increment a version.

@jeffcharles jeffcharles added this pull request to the merge queue Aug 8, 2024
Merged via the queue into main with commit e253d4d Aug 8, 2024
@jeffcharles jeffcharles deleted the jc.add-exe-on-windows branch August 8, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants