Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2025-05-01 | 3.3 kB | |
v7.0.0 source code.tar.gz | 2025-05-01 | 168.4 kB | |
v7.0.0 source code.zip | 2025-05-01 | 284.8 kB | |
Totals: 3 Items | 456.5 kB | 1 |
7.0.0 (2025-04-28)
Migration Guide
Upgrade Node.js to 20.x
Since Security Support for Node.js 18.x is ended in April 30, 2025, we dropped the support for that version. 20.x is now the minimum required version, so please upgrade it to further use.
If you're using from a browser environment, please make sure that browsers you're going to support offers corresponding APIs to ones implemented by Node.js 20, such as AbortSignal.any
. Otherwise you may need to use poyfills.
Paginator.{next, return, throw, clone}
are removed
Due to the simplicity, we have changed Paginator
API not to implement AsyncIterator
directly, but to implement AsyncIterable
instead, which has [Symbol.asyncIterator]
property that returns AsyncIterator
. We also offer values
method as an alias for [Symbol.asyncIterator]
.
Therefore, if you're using paginator.next()
in your codebase, you will need to explicitly convert them to AsyncIterator
first, then use the iterator methods.
:::diff
- const page = await paginator.next()
+ const page = await paginator[Symbol.asyncIterator].next()
+ const page = await paginator.values().next()
Also, unnecessary paginator.clone()
method is now removed, because [Symbol.asyncIterator]
generates a new iterator instance every time.
:::diff
- const paginator1 = masto.v1.lists.select("123").accounts.list();
- const paginator2 = await paginator.clone()
+ const paginator = masto.v1.lists.$select("123").accounts.list()
+ const pagenator1 = await paginator.values()
+ const pagenator2 = await paginator.values()
Renamed APIs
The following Mastodon APIs are removed due to the upstream changes or our naming convention. Please refer to the table below for the newer names.
Old name | New name |
---|---|
SuggestionSource |
LegacySuggestionSource |
SuggestionSource_ |
SuggestionSource |
CreateTokenParamsWithPassword |
CreateTokenWithPasswordParams |
v1.search.fetch |
Removed. Use v1.search.list |
v2.search.fetch |
Removed. Use v2.search.list |
⚠ BREAKING CHANGES
- Remove deprecated APIs (CreateTokenParamsWithPassword, v1.search.fetch, v2.search.fetch, SuggestionSource)
- Change PaginatorHttp.values to a generator
- Replace mergeAbortSignals with AbortSignal.any
Features
- Change PaginatorHttp.values to a generator (cba6d19)
- Promote Symbol.dispose for WebSocketSubscription to a stable API (abd385a)
- Remove deprecated APIs (CreateTokenParamsWithPassword, v1.search.fetch, v2.search.fetch, SuggestionSource) (b2ae9b5)