Improve import scanning performance on app dev#6930
Improve import scanning performance on app dev#6930gonzaloriestra wants to merge 1 commit intomainfrom
Conversation
|
/snapit |
|
🫰✨ 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-20260303123133Caution After installing, validate the version by running |
Coverage report
Test suite run success3790 tests passing in 1450 suites. Report generated by 🧪jest coverage report action from 9a2bc0c |
90308c8 to
9a2bc0c
Compare
Differences in type declarationsWe 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:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/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.
|
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:
Checklist