Skip to content

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

Merged
jakebolam merged 3 commits into
bundlewatch:masterfrom
cheapsteak:chang/normalize-bugfix
Sep 22, 2020
Merged

fix: file path normalization wasn't working right#238
jakebolam merged 3 commits into
bundlewatch:masterfrom
cheapsteak:chang/normalize-bugfix

Conversation

@cheapsteak

Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants