Upgrade
Upgrading from 1.0.x
Version 1.1.0 is a drop-in upgrade. Code that works with 1.0.4 keeps working without changes.
npm install ts-netstorageapi-akamai@^1.1.0
What stays exactly the same
- Every method name, argument, callback signature and resolved value.
- The configuration object, error messages and validation.
- The request on the wire: method, path,
X-Akamai-ACS-*headers and signature, http/https choice, proxy handling. - Parsed responses for
dir,list,du,stat, plain-text and error bodies. import Netstorage from "ts-netstorageapi-akamai",require("ts-netstorageapi-akamai").default, and type imports fromts-netstorageapi-akamai/dist/....
What is new
Security
xml2js upgraded to 0.6.2 and lodash removed. npm audit no longer reports this package.
Bug fixes
A failed upload no longer sends an empty file, and a dropped connection reports an error instead of hanging.
Smaller
The npm package is 22 kB instead of 92 kB, and installs about 1,100 fewer files.
Additions
A command line tool, exported types and editor documentation for every method.
Differences a 1.0.4 user could notice
| Change | Who could notice |
|---|---|
| A failed upload reports its error once and sends nothing. | Code that hit a local read error. Before, it also got a second callback with the empty upload's response. |
downloadAsync(path) without a destination saves to the current directory. | Code that passed no destination. Before, the call failed. |
download("dir/", callback) passes the error to the callback. | Code that passed a directory path with two arguments. Before, it threw a TypeError. |
A connection dropped mid-response reports an ECONNRESET error. | Code that hit a dropped connection. Before, the promise never settled and the callback was never called. |
lodash is no longer installed with this package. | Apps that require("lodash") without listing it in their own package.json. Run npm install lodash. |
src/ and docs/ are no longer in the npm package. | Only imports of ts-netstorageapi-akamai/src/.... |
"engines": { "node": ">=18" } is declared. | Installs on Node 16 or older with npm's engine-strict setting on. |
Before release, the whole test suite also ran against the published 1.0.4 code, and the results matched except for the fixes above. Full details are in the changelog.