Skip to content

Switch to Vite and auto-load tools #88

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

Merged
merged 6 commits into from
Aug 6, 2025
Merged

Switch to Vite and auto-load tools #88

merged 6 commits into from
Aug 6, 2025

Conversation

surma
Copy link
Member

@surma surma commented Aug 6, 2025

This PR does a couple of things:

  • Switched the build process from using TypeScript CLI to Vite
  • Renamed tool files to use snake_case directory structure to match the tool names
  • Refactored shopifyTools to dynamically import all tool modules using Vite's import.meta.glob.
  • Thanks to vite, we can now import JSON files which allows us to simplify how package.json is imported to retrieve the version.
  • Move the SCHEMA_CACHE_DIR to use xdg-app-path to not rely on coincidental correctness of the data path.
  • During tests, pre-populate the the cache dir with the mock schemas rather than relying on mocking node:fs.
  • Remove the old mocking files.

@surma surma requested a review from a team as a code owner August 6, 2025 12:42
Copy link
Contributor

@matteodepalo matteodepalo left a comment

Choose a reason for hiding this comment

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

Code looks great! Some failures in CI but let's merge when green 👍

@surma surma merged commit a253c3a into main Aug 6, 2025
4 checks passed
@github-actions github-actions bot mentioned this pull request Aug 14, 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.

2 participants