Switch to using broccoli-persistent-filter#93
Switch to using broccoli-persistent-filter#93elucid wants to merge 2 commits intoember-cli:masterfrom
Conversation
Current coverage is
|
lib/fingerprint.js
Outdated
|
|
||
| options = options || {}; | ||
|
|
||
| if (typeof options.persist === 'undefined') { |
There was a problem hiding this comment.
options.persist === undefined
NOTE: * overrides fewer `Filter` functions * simplifies implementation by making use of public APIs * avoids an extra readFileSync for every resource because hashing is done within `processString` (which has contents passed in as a param) rather than in `getDestFilePath` * unfortunately all image files (and files which reference them) in text fixtures had to be renamed because now the file contents as string rather than a Buffer are passed to the hash function and consequently produce different digests
e2e0700 to
3f51d43
Compare
|
@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? |
|
@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? |
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 certainrelativePaths for which it is now being called. While this could have been worked around, we opted to refactor a bit and use more ofbroccoli-persistent-filter's public API. The hashing is now done withinprocessString()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
contentsparameter ofprocessString()results in different digests for the binary files in the test fixture directories (previously we were hashing a Buffer and now a string).