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

Upgrade to the latest #18

Merged
merged 40 commits into from
Jun 3, 2017
Merged

Conversation

dignifiedquire
Copy link
Member

This PR does a couple of things that were much needed for us

  • bring the code base up to date with node 5.9.1
  • port the tests from node 5.9.1 to mocha as we did not want to import the custom test runner node-core is using
  • add linting and cleanup the code
  • upgrade to the latest version of pako, which adds dictionary support
  • Add browser tests using karma, as browserling did not seem to be working when I last checked

This is a very big change and I understand if you have concerns about this. As @diasdavid already mentioned in #16 we will be needing this module in the forseeable future and maintaining it. Hopefully we can find a solution for that without having to maintain all this in a fork.

@fanatid
Copy link

fanatid commented May 4, 2016

@dignifiedquire great work! Much better than #17!
Is this PR up to date with node 6?

@daviddias
Copy link

@fanatid #17 was before we knew that pako was missing the dictionary implementation :) @dignifiedquire did a great job at getting everything done, well tested and did a revamp on browserify-zlib, which we are now using for libp2p+ipfs.

@fanatid
Copy link

fanatid commented May 4, 2016

@diasdavid ha, didn't notice that you are also from Protocol Labs :)

@dignifiedquire
Copy link
Member Author

dignifiedquire commented May 4, 2016

@fanatid not at the moment, there is not much, but some changes have been made from 5.9.1..6.0.0: https://github.com/nodejs/node/commits/v6.0.0/src/node_zlib.cc

@jscissr
Copy link
Contributor

jscissr commented Jul 12, 2016

This PR fixes #13, #14, #15, #20, and theZ_BUF_ERROR issue is also affecting me. Please merge @devongovett! 👍

@daviddias
Copy link

@jscissr is there anything else you would like to see in this PR for the merge?

@jscissr
Copy link
Contributor

jscissr commented Aug 4, 2016

No, for me everything seems to work fine.

@daviddias
Copy link

what about you, @fanatid , looks good to merge? :)

@fanatid
Copy link

fanatid commented Aug 4, 2016

@diasdavid I can't review all this code, but if this new code compliant with node module (at least with 5.x) and passes all tests from node -- it's good for me.

@devongovett
Copy link
Member

I like the idea of this pull: the module has gotten kinda old. But I think as much of the code as possible should be a direct copy paste from the node source code, including the tests, as I did originally. It will be much easier to maintain: we can just copy paste again in the future. Thoughts?

@dignifiedquire
Copy link
Member Author

ping @devongovett

@daviddias
Copy link

🙏

@dignifiedquire
Copy link
Member Author

@devongovett any chance of this happening? I am also happy to help maintain this module if you don't have the time/ don't want to. But releasing this would benefit the whole browserify/webpack community, who all use this module for zlib in the browser.

@haadcode
Copy link
Contributor

Merging this would be hugely beneficial for the https://github.com/ipfs/js-ipfs project.

We're currently working towards supporting https://github.com/facebookincubator/create-react-app which doesn't support custom webpack configs. As js-ipfs in itself uses a fork of browserify-zlib, we need to include it in our build tools (https://github.com/dignifiedquire/aegir/blob/master/config/webpack.js#L35). As such, we're not able to have create-react-app compile code that uses js-ipfs, because we can't include the fork :/ I hope this makes sense, but let me know if clarification is needed.

If there's anything I (and we) can do to get closer to merging this, please let us know.

dignifiedquire and others added 5 commits January 19, 2017 17:33
In the browser different versions of the `Buffer` package can be around, making it impossible
to rely on `instanceof` checks.
@devongovett
Copy link
Member

Hey sorry guys. I realized I'm completely failing at maintaining this package. @dignifiedquire I've added you as a collaborator on this repo. If you tell me your npm username, I'll add you there too so you can publish.

I think this PR looks pretty good with the modifications you made to use the original code from node. As I mentioned previously, my main goals for this repo originally were to use as much code from node as possible, and to run the tests without modifications as well. This ensured that the browserify version worked in exactly the same way as node. Would be happy if these goals were followed going forward, but I don't have time to personally maintain it anymore. Thanks in advance!

@dignifiedquire
Copy link
Member Author

Thank you @devongovett my npm username is the same dignifiedquire :)

@devongovett
Copy link
Member

Awesome, you have been added.

@dignifiedquire
Copy link
Member Author

Thank you, I will prepare the PR to be ready for merge tomorrow and hopefully push out a release then :)

@dignifiedquire dignifiedquire merged commit 95e893b into browserify:master Jun 3, 2017
@devongovett
Copy link
Member

Thanks for doing this @dignifiedquire. Can you also make a PR to browserify and webpack to update their dependencies? I don't think they will pull in the new version automatically because of the way semver works.

https://github.com/substack/node-browserify/blob/master/package.json#L27
https://github.com/webpack/node-libs-browser/blob/master/package.json#L12

FauxFaux added a commit to FauxFaux/gunzip-maybe that referenced this pull request Jun 1, 2020
It's unclear where the "major" version bump came from, they do have a
number of changes, but they seem mostly to be changing test framework,
upgrading dependencies (I care about the transitive `pako` upgrade), and
the like. The project is kinda quiet.

Note that the 1.0 release is of a different, temporary name, while the
PR below was trying to merge. It merged in 2017, and they released it,
as 0.2, instead of as 1.0.

https://github.com/browserify/browserify-zlib/commits/master
browserify/browserify-zlib#18
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.

9 participants