Skip to content

Releases: line/line-bot-sdk-nodejs

v9.1.0 Support dual package + membership API

06 Apr 15:44
043f502
Compare
Choose a tag to compare

What's Changed

[1] Support dual package

We're thrilled to announce the line/line-bot-sdk-nodejs project update to version 9.1.0! Transitioning from CommonJS (CJS) to ECMAScript Modules (ESM), we've also enhanced the library with dual package support.
Now, users can utilize the library in both CJS and ESM formats.
This pivotal upgrade boosts compatibility and flexibility across various runtime environments and tool ecosystems.

[2] Membership API

The Membership API is now available in the Messaging API. With this update, our SDK also supports the use of this API.
For more details, check out the announcement: https://developers.line.biz/en/news/2024/03/28/re-release-endpoints-for-membership

line-openapi updates

  • Update line-openapi digest to 1ca4640 by @renovate in #804
  • Codes are generated by openapi by @github-actions in #805

Dependency updates

Other Changes

Full Changelog: v9.0.4...v9.1.0

v9.0.4

28 Mar 01:21
66c9fc1
Compare
Choose a tag to compare

What's Changed

Dependency updates

Other Changes

Full Changelog: v9.0.3...v9.0.4

v9.0.3

13 Mar 07:04
a81854d
Compare
Choose a tag to compare

What's Changed

Other Changes

Full Changelog: v9.0.2...v9.0.3

v9.0.2

12 Mar 07:44
8cffd97
Compare
Choose a tag to compare

What's Changed

Dependency updates

  • Update dependency @types/node to v20.11.26 by @renovate in #755

Other Changes

  • Bye body-parser by @Yang-33 in #752
  • Bye node:querystring by @Yang-33 in #753
  • Fix get parameter and delete it only when undefined by @Yang-33 in #754
    • getFollowers had bug, but it has been fixed.

Full Changelog: v9.0.1...v9.0.2

v9.0.1

11 Mar 13:33
a13399c
Compare
Choose a tag to compare

What's Changed

  • Move file-type to optional dependency by @Yang-33 in #745
  • Add 'node:' prefix explicitly to import built-in modules by @Yang-33 in #746

Dependency updates

Other Changes

  • Codes are generated by openapi by @github-actions in #751

Full Changelog: v9.0.0...v9.0.1

v9.0.0 - Removal of axios and Error Handling Changes

08 Mar 07:03
1bccab7
Compare
Choose a tag to compare

v9.0.0 - Removal of axios and Error Handling Changes

(1) In version 9.0.0, we have removed the axios dependency from the auto-generated clients, now utilizing the native fetch() method. (Note that deprecated client will continue to use axios.)
We would like to express our gratitude to @tokuhirom for implementing this change to use the native fetch(). Thank you very much for your contribution!!

(2) With the removal of axios, the structure of errors has been modified. This is a 💣breaking change💣, and users who are handling errors will need to modify your own code when using v9.0.0 of the line-bot-sdk-nodejs. (The error structure for deprecated client remains unchanged.) New error is HTTPFetchError, which was HTTPError. Thus clients(except for deprecated client) won't throw HTTPError in v9.0.0.

Here is a brief overview of the differences. Retrieving the HTTP status code, headers, and error body from the Messaging API has become much simpler.

(For version < 9.0.0)

const client = new MessagingApiClient({
    channelAccessToken: 'YOUR_CHANNEL_ACCESS_TOKEN',
});
client
  .replyMessage({
    replyToken: replyToken,
    messages: [message]
   })
  .catch((err) => {
    if (err instanceof HTTPError) {
      // Displaying the HTTP status code, headers, and error body in sequence
      console.error(err.originalError.response.status);
      console.error(err.originalError.response.headers.get('x-line-request-id'));
      console.error(err.originalError.response.data);
    }
  });

(For version >= 9.0.0)

const client = new MessagingApiClient({
    channelAccessToken: 'YOUR_CHANNEL_ACCESS_TOKEN',
});
client
  .replyMessage({
    replyToken: replyToken,
    messages: [message]
   })
  .catch((err) => {
    if (err instanceof HTTPFetchError) { // 👈 client newly throws `HTTPFetchError` instead of `HTTPError`
      // Displaying the HTTP status code, headers, and error body in sequence
      console.error(err.status); // 👈 HTTP status code is in `HTTPFetchError`
      console.error(err.headers.get('x-line-request-id')); // 👈 headers are in `HTTPFetchError`
      console.error(err.body); // 👈 error body is in `HTTPFetchError`
    }
  });

(3) New ~WithHttpInfo functions provide raw response

New ~WithHttpInfo functions have been added. These functions return both the response itself and the parsed response body. This allows careful SDK users to obtain information such as (1) HTTP status codes and (2) HTTP response headers even on successful requests, which was not possible before. Please see the documentation (https://line.github.io/line-bot-sdk-nodejs/guide/client.html) for more details.

What's Changed

Dependency updates

Other Changes

New Contributors

Full Changelog: v8.4.1...v9.0.0

v8.4.1

27 Feb 02:11
18dc03e
Compare
Choose a tag to compare

What's Changed

#709 resolve type issues reported in #708
We have updated the file upload to be more standard by using Node.js built-in FormData.

line-openapi updates

Dependency updates

Other Changes

Full Changelog: v8.4.0...v8.4.1

v8.4.0

06 Feb 06:06
e92f866
Compare
Choose a tag to compare

What's Changed

line-openapi updates

In the Messaging API, you can now determine whether a user has added your LINE Official Account as a friend or unblocked by a webhook follow event.

News: https://developers.line.biz/en/news/2024/02/06/add-friends-and-unblock-friends-can-now-be-determined-by-webhook/

  • Codes are generated by openapi by @github-actions in #698

Dependency updates

Full Changelog: v8.3.1...v8.4.0

v8.3.1

05 Feb 08:39
07b89d0
Compare
Choose a tag to compare

What's Changed

In the Messaging API, we've added the clipboard action for users to copy text to the clipboard. This new feature allows users to more easily copy coupon codes and other text.

news: https://developers.line.biz/en/news/2024/02/05/messaging-api-updated/

Note only the latest app(version >= 14.0.0) supports this feature. Please update your LINE app to try this feature.

I made a mistake in the release procedure. In the version before the correction, you cannot use the clipboard action. (in https://github.com/line/line-bot-sdk-nodejs/releases/tag/v8.3.0)

line-openapi updates

  • Codes are generated by openapi by @github-actions in #695

Full Changelog: v8.3.0...v8.3.1

v8.3.0

05 Feb 08:31
5446c7c
Compare
Choose a tag to compare

What's Changed

(1)
In the Messaging API, we've added the clipboard action for users to copy text to the clipboard. This new feature allows users to more easily copy coupon codes and other text.

news: https://developers.line.biz/en/news/2024/02/05/messaging-api-updated/

Note only the latest app(version >= 14.0.0) supports this feature. Please update your LINE app to try this feature.

(2)

line-openapi updates

Dependency updates

Other Changes

  • Bump follow-redirects from 1.14.9 to 1.15.4 in /examples/rich-menu by @dependabot in #646
  • Bump follow-redirects from 1.14.9 to 1.15.4 in /examples/kitchensink by @dependabot in #647
  • Bump follow-redirects from 1.14.9 to 1.15.4 in /examples/echo-bot-ts by @dependabot in #648
  • Bump vite from 5.0.5 to 5.0.12 by @dependabot in #666

New Contributors

Full Changelog: v8.2.0...v8.3.0