Comments (6)
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.
@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.
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.
closed by #137
from node-portfinder.
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.
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)
- 【feature request】support to use array as basePort HOT 3
- Should portfinder also have a getPortsPromise function? HOT 2
- Free port still in use HOT 3
- All ports lower than 1024 are closed HOT 2
- Version mismatch on `mkdirp` between `package.json` and `package-lock.json` HOT 1
- Update ci to test new versions of npm HOT 3
- If callback is passed to getPort() then all errors should be returned as first parameter of callback HOT 1
- migrate to mkdirp v1 HOT 9
- Webpack doesn't like portfinder HOT 14
- Cluster apps are all on same port instead of different ports HOT 2
- no highestPort ts definition in latest version HOT 2
- Update Readme to Specify NOT to use outside development port finding HOT 1
- Please update mkdirp from 0.5.5 to 0.5.6 HOT 2
- Update "async" dependency HOT 9
- why mkdirp dependecy? HOT 9
- version 1.0.29 doesn't compile with typescript HOT 4
- `testPort` gets called with `65536`
- Create code of conduct HOT 1
- Before filing a socket not closed issue: understanding async I/O + ordering + OS differences + stability requirements HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-portfinder.