Skip to content

Pull Request: add markets & locales Support + update gitignore and fixtures#177

Closed
gil93 wants to merge 4 commits into
TheBeyondGroup:mainfrom
gil93:feat/locales-and-markets
Closed

Pull Request: add markets & locales Support + update gitignore and fixtures#177
gil93 wants to merge 4 commits into
TheBeyondGroup:mainfrom
gil93:feat/locales-and-markets

Conversation

@gil93

@gil93 gil93 commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

Summary

Adds Markets and Locales support to Shopkeeper buckets and updates ignore rules so required fixtures are tracked. Improves docs and tests accordingly.


What’s Changed

.gitignore

  • Keep ignoring .shopkeeper globally, but unignore src/utilities/fixtures/.shopkeeper/ so repo fixtures are tracked.

README / Docs

  • Show .shopkeeper/production/config/markets.json in the example tree.
  • Document locales/ usage and ignore patterns for theme projects, including schema exclusion.

Bucket Scaffolding

  • createBuckets now creates locales/ in each bucket.

Patterns & Flags

  • getSettingsPatterns() now returns:
    ['config/settings_data.json', 'config/markets.json', 'templates/**/*.json', 'sections/*.json', 'locales/!(*schema*).json']
  • CLI_SETTINGS_FLAGS includes the same (so --only flags cover markets + locales while excluding schema JSON).
  • getSettingsFolders() now includes 'locales'.

Tests

  • Extend tests to assert presence of config/markets.json and locales/*.json (excluding *schema*.json) in pull/flags.

Fixtures

  • Add empty fixture files for:

    • src/utilities/fixtures/.shopkeeper/production/config/markets.json
    • src/utilities/fixtures/.shopkeeper/production/locales/en.default.json
    • src/utilities/fixtures/theme/config/markets.json
    • src/utilities/fixtures/theme/locales/en.default.json

Why

  • Themes commonly rely on Markets config and Locales JSONs; these should be part of bucket operations.
  • We need repo-scoped .shopkeeper fixtures tracked for tests/docs, while still ignoring other .shopkeeper paths.

Behavior / Compatibility

  • Backward-compatible for existing buckets (adds a locales/ folder and recognizes config/markets.json if present).
  • locales/!(*schema*).json avoids bringing schema files into pulls/commits.

Testing

  • Ran unit tests (vitest --run).

  • Manual “human testing” via local file: install of the package and verified:

    • --only flags include markets + locales (without schema files).

Fixes #142

#142 will be addressed in a future effort / pull request.

@gil93 gil93 changed the title Pull Request: Add Markets & Locales Support + Update Gitignore & Fixtures Pull Request: add markets & locales Support + update gitignore and fixtures Oct 30, 2025
@gil93 gil93 mentioned this pull request Oct 30, 2025
@gil93

gil93 commented Oct 30, 2025

Copy link
Copy Markdown
Contributor Author

@jeffreyguenther this PR adds Markets & Locales support and resolves #142.
Would appreciate a quick review when you get a chance!

@jeffreyguenther

Copy link
Copy Markdown
Contributor

First off, thanks for preparing this PR!

I would prefer to split this PR into two. I'd like to add the markets and locales work in as separate units. They are separate concerns.

In particular, handling locales is not as simple as storing them in buckets as noted in the ticket. Before adding locale support, we need to look at the current workflow for locales as a whole, especially since theme duplicate was added.

The markets work is a nobrainer, we can get that in and a release cut.

@gil93

gil93 commented Nov 2, 2025

Copy link
Copy Markdown
Contributor Author

Hey @jeffreyguenther, thanks for the feedback!

Got it. I’ll split this into two PRs:

  1. Markets
  2. Locales (as a separate draft for follow-up discussion)

@gil93

gil93 commented Nov 2, 2025

Copy link
Copy Markdown
Contributor Author

Superseded by split PRs:

Closing this pull request in favor of the split PRs.

@gil93 gil93 closed this Nov 2, 2025
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.

Syncing locales

2 participants