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

Save dev_store_url under ./shopify #5000

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

Conversation

isaacroldan
Copy link
Contributor

@isaacroldan isaacroldan commented Nov 29, 2024

WHY are these changes introduced?

Moves the dev store URL from the app configuration file to a hidden configuration file to prevent the store URL from being tracked in git. This ensures developers can use different development stores without impacting other team members.

WHAT is this pull request doing?

  • Introduces a new hidden configuration file .shopify/project.json to store CLI-specific values
  • Stores the dev_store_url both in shopify.app.toml and in the hidden configuration.
  • Updates the store selection logic to read/write from the hidden configuration as a fallback if not present in the toml.
  • Maintains backward compatibility by checking both locations for the store URL
  • If the store was never stored in the toml, it will use the hidden config by default.

How to test your changes?

  1. Run shopify app dev and select a development store
  2. Verify the store URL is saved in .shopify/project.json
  3. Verify the store URL is NOT removed from shopify.app.toml if present
    3a. Verify the store URL is NOT added to shopify.app.toml if not present previously.
  4. Run shopify app dev again to confirm the stored development store is used
  5. Use --store flag to verify store selection still works as expected

Measuring impact

  • 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 Nov 29, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@isaacroldan isaacroldan changed the title Store dev_store_url in a hidden folder Save dev_store_url under ./shopify Nov 29, 2024
@isaacroldan isaacroldan force-pushed the 11-29-store_dev_store_url_in_a_hidden_folder branch 2 times, most recently from 57cf415 to b3fbe75 Compare November 29, 2024 15:52
@isaacroldan isaacroldan force-pushed the 11-29-store_dev_store_url_in_a_hidden_folder branch from b3fbe75 to 1f50940 Compare December 10, 2024 15:47
Copy link
Contributor

github-actions bot commented Dec 10, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
75.23% (+0.04% 🔼)
8928/11868
🟡 Branches
70.33% (+0.01% 🔼)
4361/6201
🟡 Functions
75.09% (+0.03% 🔼)
2333/3107
🟡 Lines
75.78% (+0.05% 🔼)
8441/11139
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / store-context.ts
100%
78.57% (-21.43% 🔻)
100% 100%
🟢
... / app-event-watcher.ts
93.83% (-1.23% 🔻)
86.49% (-2.7% 🔻)
90.48% 98.61%

Test suite run success

2010 tests passing in 906 suites.

Report generated by 🧪jest coverage report action from 44312b5

@isaacroldan isaacroldan force-pushed the 11-29-store_dev_store_url_in_a_hidden_folder branch 2 times, most recently from bae6ca5 to ba529c0 Compare January 8, 2025 11:42
@isaacroldan isaacroldan marked this pull request as ready for review January 13, 2025 14:26
@isaacroldan isaacroldan requested a review from a team as a code owner January 13, 2025 14:26
@isaacroldan isaacroldan force-pushed the 11-29-store_dev_store_url_in_a_hidden_folder branch from ba529c0 to 64a4f41 Compare January 13, 2025 14:27
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.

@isaacroldan isaacroldan force-pushed the 11-29-store_dev_store_url_in_a_hidden_folder branch from 64a4f41 to 44312b5 Compare January 16, 2025 12:18
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.

2 participants