-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Switch to using broccoli-persistent-filter #93
base: master
Are you sure you want to change the base?
Conversation
Current coverage is
|
@@ -24,10 +24,15 @@ function Fingerprint(inputNode, options) { | |||
|
|||
options = options || {}; | |||
|
|||
if (typeof options.persist === 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.persist === undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
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 certainrelativePath
s 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
contents
parameter ofprocessString()
results in different digests for the binary files in the test fixture directories (previously we were hashing a Buffer and now a string).