Skip to content

feat: Allow filepaths in reports to be normalized (e.g. remove content hashes)#192

Closed
cheapsteak wants to merge 3 commits into
bundlewatch:masterfrom
cheapsteak:chang/20/07/normalize-filepath-in-reports
Closed

feat: Allow filepaths in reports to be normalized (e.g. remove content hashes)#192
cheapsteak wants to merge 3 commits into
bundlewatch:masterfrom
cheapsteak:chang/20/07/normalize-filepath-in-reports

Conversation

@cheapsteak

@cheapsteak cheapsteak commented Jul 8, 2020

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

This addresses #30 to allow file paths in reports be processed (mainly to normalize hashes)

pathNormalizationPattern: '^([.][^\\.]+[.])([^\\.]+)([.].+)',
pathNoramlizationReplacement: '$1[hash]$3',

Since both the pattern and replacement are passed in, this config makes no assumptions about where hashes exists in the path

Did you add tests for your changes?

Yes

If relevant, link to documentation update:

Summary

Motivation is summarized pretty well in #30
Bundle often contain hashes in the path name, not being able to compare across versions of the same file cripples the usefulness of the file size watcher

Does this PR introduce a breaking change?

No

@cheapsteak cheapsteak changed the title Allow filepaths in reports to be normalized (e.g. remove content hashes) feat: Allow filepaths in reports to be normalized (e.g. remove content hashes) Jul 8, 2020
@cheapsteak

Copy link
Copy Markdown
Contributor Author

@jakebolam poke 🙏

@beeequeue

Copy link
Copy Markdown

@jakebolam Any update on this?

@mrlubos

mrlubos commented Aug 21, 2020

Copy link
Copy Markdown

+1 @jakebolam

@jakebolam

Copy link
Copy Markdown
Member

This is a great feature! Lets see if we can get it in

@jakebolam

Copy link
Copy Markdown
Member

Closing in favour of #214

@jakebolam jakebolam closed this Sep 9, 2020
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.

4 participants