Skip to content

Commit e664704

Browse files
authored
feat: Bundles (NET-1657, NET-1658) (#3331)
- [x] Update changelog
1 parent 71c6ea2 commit e664704

File tree

219 files changed

+8169
-6078
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+8169
-6078
lines changed

.github/workflows/publish-npm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
- alpha
1515
- internal
1616
- testnet-three
17+
- experiment
1718
jobs:
1819
publish:
1920
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,57 @@ Changes before Tatum release are not documented in this file.
88

99
## [Unreleased]
1010

11+
### Breaking Changes
12+
13+
- **BREAKING CHANGE**: The following packages no longer include all source files in `dist`. They now export bundled artifacts for ESM, CJS, and TypeScript declarations only:
14+
- `@streamr/sdk`
15+
- `@streamr/utils`
16+
- `@streamr/dht`
17+
- `@streamr/proto-rpc`
18+
- `@streamr/test-utils`
19+
- `@streamr/autocertifier-client`
20+
- `@streamr/trackerless-network`
21+
22+
If you previously relied on importing internal files directly from `dist`, you must update your imports to use the package's public exports.
23+
1124
### General
1225

13-
#### Fixed
26+
#### Added
27+
28+
- Expose cross-environment cryptographic utilities from `@streamr/utils` for both browser and Node.js ([#3342]):
29+
- AES cipher utilities: `createCipheriv`, `createDecipheriv`
30+
- Hash functions: `computeMd5`, `computeSha1`
31+
- RSA utilities: `publicEncrypt`, `privateDecrypt`
32+
- Random bytes: `randomBytes` (re-exported from `@noble/post-quantum/utils`)
33+
- Types: `CryptoKey`, `Jwk`
34+
- Bundle a limited browser-compatible version of `autocertifier-client` ([#3340])
35+
36+
#### Changed
37+
38+
- Internal packages now produce separate bundles for browser and Node.js environments, improving tree-shaking and reducing polyfill requirements ([#3321], [#3322], [#3330], [#3333], [#3335], [#3336], [#3337], [#3338], [#3339])
1439

1540
### @streamr/sdk
1641

1742
#### Added
1843

19-
#### Changed
44+
- Bundle `@streamr/sdk` for browser (no polyfills required!) and for Node.js ([#3358])
2045

21-
#### Deprecated
46+
#### Changed
2247

23-
#### Removed
48+
- **BREAKING CHANGE**: The package no longer provides a default export. Use named imports instead: `import { StreamrClient } from '@streamr/sdk'`. The UMD bundle remains accessible via `window.StreamrClient`. ([#3358])
49+
- Use named `StreamrClient` export and explicit `type` import syntax ([#3369])
50+
- Use named imports for `EventEmitter` from `eventemitter3` ([#3366])
2451

2552
#### Fixed
2653

27-
#### Security
54+
- Resolve circular dependencies in the SDK package ([#3361], [#3367])
55+
- Clean-up `tsyringe` setup ([#3362])
56+
57+
### @streamr/browser-test-runner
58+
59+
#### Added
60+
61+
- Support TypeScript karma-setup files ([#3368])
2862

2963
### @streamr/node
3064

@@ -54,7 +88,6 @@ Changes before Tatum release are not documented in this file.
5488

5589
#### Security
5690

57-
5891
## [103.2.2] - 2026-01-19
5992

6093
### General
@@ -589,7 +622,7 @@ Autostaker changes:
589622
- Change websocket client library implementation used in Node.js (https://github.com/streamr-dev/network/pull/2384)
590623

591624

592-
[Unreleased]: https://github.com/streamr-dev/network/compare/v103.2.0...HEAD
625+
[Unreleased]: https://github.com/streamr-dev/network/compare/v103.2.2...HEAD
593626
[103.2.2]: https://github.com/streamr-dev/network/compare/v103.2.1...v103.2.2
594627
[103.2.1]: https://github.com/streamr-dev/network/compare/v103.2.0...v103.2.1
595628
[103.2.0]: https://github.com/streamr-dev/network/compare/v103.1.2...v103.2.0
@@ -613,3 +646,22 @@ Autostaker changes:
613646
[100.1.2]: https://github.com/streamr-dev/network/compare/v100.1.1...v100.1.2
614647
[100.1.1]: https://github.com/streamr-dev/network/compare/v100.1.0...v100.1.1
615648
[100.1.0]: https://github.com/streamr-dev/network/compare/v100.0.0...v100.1.0
649+
650+
[#3321]: https://github.com/streamr-dev/network/pull/3321
651+
[#3322]: https://github.com/streamr-dev/network/pull/3322
652+
[#3330]: https://github.com/streamr-dev/network/pull/3330
653+
[#3333]: https://github.com/streamr-dev/network/pull/3333
654+
[#3335]: https://github.com/streamr-dev/network/pull/3335
655+
[#3336]: https://github.com/streamr-dev/network/pull/3336
656+
[#3337]: https://github.com/streamr-dev/network/pull/3337
657+
[#3338]: https://github.com/streamr-dev/network/pull/3338
658+
[#3339]: https://github.com/streamr-dev/network/pull/3339
659+
[#3340]: https://github.com/streamr-dev/network/pull/3340
660+
[#3342]: https://github.com/streamr-dev/network/pull/3342
661+
[#3358]: https://github.com/streamr-dev/network/pull/3358
662+
[#3361]: https://github.com/streamr-dev/network/pull/3361
663+
[#3362]: https://github.com/streamr-dev/network/pull/3362
664+
[#3366]: https://github.com/streamr-dev/network/pull/3366
665+
[#3367]: https://github.com/streamr-dev/network/pull/3367
666+
[#3368]: https://github.com/streamr-dev/network/pull/3368
667+
[#3369]: https://github.com/streamr-dev/network/pull/3369

Dockerfile.node

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ FROM node:${NODE_VERSION}-bullseye AS build
33
WORKDIR /usr/src/network
44
COPY . .
55
RUN --mount=type=cache,target=/root/.npm \
6+
npm run bootstrap-pkg --package=@streamr/utils && \
67
npm run bootstrap-pkg --package=@streamr/proto-rpc && \
78
npm run bootstrap-pkg --package=@streamr/autocertifier-client && \
9+
npm run bootstrap-pkg --package=@streamr/cdn-location && \
10+
npm run bootstrap-pkg --package=@streamr/geoip-location && \
811
npm run bootstrap-pkg --package=@streamr/dht && \
912
npm run bootstrap-pkg --package=@streamr/trackerless-network && \
1013
npm run bootstrap-pkg --package=@streamr/sdk && \

docs/docs/help/operator-faq.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ Recheck operator address from the hub & reconfigure your node to use the correct
179179
I’m receiving the following warning message.
180180

181181
```JSON
182-
WARN [2023-11-10T10:01:42.418] (NodeWebRtcConnection): Failed to set remote descriptor for peer 0a3849076d8a43b19b876fbc6eba935f
183-
WARN [2023-11-10T10:01:42.421] (NodeWebRtcConnection): Failed to set remote candidate for peer 0a3849076d8a43b19b876fbc6eba935f
184-
WARN [2023-11-10T10:01:42.622] (NodeWebRtcConnection): Failed to set remote candidate for peer 0a3849076d8a43b19b876fbc6eba935f
185-
WARN [2023-11-10T10:01:42.867] (NodeWebRtcConnection): Failed to set remote candidate for peer 0a3849076d8a43b19b876fbc6eba935f
182+
WARN [2023-11-10T10:01:42.418] (WebRtcConnection): Failed to set remote descriptor for peer 0a3849076d8a43b19b876fbc6eba935f
183+
WARN [2023-11-10T10:01:42.421] (WebRtcConnection): Failed to set remote candidate for peer 0a3849076d8a43b19b876fbc6eba935f
184+
WARN [2023-11-10T10:01:42.622] (WebRtcConnection): Failed to set remote candidate for peer 0a3849076d8a43b19b876fbc6eba935f
185+
WARN [2023-11-10T10:01:42.867] (WebRtcConnection): Failed to set remote candidate for peer 0a3849076d8a43b19b876fbc6eba935f
186186
```
187187

188188
**Explanation:**
@@ -332,4 +332,4 @@ You'll need to pay the early exit fee of 5k DATA. The unwithdrawn earnings from
332332
#### What are some tips for staying safe on Streamr?
333333
- Consider starting small with your stake amount and use common sense to never stake more than you can afford to lose. A professional audit of the incentive layer has been completed by Cyfrin, but nothing can be guaranteed of course.
334334
- If you want to stake on a sponsorship, DO NOT click on the "Sponsor". That's for funding the sponsorship, not staking! Instead, go to the sponsorship you want to stake on and click "Join as an operator” and enter the amount.
335-
- There may be an increase in activity by scammers. A common approach is to pretend to offer help or tech support in direct messages (something we never do). Report any account that is asking you to sign transactions or asking for any sort of credentials such as your private key. These accounts are trying to steal your tokens. It’s advised you disable DMs on Discord. More tips can be found in #server-safety-guide.
335+
- There may be an increase in activity by scammers. A common approach is to pretend to offer help or tech support in direct messages (something we never do). Report any account that is asking you to sign transactions or asking for any sort of credentials such as your private key. These accounts are trying to steal your tokens. It’s advised you disable DMs on Discord. More tips can be found in #server-safety-guide.

docs/docs/usage/sdk/how-to-use.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Node.js `20` is the minimum required version, ideally version 22 and later. Node
3838
For usage in the browser include the latest build, e.g. by including a `<script>` tag pointing at a CDN:
3939

4040
```html
41-
<script src="https://unpkg.com/@streamr/sdk/streamr-sdk.web.js"></script>
41+
<script src="https://unpkg.com/@streamr/sdk/exports-umd.js"></script>
4242
```
4343

4444
#### Browser extension

0 commit comments

Comments
 (0)