Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the check for untraced #834

Closed
wants to merge 1 commit into from
Closed

Conversation

ethriel3695
Copy link
Contributor

@ethriel3695 ethriel3695 commented Oct 10, 2023

We need to check if the package files are untraced during uploading.
We only set the TurboSnap bail reason.

We already check in dependendStoryFiles if we can't trace the dependencies.

if (nodeModules.size === 0 && changedDependencies.length > 0) {
// If we didn't find any node_modules in the stats file, it's probably incomplete and we can't
// trace changed dependencies, so we bail just in case.
ctx.turboSnap.bailReason = {
changedPackageFiles: ctx.git.changedFiles
.filter(isPackageManifestFile)
.concat(changedPackageLockFiles),
};
}

So we could remove that Bail reason and continue processing the changed files.

This would cover us on package changes without traced dependencies.

const onlyStoryFiles = await getDependentStoryFiles(

📦 Published PR as canary version: 7.3.1--canary.834.743db4e.0

✨ Test out this PR locally via:

npm install [email protected]
# or 
yarn add [email protected]

@@ -170,7 +170,7 @@ export const traceChangedFiles = async (ctx: Context, task: Task) => {
} else {
ctx.log.warn(`Could not retrieve dependency changes from lockfiles; checking package.json`);
const changedPackageFiles = await findChangedPackageFiles(packageManifestChanges);
if (changedPackageFiles.length > 0) {
if (changedPackageFiles.length > 0 && !ctx.untracedFiles) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't make sense to me. Why do you want to prevent bailing if any file is untraced? We already filter out untraced package.json/lockfiles in findChangedDependencies, so that's already respected.

@ghengeveld
Copy link
Member

Superseded by #835

@ghengeveld ghengeveld closed this Oct 11, 2023
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.

2 participants