Skip to content

chore: remove axios#1187

Open
slapec93 wants to merge 25 commits into
masterfrom
chore/remove-axios-dependency-from-bee-js
Open

chore: remove axios#1187
slapec93 wants to merge 25 commits into
masterfrom
chore/remove-axios-dependency-from-bee-js

Conversation

@slapec93

Copy link
Copy Markdown
Contributor

No description provided.

@slapec93 slapec93 marked this pull request as ready for review June 12, 2026 10:52
@slapec93 slapec93 requested a review from Cafe137 June 12, 2026 13:01
Comment thread src/bee.ts
const fileName = name ?? data.name
const contentType = data.type
const fileOptions = { contentType, ...options }
const fileOptions = { ...options, contentType }

@Cafe137 Cafe137 Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change needed? Just curious.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like Claude's sidequest:

The old order let options override contentType, meaning if a caller explicitly passed a contentType in options, it would silently win over the file's own data.type. The new order makes the file's actual MIME type take precedence, which is the correct behavior — when you have a File object, its .type should not be overridable by the caller.

I'm not sure if it breaks anything, should I revert this change?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we can keep it, thanks

Comment thread package.json Outdated
{
"name": "@ethersphere/bee-js",
"version": "12.2.2",
"name": "@upcoming/bee-js",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a revert

@Cafe137

Cafe137 commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

@slapec93 I see that throwIfAborted has been removed from multiple places. Does that mean it works natively with fetch now, and glue code is no longer needed?

@slapec93

Copy link
Copy Markdown
Contributor Author

I see that throwIfAborted has been removed from multiple places. Does that mean it works natively with fetch now, and glue code is no longer needed?
@Cafe137 yes, allegedly fetch handles this natively, but we have tests in abort.spec.ts, that proves this

@slapec93 slapec93 requested a review from Cafe137 June 17, 2026 19:40
@github-actions

Copy link
Copy Markdown
Contributor
File Coverage Now Coverage Before Delta% Rating
Total 2144 / 2612 2120 / 2586 0.10 🟢
bee.ts 388 / 461 388 / 461 0.00
index.ts 15 / 15 15 / 15 0.00
chunk/bmt.ts 15 / 16 15 / 16 0.00
chunk/cac.ts 20 / 21 20 / 21 0.00
chunk/soc.ts 58 / 59 58 / 59 0.00
feed/identifier.ts 5 / 5 5 / 5 0.00
feed/index.ts 83 / 85 83 / 85 0.00
feed/retrievable.ts 18 / 19 18 / 19 0.00
manifest/manifest.ts 222 / 237 222 / 237 0.00
modules/bytes.ts 21 / 25 21 / 25 0.00
modules/bzz.ts 30 / 31 30 / 31 0.00
modules/chunk.ts 14 / 14 14 / 14 0.00
modules/envelope.ts 7 / 7 7 / 7 0.00
modules/feed.ts 22 / 24 22 / 24 0.00
modules/grantee.ts 21 / 21 21 / 21 0.00
modules/gsoc.ts 10 / 11 10 / 11 0.00
modules/pinning.ts 19 / 20 19 / 20 0.00
modules/pss.ts 11 / 12 11 / 12 0.00
modules/rchash.ts 7 / 7 7 / 7 0.00
modules/soc.ts 10 / 10 10 / 10 0.00
modules/status.ts 5 / 10 5 / 10 0.00
modules/stewardship.ts 11 / 11 11 / 11 0.00
modules/tag.ts 19 / 20 19 / 20 0.00
modules/debug/balance.ts 26 / 26 26 / 26 0.00
modules/debug/chequebook.ts 56 / 58 56 / 58 0.00
modules/debug/connectivity.ts 28 / 35 28 / 35 0.00
modules/debug/settlements.ts 18 / 18 18 / 18 0.00
modules/debug/stake.ts 23 / 32 23 / 32 0.00
modules/debug/stamps.ts 43 / 45 43 / 45 0.00
modules/debug/states.ts 29 / 29 29 / 29 0.00
modules/debug/status.ts 30 / 36 30 / 36 0.00
modules/debug/transactions.ts 18 / 27 18 / 27 0.00
stamper/stamper.ts 22 / 22 22 / 22 0.00
types/debug.ts 8 / 12 8 / 12 0.00
types/index.ts 21 / 21 21 / 21 0.00
utils/bad-ports.ts 1 / 1 1 / 1 0.00
utils/bytes.ts 42 / 53 41 / 53 1.89 🟢
utils/chunk-size.ts 9 / 9 9 / 9 0.00
utils/chunk-stream.browser.ts 0 / 71 0 / 71 0.00
utils/chunk-stream.ts 57 / 63 57 / 63 0.00
utils/cid.ts 22 / 23 22 / 23 0.00
utils/collection.browser.ts 0 / 4 0 / 4 0.00
utils/collection.node.ts 29 / 33 29 / 33 0.00
utils/collection.ts 14 / 18 14 / 18 0.00
utils/constants.ts 7 / 7 7 / 7 0.00
utils/data.browser.ts 0 / 8 0 / 8 0.00
utils/data.ts 4 / 11 4 / 11 0.00
utils/duration.ts 20 / 22 20 / 22 0.00
utils/error.ts 13 / 13 12 / 12 0.00
utils/expose.ts 16 / 16 16 / 16 0.00
utils/file.ts 8 / 12 8 / 12 0.00
utils/headers.ts 62 / 71 62 / 71 0.00
utils/http.ts 66 / 74 44 / 49 -0.61 🔴
utils/mime.ts 1 / 1 1 / 1 0.00
utils/pss.ts 5 / 5 5 / 5 0.00
utils/redundancy.ts 32 / 44 32 / 44 0.00
utils/resource-locator.ts 6 / 7 6 / 7 0.00
utils/size.ts 12 / 14 12 / 14 0.00
utils/stamps.ts 55 / 78 55 / 78 0.00
utils/tar-uploader.browser.ts 0 / 11 0 / 11 0.00
utils/tar-uploader.ts 12 / 12 12 / 12 0.00
utils/tar-writer.browser.ts 0 / 8 0 / 8 0.00
utils/tar-writer.ts 13 / 14 13 / 14 0.00
utils/tar.browser.ts 0 / 73 0 / 73 0.00
utils/tar.ts 65 / 67 65 / 67 0.00
utils/tokens.ts 26 / 41 26 / 41 0.00
utils/type.ts 79 / 100 79 / 100 0.00
utils/typed-bytes.ts 85 / 86 85 / 86 0.00
utils/url.ts 21 / 26 21 / 26 0.00
utils/workaround.ts 9 / 14 9 / 14 0.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants