@sitespeed.io/throttle
Advanced tools
Comparing version 4.0.0 to 4.0.1
# CHANGELOG - throttle | ||
# 4.0.1 - 2022-06-17 | ||
### Fixed | ||
* Removed the dependecy of route. Using `ip route` instead and we already have `ip` as a requirement. | ||
# 4.0.0 - 2022-04-14 | ||
### Changed | ||
* Converting the project to ES6 module. If you run Throttle by command line it will work exactly as before except that we dropped support for NodeJS 10 [#67](https://github.com/sitespeedio/throttle/pull/67). | ||
* Converting the project to ES6 module. If you run Throttle by command line it will work exactly as before except that we dropped support for NodeJS 10 [#67](https://github.com/sitespeedio/throttle/pull/67). You can read [Sindre Sorhus ESM package guide](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). | ||
### Fixed | ||
* Updated dev dependencies to latest versions [#68](https://github.com/sitespeedio/throttle/pull/68) | ||
# 3.1.1 - 2022-04-19 | ||
### Fixed | ||
* Updated minimist dependency. | ||
# 3.1.0 - 2021-12-26 | ||
@@ -10,0 +17,0 @@ ### Added |
@@ -6,4 +6,6 @@ import shell from './shell.js'; | ||
const result = await shell( | ||
"sudo route | grep -m 1 '^default' | grep -o '[^ ]*$' | tr -d '\n'", | ||
{ shell: true } | ||
"sudo ip route | awk '/default/ {print $5; exit}' | tr -d '\n'", | ||
{ | ||
shell: true | ||
} | ||
); | ||
@@ -10,0 +12,0 @@ |
{ | ||
"name": "@sitespeed.io/throttle", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Throttle your connection", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -9,3 +9,3 @@ # Simulate slow network connections on Linux and Mac OS X | ||
Throttle uses *pfctl* on Mac and *tc* on Linux to simulate different network speeds. On Linux you also need *ip* and *route* for Throttle to work (install using `sudo apt-get install -y net-tools`). | ||
Throttle uses *pfctl* on Mac and *tc* on Linux to simulate different network speeds. On Linux you also need *ip* for Throttle to work (install using `sudo apt-get install -y net-tools`). | ||
@@ -124,3 +124,3 @@ You can set the download/upload speed and/or RTT. Upload/download is in kbit/s and RTT in ms. | ||
```javascript | ||
const throttle = require('@sitespeed.io/throttle'); | ||
import throttle from '@sitespeed.io/throttle' | ||
// Returns a promise | ||
@@ -133,3 +133,3 @@ throttle.start({up: 360, down: 780, rtt: 200}).then(() => ... | ||
```javascript | ||
const throttle = require('@sitespeed.io/throttle'); | ||
import throttle from '@sitespeed.io/throttle' | ||
// Returns a promise | ||
@@ -136,0 +136,0 @@ const options = {up: 360, down: 780, rtt: 200}; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28161
559