Skip to content
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

Add support for transform option. #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TimBarham
Copy link

This is based on PR #69 by @peterbartels (see issue #71), but with conflicts resolved (and some typos in README.md fixed).

Adds a transform option, which allows the file stream to be transformed before piping it to res.

package.json Outdated
@@ -31,6 +31,7 @@
"after": "0.8.1",
"istanbul": "0.3.9",
"mocha": "2.2.5",
"replacestream": "~4.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like replacestream is not installable on the default Node.js 0.8 npm. Can you pick a different dependency for the testing, please? Also, please only specify exact versions of dependencies outside of pillarjs/jshttp.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm looking at using an older version of replacestream which I think will fix this (a version that has no dependencies specified by caret version).

@dougwilson dougwilson self-assigned this Sep 29, 2015
@dougwilson dougwilson added the pr label Sep 29, 2015
@dougwilson
Copy link
Contributor

Awesome!

@TimBarham
Copy link
Author

Switched to an older version of replacestream. Node.js 0.8 is happy now :)

@dougwilson
Copy link
Contributor

Gotcha. I would much rather not use some ancient version, because that makes it hard for us to support new versions of Node.js. Can you find a module that is current? Otherwise, I mean, just write a transform stream in the test, because it's pretty simple.

@dougwilson
Copy link
Contributor

Basically, just like any module, we always keep our dependencies up-to-date (they are slightly out of date right now, only because we haven't made a commit since those modules released new versions). If we find one of our dependencies no longer work with Node.js 0.8, for example, we replace it with something else that does. If we were to accept the PR as-is it would mean we would right away have a task to figure out what to replace the module with. Ideally, we don't really want to accept PRs that immediately put work on us, I'm sure you'll understand :)

@TimBarham
Copy link
Author

Heh, no problem - I totally understand. I was just taking the easy way out by using the tests from the PR this was based on 😄. I have an update that I'll push once it is cleaned up that uses a simple, inline replacement for replacestream.

@TimBarham
Copy link
Author

Updated to use latest readable-stream and a trivial replaceStream implementation.

@douglasduteil
Copy link

👍

@albertinad
Copy link

This is a cool feature! Is there any plan to integrate it soon to master? Thanks!

@TimBarham
Copy link
Author

@dougwilson - are there any plans to take this change? I'm happy to do the work to resolve the conflicts that have arisen after 10 months of sitting stagnant, but only if there is a point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants