
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
ensure-port
Advanced tools
Makes sure you get an available port.
npm i ensure-port
yarn add ensure-port
import { Ports } from 'ensure-port';
const ports = new Ports({
startPort: 8000,
endPort: 9000,
});
const port = await ports.ensure(); // This would be a random port between 8000 and 9000 that is not used (validated against file-system and http server)
// When you finish - remove watcher
await ports.dispose();
It saves inside your node_modules
a directory that contain all the ports that are in use.
This is why it works in parallel.
Feel free to fork and create pull requests!
FAQs
Makes sure you get an available port
The npm package ensure-port receives a total of 14 weekly downloads. As such, ensure-port popularity was classified as not popular.
We found that ensure-port demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.