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

fix: file path normalization wasn't working right #238

Merged
merged 3 commits into from
Sep 22, 2020

Conversation

cheapsteak
Copy link
Contributor

What kind of change does this PR introduce?

bugfix

Did you add tests for your changes?

yes

If relevant, link to documentation update:

Summary

following up to #214
We're currently generating confusing reports where the file names show up as the same but they're not compared against their previous version

It looks like we needed to perform normalization earlier than when analyze was called, since there's a call to bundlewatchService.saveFileDetailsForCurrentBranch before analyze is run

const baseBranchFileDetails = await bundlewatchService.getFileDetailsForBaseBranch()
await bundlewatchService.saveFileDetailsForCurrentBranch({
fileDetailsByPath: currentBranchFileDetails,
trackBranches: ci.trackBranches,
})
const results = analyze({
currentBranchFileDetails,
baseBranchFileDetails,
baseBranchName: ci.repoBranchBase,
normalizeFilenames,
})

Does this PR introduce a breaking change?
No, the API is kept the same as before (any captured segments are removed)

Other information

@cheapsteak cheapsteak changed the title Bugfix: file path normalization wasn't working right fix: file path normalization wasn't working right Sep 16, 2020
Signed-off-by: Chang Wang <garnwraly@gmail.com>
Signed-off-by: Chang Wang <garnwraly@gmail.com>
Signed-off-by: Chang Wang <garnwraly@gmail.com>
@jakebolam jakebolam merged commit f856167 into bundlewatch:master Sep 22, 2020
@jakebolam
Copy link
Member

@cheapsteak thank you 🙏

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.

None yet

2 participants