Gozala / querystring

Node's querystring module for all engines.
MIT License
287 stars 72 forks source link

New versions reflecting Node.js implementation #20

Open medikoo opened 7 years ago

medikoo commented 7 years ago

I thought it might be good to sort out this module, into something that most people would expect and find useful. Here's my proposal:

Let's publish multiple major versions:

v14 - Reflecting version in Node.js v14 (as 1:1 as it can be) v12 - Reflecting version in Node.js v12 (as 1:1 as it can be) v10 - Reflecting version in Node.js v10 (as 1:1 as it can be) v0.12 - Reflecting version in Node.js v0.12 (as 1:1 as it can be). This would be the version safe to use in ES5 (non ES6) environments v0.3 - ES3 version of v0.12, for those who expect ES3 support.

Version that reflects lowest Node.js version that still receives support, should be tagged as latest on npm (so it's installed by default). Currently it'll be v10

All versions should be maintained at it's own branches, master could lead to most recent (e.g. v14 at current time-being), but we could also make v14 as default branch instead.

In all versions I would also expose package as one module (as it was originally here and as it is in Node.js).

PR's are welcome. Ideally each version should be proposed with different PR

harshzalavadiya commented 3 years ago

https://github.com/Gozala/querystring/issues/48#issue-779222693

This is continuation of #46

I was amazed to see that this package was compitable with node js v0.6.x

as even nodejs group also do not provide that much backward compatablity(reference)

The reason why I'm requesting this is so

  • Morden projects can take advantage of latest ES6 features
  • Current package code can be optimized to have even more tiny footprint

Challenges

  • Currently it's very hard to develop for node v0.6.0 even current Travis CI build fails due to Segmentation fault same happned when I tried the same on digitalocean droplet screenshots below image image
  • GitHub Actions is also unable to setup nodejs v0.6.x (v0.8.0) works

PS people can still can use querystring@0.2.x if they want to support legacy node versions also there's very good chance that if somebody is running node v0.6 currently then they might never update their npm packages :P I think keeping up with same version as nodejs might be hard for any maintainer I guess,

I think it will still be helpful if you folks can publish v0.3.0 for now once latest updates come in and if any decision is take in this direction then this package can go that way

medikoo commented 3 years ago

@harshzalavadiya We need to maintain support for Node.js v0.6 in context of a version v0.2

Concerning new breaking releases, as indicated I believe it's best to provide versions as listed in main description.

I think it'll be good to maintain same test suite for all the versions, and as package is meant to reflect Node.js 1:1. To ensure best parity it's probably best to copy tests from Node.js repository -> https://github.com/nodejs/node/blob/master/test/parallel/test-querystring.js (still e.g. for v0.3 and v0.12 I would copy it from v0.12 version of Node.js etc).

They depend on assert module which I think has some alternatives that will eventually work in a browser (but in first run we may not setup testing in browser engines)