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 dev when resetting and creating a new app #5213

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

isaacroldan
Copy link
Contributor

@isaacroldan isaacroldan commented Jan 16, 2025

WHY are these changes introduced?

There is an issue when using --reset and linking to a new app. The CLI wasn't properly configuring this new app and if done during app dev, it was obtaining the apiSecret.

WHAT is this pull request doing?

Make sure that we properly build the AppCreationDefaultOptions object when linking to a new app during a --reset command.

Make sure that we fetch the api secret also on createApp mutations, not only on getApp queries.

How to test your changes?

  1. export USE_APP_MANAGEMENT_API=1
  2. shopify app init and create a new app (api client) in a Plus org and choose the Remix template
  3. shopify app dev and see the that app opens
  4. stop the server and run shopify app dev --reset and create a new app (api client)
  5. Verify that you don't see any vite error in the console and dev works
  6. Verify that your new toml has embedded = true

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

Checklist

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

Copy link
Contributor Author

isaacroldan commented Jan 16, 2025

@isaacroldan isaacroldan marked this pull request as ready for review January 16, 2025 12:09
@isaacroldan isaacroldan requested a review from a team as a code owner January 16, 2025 12:09
Copy link
Contributor

We detected some changes at packages/*/src 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.

Copy link
Contributor

github-actions bot commented Jan 16, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
75.18% (-0% 🔻)
8906/11846
🟡 Branches
70.3% (-0.01% 🔻)
4349/6186
🟡 Functions
75.06% (+0.01% 🔼)
2330/3104
🟡 Lines
75.73% (+0% 🔼)
8418/11116
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / link.ts
96.47% (-0.12% 🔻)
92.19% (-0.24% 🔻)
100%
96.34% (-0.13% 🔻)
🟢
... / app-event-watcher.ts
93.83% (-1.23% 🔻)
86.49% (-2.7% 🔻)
90.48% 98.61%

Test suite run success

2008 tests passing in 906 suites.

Report generated by 🧪jest coverage report action from 2fff7ea

Copy link
Contributor

@dmerand dmerand left a comment

Choose a reason for hiding this comment

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

Tophatted, LGTM!

Copy link
Contributor

@pt2pham pt2pham left a comment

Choose a reason for hiding this comment

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

Woohoo!

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