v1.12.4
Release Notes
This update allows arweave-js to run in modern environments such as Chrome Extension Manifest V3.
Rationale: It seems like the industry is moving towards dropping the original XmlHttpRequest API in favour of Fetch API. Examples include the above browser extensions standard and web workers, which only support Fetch API.
Why not add a package like node-fetch
? To simplify, rather than adding more complications to our inherited code, but PRs welcome.
Added dependency
Fetch API. Available in all modern browsers. Available as standard since node v18+ (*opt-in experimental since node v16.5).
Removed dependencies
Axios, node:utils (polyfill)
*Notes for NodeJS v16.5 - v17
To run with node v16.5+, you need to specify the --experimental-fetch
flag in your app.
Examples
These can be added to your packages.json
start script, or Dockerfile entrypoint
node
node --experimental-fetch --no-warnings <your-app.js>
ts-node
NODE_OPTIONS='--experimental-fetch --no-warnings' ts-node experimental-fetch.ts <your-app.ts>
Update September 2023
- NodeJS 16 is generally being deprecated because concerns about SSL security updates.
- Announcement: https://nodejs.org/en/blog/announcements/nodejs16-eol?utm_content=263954443