Skip to content

v1.12.4

Compare
Choose a tag to compare
@rosmcmahon rosmcmahon released this 27 Jan 03:21
· 100 commits to master since this release

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