Skip to content

Improve performance for extension types generation#7747

Open
gonzaloriestra wants to merge 4 commits into
mainfrom
skip-external-imports-in-type-generation
Open

Improve performance for extension types generation#7747
gonzaloriestra wants to merge 4 commits into
mainfrom
skip-external-imports-in-type-generation

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Re: https://community.shopify.dev/t/cli-type-generation-for-ui-extensions-reads-too-many-files-restrict-scanner-to-tsconfig-include-or-toml-entry/34957

UI extension type generation can recursively scan too many files, including external imports and files excluded by a project's TypeScript config. This can make shopify app build and app loading noticeably slower.

WHAT is this pull request doing?

  • Limits recursive import scanning to files inside the extension directory.
  • Skips type-only imports/exports and .d.ts files.
  • Respects explicit tsconfig.json files / include lists when present.
  • Reuses an import cache across repeated scans for UI extension targets.

How to test your changes?

shopify app build

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 — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Jun 8, 2026
@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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

Test the snapshot by installing your package globally:

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

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.

@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:

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

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.

@gonzaloriestra gonzaloriestra changed the title Skip external imports in type generation Improve performance for type generation Jun 11, 2026
@gonzaloriestra gonzaloriestra changed the title Improve performance for type generation Improve performance for extension types generation Jun 11, 2026
@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:

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

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.

@gonzaloriestra gonzaloriestra marked this pull request as ready for review June 11, 2026 14:09
@gonzaloriestra gonzaloriestra requested a review from a team as a code owner June 11, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant