"test commit for untraced"
MODIFY
bin-src/lib/getDependentStoryFiles.ts
bin-src/lib/getDependentStoryFiles.ts
@@ -15,10 +15,13 @@ const LOCKFILES = [
/\/yarn\.lock$/,
];
+const GLOBALS = [/^package\.json$/, /\/package\.json$/];
+
// Ignore these while tracing dependencies
const EXTERNALS = [/^node_modules\//, /\/node_modules\//, /\/webpack\/runtime\//, /^\(webpack\)/];
const isPackageLockFile = (name: string) => LOCKFILES.some((re) => re.test(name));
+const isPackageFile = (name: string) => GLOBALS.some((re) => re.test(name));
const isUserModule = (mod: Module | Reason) =>
(mod as Module).id !== undefined &&
(mod as Module).id !== null &&
@@ -183,7 +186,7 @@ export async function getDependentStoryFiles(
bailReason: undefined,
};
- const changedPackageFiles = tracedFiles.filter(isPackageLockFile);
+ const changedPackageFiles = tracedFiles.filter(isPackageLockFile || isPackageFile);
if (changedPackageFiles.length) {
ctx.turboSnap.bailReason = { changedPackageFiles };
// If package.json dependencies changed, we still want to use the same TurboSnap bail reason

MODIFY
package.json
package.json
"storybook",
"addon",
"test",
- "popular"
+ "popular",
+ "automation"
],
"homepage": "https://www.chromatic.com",
"bugs": {

MODIFY
subdir/package.json
subdir/package.json
"scripts": {
"start": "start-storybook",
"build": "build-storybook --webpack-stats-json --output-dir ../subdir-static",
- "postbuild": "node -r esm ../bin-src/trim-stats-file.js ../subdir-static/preview-stats.json"
+ "postbuild": "node -r esm ../bin-src/trim-stats-file.js ../subdir-static/preview-stats.json",
+ "test": "jest"
},
"dependencies": {
"@storybook/react": "^6.3.7",

"test commit for untraced"