Skip to content

Releases: neet/masto.js

v7.2.0

14 Jul 01:23
df4e263
Compare
Choose a tag to compare

7.2.0 (2025-07-14)

Features

  • Add blur enum value for FilterAction type (bd6efb3)
  • Add dateOfBirth property to CreateAccountParams (1ee4a42)
  • Add id and featuring property to Tag API (4bcc23a)
  • Add minAge and reasonRequired property to Instance (a57620e)
  • Add translations property to Rule entity (bf908c4)
  • Add endorsement APIs to AccountsResource (2f38c45)
  • Add feature/unfeature methods to TagResource (7f790fc)
  • Add quote entities and attach to statuses (#1324) (be42256)

Bug Fixes

  • Export Quote and ShallowQuote entity types (3364148)
  • Mark nullable parameters optional for consistency (dbfdadf)
  • Use Pick<T, U> for StatusEdit["quote"] (4817a7a)

v7.1.0

08 May 07:49
8f5240d
Compare
Choose a tag to compare

7.1.0 (2025-05-08)

Features

  • Support declaration merging in streaming APIs (6c98542)
  • Support declaration merging in v1 and v2 entities (d309f04)
  • Support declaration merging in v1 REST APIs (9c04f66)
  • Support declaration merging in v2 APIs (495988f)

Bug Fixes

  • Export all intermediate interfaces (af599e1)
  • Rename MuteResource to MutesResource (be6fb77)
  • Revert "fix: Use Authorization header for sending access_token to WebSocket API" (932463c)
  • Use tsconfig-to-dual-package to support CJS (2ea5747)

v7.0.0

01 May 03:01
5138dba
Compare
Choose a tag to compare

7.0.0 (2025-04-28)

Migration Guide

Upgrade Node.js to 20.x

Since Security Support for Node.js 18.x ended on April 30, 2025, we dropped the support for that version. 20.x is now the minimum required version, so please upgrade it for further use.

If you're using from a browser environment, please make sure that the browsers you're going to support offer 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 must explicitly convert them to AsyncIterator first, then use the iterator methods.

- const page = await paginator.next()
+ const page = await paginator[Symbol.asyncIterator].next()
+ const page = await paginator.values().next()

Also, the unnecessary paginator.clone() method is now removed, because [Symbol.asyncIterator] generates a new iterator instance every time.

- 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 were 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)

Bug Fixes

  • Fix URL Search Parameter with falsy value gets omitted (1b2418f)
  • Replace mergeAbortSignals with AbortSignal.any (15ee586)

v6.10.4

10 Apr 22:36
dee9874
Compare
Choose a tag to compare

6.10.4 (2025-04-08)

Bug Fixes

  • Allow multiple URIs in redirectUris in POST /v1/app (8f5248d)

v6.10.3

19 Jan 11:33
0a62d53
Compare
Choose a tag to compare

6.10.3 (2025-01-18)

Bug Fixes

  • update type information related to relationship severance (fc34274)

v6.10.2

09 Jan 07:18
0977817
Compare
Choose a tag to compare

6.10.2 (2025-01-05)

Bug Fixes

  • Add Bearer type to WebSocket Authorization header (ed4631c)
  • Use export type statement for mastodon namespace to reduce bundle size (e725e95)
  • Use Authorization header for sending access_token to WebSocket API (7f01cb3)

v6.10.1

23 Oct 14:32
d62d4c5
Compare
Choose a tag to compare

6.10.1 (2024-10-23)

Bug Fixes

  • Unset ws of WebSocketConnectorImpl after close event (0a73a2a)

v6.10.0

21 Oct 15:08
0a05b54
Compare
Choose a tag to compare

6.10.0 (2024-10-21)

Features

  • Support new accounts field in PreviewCard of status introduced by Mastodon 4.3.0 (96a84f2)

Bug Fixes

  • Fix duplicated WebSocket connection created when acquiring connection before one established (dbfd4c8)
  • Fix WebSocket client to maintain subscription even if other subscription with same parameter ends (e6d6bd0)
  • Unsubscribe from WebSocket stream when iterator ended (b7732ed)

v6.9.0

14 Oct 07:17
d9b3539
Compare
Choose a tag to compare

6.9.0 (2024-10-14)

In this release, we support the latest Mastodon v4.3.0 which comes with numerous enhancements in notification-related APIs. Here is the list of APIs/types affected by this release. You may also want to read the Mastodon official release note for v4.3.0 for further information.

Types

  • Event["event"] with "notification_merged"
  • v1.AccountWarning type
  • v1.Appeal type
  • v1.GroupedNotificationsResults, v1.PartialAccountWithAvatar, and v1.NotificationGroup types
  • v1.Notification["groupKey"], v1.SeveredRelationshipsNotification, and v1.ModerationWarningNotification types
  • v1.NotificationRequest type
  • v1.RelationshipSeveranceEvent type
  • v1.Suggestion["sources"] property
  • v2.Instance["icon"], v2.Instance["apiVersions"], v2.Instance["configuration"]["vapid"] properties
  • v2.NotificationPolicy type

APIs

  • masto.v1.accounts.fetch({ id: [id1, id2, ...] })
  • masto.v1.accounts.relationship.fetch({ id: [...], withSuspended: boolean })
  • masto.v1.notifications.requests.$select(id).accept()
  • masto.v1.notifications.requests.$select(id).dismiss()
  • masto.v1.notifications.requests.$select(id).fetch()
  • masto.v1.notifications.requests.accept()
  • masto.v1.notifications.requests.dismiss()
  • masto.v1.notifications.requests.list()
  • masto.v1.notifications.requests.merged.fetch()
  • masto.v1.notifications.unreadCount.fetch()
  • masto.v1.statuses.fetch({ id: [id1, id2, ...] })
  • masto.v1.timelines.link.list({ url: "..." })
  • masto.v2.notifications.$select(id).accounts.fetch()
  • masto.v2.notifications.$select(id).dismiss()
  • masto.v2.notifications.$select(id).fetch()
  • masto.v2.notifications.policy.fetch()
  • masto.v2.notifications.policy.update()
  • masto.v2.notifications.unreadCount.fetch()

Features

v6.8.2

13 Oct 05:27
2856b4d
Compare
Choose a tag to compare

6.8.2 (2024-10-13)

Bug Fixes

  • Add missing v1.instance.extendedDescription API (#1212) (74681b3)
  • Add missing public domain block API (#1214) (884b83d)