Skip to content

Improve import scanning performance on app dev#6930

Draft
gonzaloriestra wants to merge 1 commit intomainfrom
improve-import-scanning-perf
Draft

Improve import scanning performance on app dev#6930
gonzaloriestra wants to merge 1 commit intomainfrom
improve-import-scanning-perf

Conversation

@gonzaloriestra
Copy link
Contributor

@gonzaloriestra gonzaloriestra commented Mar 3, 2026

WHY are these changes introduced?

Fixes https://github.com/shop/issues-develop/issues/21853

WHAT is this pull request doing?

How to test your changes?

Post-release steps

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

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@gonzaloriestra
Copy link
Contributor Author

/snapit

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🫰✨ 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-20260303123133

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
Contributor

github-actions bot commented Mar 3, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 78.88% 14535/18427
🟡 Branches 73.18% 7229/9878
🟡 Functions 79.06% 3693/4671
🟡 Lines 79.22% 13739/17343

Test suite run success

3790 tests passing in 1450 suites.

Report generated by 🧪jest coverage report action from 9a2bc0c

@gonzaloriestra gonzaloriestra force-pushed the improve-import-scanning-perf branch from 90308c8 to 9a2bc0c Compare March 3, 2026 13:40
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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/private/node/constants.d.ts
@@ -32,6 +32,7 @@ export declare const environmentVariables: {
     neverUsePartnersApi: string;
     skipNetworkLevelRetry: string;
     maxRequestTimeForNetworkCalls: string;
+    disableImportScanning: string;
 };
 export declare const defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com";
 export declare const systemEnvironmentVariables: {
packages/cli-kit/dist/public/node/import-extractor.d.ts
@@ -1,6 +1,12 @@
+/**
+ * Clears the import paths cache. Should be called when watched files change
+ * so that rescanning picks up updated imports.
+ */
+export declare function clearImportPathsCache(): void;
 /**
  * Extracts import paths from a source file.
  * Supports JavaScript, TypeScript, and Rust files.
+ * Results are cached per file path to avoid redundant I/O.
  *
  * @param filePath - Path to the file to analyze.
  * @returns Array of absolute paths to imported files.

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