GithubHelp home page GithubHelp logo

Comments (6)

MasterOdin avatar MasterOdin commented on June 4, 2024

Two of the tools listed on the above list (webpack-dev-server, serverless-offline) have removed portfinder as dependencies since this post was made.

Drop support for old versions of node (0.10 support ended almost 5 years before the OP was made in Oct 2016), make a new major release, and incorporate more modern JS practices. Hell, 4 of the 5 dependencies of portfinder can never be upgraded to the next major version as the minimum shared node target is node 6.

I'm glad I told someone I couldn't merge their es6 module pr today

Which has forced firebase-cli to have a shim in their codebase:

// Typescript emulates modules, which have constant exports. We can
// overcome this by casting to any
// TODO fix after https://github.com/http-party/node-portfinder/pull/115
(portfinder as unknown as { basePort: number }).basePort = 9005;

At some point this may break and then they too will be forced off portfinder (though the PR would have fixed an es6 issue while totally not affecting anyone not using es6). Being conservative on a dependency that's used a lot is great, but holding back all progress in the name of some unnamed enterprise corporations that refuses to update their tech stack (and who also would then happily keep using portfinder 1 while the community moves on to portfinder 2) is baffling, unless they're paying you money to maintain that support, though something tells me these companies are spending the bare minimum on their software, until they have to then set a bunch of money on fire rewriting everything once whatever stack they use isn't even installable on a new version of OS as even companies that give LTS policies in the decade+ end support for old things.

from node-portfinder.

eriktrom avatar eriktrom commented on June 4, 2024

@MasterOdin - you are correct - I completely agree. I don't own the project, but I figure a year (to the date) seems sufficient to move ahead with autonomy. :)

Updating, will release tomorrow most likely sometime.

Thanks @MasterOdin for your feedback and comment above, from 4 days prior to 365 days of no response :)

from node-portfinder.

MasterOdin avatar MasterOdin commented on June 4, 2024

Hah, what lucky timing, as I really only made the post as I stumbled onto it 4 days ago when I was upgrading the version of portfinder in my employer's codebase and went looking to see what had changed between the two versions.

Having cut my teeth on IE compatibility, I have a burning passion for advocating to drop support for very old platforms if it stands in the way of making things better, and easier to maintain (which I'd say Node 6+ in adopting ES2015 and ES2016 features).

from node-portfinder.

eriktrom avatar eriktrom commented on June 4, 2024

closed by #137

from node-portfinder.

MasterOdin avatar MasterOdin commented on June 4, 2024

I'm not sure this issue was resolved by #137, given that the library's minimal support is still node 0.12. I mean, I guess technically support for node 0.10 was dropped a while back, but I'd consider this issue covering dropping all EOL old versions.

It's not clear to me if you'd support having a v2 of this package that drops all node versions under some version (12?), and then could proceed to complete #131 in removing mkdirp completely, as well as would allow for making nicer the test cleanup code I added in #135.

from node-portfinder.

MasterOdin avatar MasterOdin commented on June 4, 2024

Dropping old versions of node would also allow some niceties like combining getPort into a single function with dual signature:

export function getPort(callback: PortfinderCallback): void;
export function getPort(options: PortFinderOptions, callback: PortfinderCallback): void;
export function getPort(options?: PortFinderOptions): Promise<number>;

which is similar to how most other libraries I've used support a function that has both a callback and a promise based interface as wouldn't need to worry about promises not being available.

from node-portfinder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.