Skip to content

Releases: line/line-bot-sdk-nodejs

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

v8.2.0

27 Dec 07:21
e9fab8b
Compare
Choose a tag to compare

What's Changed

There are several keywords that can be used for the properties of Template Messages and Flex Messages.

Starting from this version, these keywords are provided. In addition to keywords, you can use strings that specify percentages or pixels, so please convert the keywords to strings if necessary. The original definitions are also written in Flex Message layout and line/line-openapi#46.

line-openapi updates

  • Update line-openapi digest to 13b314a by @renovate in #633
  • Update line-openapi digest to 16f6311 by @renovate in #634
  • Codes are generated by openapi by @github-actions in #635

Dependency updates

Full Changelog: v8.1.0...v8.2.0

v8.1.0

25 Dec 04:30
4f109d3
Compare
Choose a tag to compare

What's Changed

We have now added support for a Webhook (PnpDeliveryCompletionEvent) that can be received once a message is successfully sent via PNP.

line-openapi updates

  • Update line-openapi digest to 988429c by @renovate in #626
  • Codes are generated by openapi by @github-actions in #627

Dependency updates

  • Update dependency @types/node to v20.9.3 by @renovate in #603
  • Update dependency @types/mocha to v10.0.6 by @renovate in #604
  • Update dependency @types/node to v20.9.4 by @renovate in #605
  • Update dependency @types/node to v20.9.5 by @renovate in #606
  • Update dependency @types/node to v20.10.0 by @renovate in #607
  • Update dependency msw to v2.0.9 by @renovate in #608
  • Update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.5.0 by @renovate in #609
  • Update dependency typedoc to v0.25.4 by @renovate in #610
  • Update actions/setup-java action to v4 by @renovate in #612
  • Update dependency io.pebbletemplates:pebble to v3.2.2 by @renovate in #611
  • Update dependency @types/node to v20.10.1 by @renovate in #613
  • Update dependency @types/node to v20.10.2 by @renovate in #614
  • Update dependency @types/node to v20.10.3 by @renovate in #615
  • Update dependency msw to v2.0.10 by @renovate in #616
  • Update dependency @types/node to v20.10.4 by @renovate in #618
  • Update actions/stale action to v9 by @renovate in #619
  • Update dependency ts-node to v10.9.2 by @renovate in #620
  • Update dependency prettier to v3.1.1 by @renovate in #621
  • Update dependency msw to v2.0.11 by @renovate in #622
  • Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.2.3 by @renovate in #623
  • Update dependency @types/node to v20.10.5 by @renovate in #624
  • Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.12.0 by @renovate in #625
  • Update openapi-generator-version to v7.2.0 by @renovate in #628
  • Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.12.1 by @renovate in #630

Other Changes

Full Changelog: v8.0.2...v8.1.0

8.0.2

21 Nov 04:12
d686ad4
Compare
Choose a tag to compare

What's Changed

We've fixed some bugs in version 8 bot-sdk.

  • Skip sending header if headerParams is undefined or null by @tokuhirom in #587
  • ChannelAccessToken client doesn't have to require channel access token by @Yang-33 in #597
  • Fix form parameter and delete it only when undefined by @Yang-33 in #600

line-openapi updates

Dependency updates

Other Changes

Full Changelog: v8.0.1...v8.0.2