Skip to content

Default to pnpm/pnpx internally#7250

Closed
gonzaloriestra wants to merge 2 commits intomainfrom
default-to-pnpm
Closed

Default to pnpm/pnpx internally#7250
gonzaloriestra wants to merge 2 commits intomainfrom
default-to-pnpm

Conversation

@gonzaloriestra
Copy link
Copy Markdown
Contributor

@gonzaloriestra gonzaloriestra commented Apr 13, 2026

WHY are these changes introduced?

Function extensions is running graphql-code-generator with npm exec instead of using the project's package manager.

Also, we should align internal tooling with the repo’s default package manager (pnpm), so contributors and CI use the same commands.

WHAT is this pull request doing?

  • buildGraphqlTypes: Runs graphql-code-generator with the project's package manager instead of hard-coding npm exec.
  • Root create-app script: Passes --package-manager pnpm into the create-app dev entrypoint.
  • E2E: Default packageManager in packages/e2e/setup/app.ts is pnpm when E2E_PACKAGE_MANAGER is unset; Playwright steps in tests-pr.yml use pnpm exec playwright so CI uses the workspace’s pinned Playwright (avoids pnpx pulling a different version). E2E helper script comments / create-app flows updated for pnpm where relevant.
  • Misc: Small script and workflow/doc tweaks (e.g. dev.yml, build-dev-docs.sh, create-notification-pr.js, release.yml) for consistency with pnpm-first usage.

How to test your changes?

  • CI
  • pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260413103432
  • shopify app generate extension --template cart_transform --flavor typescript --name cart-transformer

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing, so I've added a changelog entry with pnpm changeset add

@gonzaloriestra
Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

This comment was marked as outdated.

@gonzaloriestra
Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions
Copy link
Copy Markdown
Contributor

🫰✨ Thanks @gonzaloriestra! 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-20260413103432

Caution

After installing, validate the version by running shopify version 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.

@github-actions
Copy link
Copy Markdown
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/node-package-manager.d.ts
@@ -60,6 +60,10 @@ export declare class FindUpAndReadPackageJsonNotFoundError extends BugError {
 export declare function packageManagerFromUserAgent(env?: NodeJS.ProcessEnv): PackageManager;
 /**
  * Returns the dependency manager used in a directory.
+ * Walks upward from  so workspace packages (e.g. )
+ * still resolve to the repo root lockfile ().
+ * If no lockfile is found, it falls back to the package manager from the user agent.
+ * If the package manager from the user agent is unknown, it returns 'npm'.
  * @param fromDirectory - The starting directory
  * @returns The dependency manager
  */

@gonzaloriestra
Copy link
Copy Markdown
Contributor Author

Closing in favor of #7254

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.

1 participant