Skip to content

Conversation

@lopert
Copy link
Contributor

@lopert lopert commented Oct 9, 2025

Reimplementation of #6242

WHY are these changes introduced?

Fixes shop/issues-shopifyvm#434

WHAT is this pull request doing?

Adds "graphql-codegen/cli" dependency to CLI in order to call generate function instead of shelling out to npm exec.

How to test your changes?

  1. Create shopify app (remix and extension-only)
  2. dev cd cli && git checkout lopert.pnpm-install-fix
  3. pnpm shopify app extension generate --path <path to app created in step 1>
  4. Should see success message after generating any extension

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

@lopert lopert force-pushed the lopert.pnpm-install-fix branch from 3627bd6 to 4f678d5 Compare October 9, 2025 17:01
@lopert lopert changed the title Lopert.pnpm install fix Fix function generation in pnpm Oct 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
79.02% (+0.04% 🔼)
13362/16910
🟡 Branches
72.71% (+0.05% 🔼)
6525/8974
🟡 Functions
79.22% (+0.02% 🔼)
3450/4355
🟡 Lines
79.38% (+0.04% 🔼)
12623/15902
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / fs.ts
87.83% (-0.41% 🔻)
92.31% (-2.69% 🔻)
85.42% (+0.63% 🔼)
88.29% (+0.29% 🔼)

Test suite run success

3256 tests passing in 1342 suites.

Report generated by 🧪jest coverage report action from 4f678d5

@lopert lopert marked this pull request as ready for review October 14, 2025 12:39
@lopert lopert requested a review from a team as a code owner October 14, 2025 12:39
@isaacroldan
Copy link
Contributor

/snapit

@github-actions
Copy link
Contributor

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

Test the snapshot by installing your package globally:

npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20251014144216

Caution

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.

Copy link
Contributor

isaacroldan commented Oct 15, 2025

I'm getting this error when trying to generate a discount function:

Captura de pantalla 2025-10-15 a las 11.00.09.png

(Using the snapshot I generated above)

Take into account that there are some graphql-codegen in devDependencies, so is safer to test using a snapshot

@github-actions
Copy link
Contributor

This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

@lopert
Copy link
Contributor Author

lopert commented Nov 17, 2025

Went with a simpler approach to this: #6520

@lopert lopert closed this Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants