broccoli-asset-rev
broccoli-asset-rev copied to clipboard
Switch to using broccoli-persistent-filter
See #92
This updates broccoli-asset-rev to use broccoli-persistent-filter. Although the APIs are similar, it was not possible to do a simple swap-out replacement. In particular, the previous implementation relied on getDestFilePath() not being called for certain relativePaths for which it is now being called. While this could have been worked around, we opted to refactor a bit and use more of broccoli-persistent-filter's public API. The hashing is now done within processString() which is passed in each file's contents so we now avoid an extra readFileSync for every file.
I should explain all of the text fixture renames: hashing the contents parameter of processString() results in different digests for the binary files in the test fixture directories (previously we were hashing a Buffer and now a string).
Current coverage is 93.37%
Merging #93 into master will decrease coverage by -2.02% as of
3f51d43
@@ master #93 diff @@
======================================
Files 3 3
Stmts 152 151 -1
Branches 36 38 +2
Methods 0 0
======================================
- Hit 145 141 -4
Partial 2 2
- Missed 5 8 +3
Review entire Coverage Diff as of
3f51d43Powered by Codecov. Updated on successful CI builds.
@stefanpenner Would you mind reviewing and signing off?
Will do
Just tried this and the new broccoli-asset-rewrite PR, unfortunately they don't appear to work correctly.
When used together, it appears broccoli-asset-rewrite seems to prevent assets on disk from getting the correct fingerprinted name, removing it and all appears well.
The issue might be in the other project, but requires a deeper look.
Is this PR dead?
I want to add pluggable getDestFilePath but it would obviously clash with the change to processString(), so I'd like to know if this is happening.
@stefanpenner @elucid @rickharrison I too wonder about the status of this PR/repository. This particular PR is 14 months old now. How's the support?