Releases: line/line-bot-sdk-nodejs
v9.1.0 Support dual package + membership API
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
- Update dependency @types/node to v20.12.0 by @renovate in #789
- Update dependency @types/node to v20.12.2 by @renovate in #790
- Update dependency vitepress to v1.0.2 by @renovate in #799
- Update dependency @types/node to v20.12.3 by @renovate in #801
- Update dependency vite to v5.2.8 by @renovate in #806
- Update dependency @types/node to v20.12.4 by @renovate in #809
- Update dependency msw to v2.2.13 by @renovate in #800
- Update dependency typescript to v5.4.4 by @renovate in #811
- Update dependency @types/node to v20.12.5 by @renovate in #812
Other Changes
- Stop reading package.json from sdk code by @Yang-33 in #792
- Use Vitest instead of Mocha by @Yang-33 in #793
- Support only ESM at first by @Yang-33 in #794
- Add an example with Typescript and ESM by @Yang-33 in #795
- Support CJS again by @Yang-33 in #797
- Do not publish tests by @Yang-33 in #803
- Fix typescript with cjs compile issue by @Yang-33 in #802
- Update example and document for ESM by @Yang-33 in #810
Full Changelog: v9.0.4...v9.1.0
v9.0.4
What's Changed
Dependency updates
- Update dependency @types/node to v20.11.27 by @renovate in #759
- Update dependency axios to v1.6.8 by @renovate in #761
- Update dependency @types/node to v20.11.28 by @renovate in #760
- Update dependency msw to v2.2.4 by @renovate in #765
- Update dependency msw to v2.2.5 by @renovate in #766
- Update dependency msw to v2.2.7 by @renovate in #767
- Update dependency msw to v2.2.8 by @renovate in #770
- Update dependency @types/node to v20.11.29 by @renovate in #768
- Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.13.0 by @renovate in #769
- Update dependency @types/node to v20.11.30 by @renovate in #771
- Update dependency express to v4.19.0 by @renovate in #773
- Update dependency msw to v2.2.9 by @renovate in #772
- Update dependency typescript to v5.4.3 by @renovate in #774
- Update dependency express to v4.19.1 by @renovate in #775
- Update dependency msw to v2.2.10 by @renovate in #777
- Update dependency express to v4.19.2 by @renovate in #779
- Update dependency msw to v2.2.11 by @renovate in #781
- Update dependency mocha to v10.4.0 by @renovate in #784
- Update dependency msw to v2.2.12 by @renovate in #786
- Update dependency msw to v2.2.13 by @renovate in #788
- Bump follow-redirects from 1.15.4 to 1.15.6 in /examples/echo-bot-ts by @dependabot in #764
- Bump follow-redirects from 1.15.4 to 1.15.6 in /examples/rich-menu by @dependabot in #762
- Bump follow-redirects from 1.15.4 to 1.15.6 in /examples/kitchensink by @dependabot in #763
Other Changes
- Set timeout in test again by @Yang-33 in #776
- Remove link to Community Q&A and Twitter by @tokuhirom in #780
- Fix broken links in the docs by @tokuhirom in #783
- Use Vitepress instead of VuePress by @tokuhirom in #785
Full Changelog: v9.0.3...v9.0.4
v9.0.3
What's Changed
Other Changes
- Refactoring unit test(middleware.spec.ts) by @pengooseDev in #744
- Remove file-type dependency by @Yang-33 in #757
Full Changelog: v9.0.2...v9.0.3
v9.0.2
v9.0.1
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
- Update dependency typedoc to v0.25.12 by @renovate in #747
- Update dependency typescript to v5.4.2 by @renovate in #742
- Update openapi-generator-version to v7.4.0 by @renovate in #750
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
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
- Update dependency @types/node to v20.11.21 by @renovate in #721
- Update dependency msw to v2.2.2 by @renovate in #722
- Update dependency @types/node to v20.11.22 by @renovate in #724
- Update dependency express to v4.18.3 by @renovate in #726
- Update dependency @types/node to v20.11.24 by @renovate in #725
- Update dependency typedoc to v0.25.10 by @renovate in #735
- Update dependency typedoc to v0.25.11 by @renovate in #738
- Update dependency @types/node to v20.11.25 by @renovate in #740
- Update dependency msw to v2.2.3 by @renovate in #741
Other Changes
- Bump ip from 1.1.8 to 1.1.9 in /examples/echo-bot-ts by @dependabot in #716
- Refactoring fetch-based code after PR, again #541, #582 by @tokuhirom in #723
- Implemented http-fetch's own exception. by @tokuhirom in #727
- api-test: use nodejs' http server instead of msw by @tokuhirom in #729
- Simplify the http-fetch.ts by @tokuhirom in #730
- Add WithHttpInfo method by @tokuhirom in #731
- add test cases for WithHttpInfo by @tokuhirom in #732
- Define api response type instead of array to access response and body easily by @Yang-33 in #733
- Enhance Documentation for Response and Error Handling in SDK by @Yang-33 in #734
- Compile example project by @Yang-33 in #736
- Refactoring Exception by @pengooseDev in #739
New Contributors
- @pengooseDev made their first contribution in #739
Full Changelog: v8.4.1...v9.0.0
v8.4.1
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
- Update dependency msw to v2.1.7 by @renovate in #700
- Update openapi-generator-version to v7.3.0 by @renovate in #701
- Update dependency mocha to v10.3.0 by @renovate in #702
- Update dependency @types/node to v20.11.17 by @renovate in #705
- Update dependency typedoc to v0.25.8 by @renovate in #706
- Update dependency msw to v2.2.0 by @renovate in #707
- Update dependency husky to v9.0.11 by @renovate in #710
- Update dependency @types/node to v20.11.18 by @renovate in #711
- Update dependency @types/node to v20.11.19 by @renovate in #712
- Update dependency msw to v2.2.1 by @renovate in #713
- Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.2 by @renovate in #715
- Update dependency @types/node to v20.11.20 by @renovate in #719
- Update dependency typedoc to v0.25.9 by @renovate in #720
Other Changes
- Bump ip from 1.1.8 to 1.1.9 in /examples/rich-menu by @dependabot in #717
- Bump ip from 1.1.8 to 1.1.9 in /examples/kitchensink by @dependabot in #718
- Use Node.js built-in FormData by @dlackty in #709
Full Changelog: v8.4.0...v8.4.1
v8.4.0
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.
- Codes are generated by openapi by @github-actions in #698
Dependency updates
Full Changelog: v8.3.1...v8.4.0
v8.3.1
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
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)
- Fix Exclude empty value from verifyIdToken by @inoue2002 in #691
line-openapi updates
Dependency updates
- Update dependency @types/node to v20.10.6 by @renovate in #636
- Update dependency typedoc to v0.25.5 by @renovate in #637
- Update dependency typedoc to v0.25.6 by @renovate in #638
- Update dependency axios to v1.6.4 by @renovate in #639
- Update dependency msw to v2.0.12 by @renovate in #640
- Update dependency typescript to v5.3.3 by @renovate in #601
- Update dependency axios to v1.6.5 by @renovate in #641
- Update dependency @types/node to v20.10.7 by @renovate in #642
- Update dependency typedoc to v0.25.7 by @renovate in #644
- Update dependency msw to v2.0.13 by @renovate in #645
- Update dependency @types/node to v20.10.8 by @renovate in #649
- Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.2.5 by @renovate in #650
- Update dependency @types/node to v20.11.0 by @renovate in #651
- Update dependency msw to v2.0.14 by @renovate in #652
- Update dependency prettier to v3.2.1 by @renovate in #653
- Update dependency prettier to v3.2.2 by @renovate in #654
- Update dependency @types/node to v20.11.1 by @renovate in #656
- Update dependency @types/node to v20.11.2 by @renovate in #657
- Update dependency msw to v2.1.0 by @renovate in #658
- Update dependency @types/node to v20.11.3 by @renovate in #659
- Update dependency @types/node to v20.11.4 by @renovate in #660
- Update dependency msw to v2.1.1 by @renovate in #661
- Update dependency @types/node to v20.11.5 by @renovate in #662
- Update dependency prettier to v3.2.3 by @renovate in #663
- Update dependency prettier to v3.2.4 by @renovate in #664
- Update dependency msw to v2.1.2 by @renovate in #665
- Update dependency msw to v2.1.3 by @renovate in #667
- Update dependency msw to v2.1.4 by @renovate in #668
- Update dependency @types/node to v20.11.6 by @renovate in #669
- Update dependency axios to v1.6.6 by @renovate in #671
- Update dependency husky to v9 by @renovate in #672
- Update dependency husky to v9.0.2 by @renovate in #673
- Update dependency husky to v9.0.5 by @renovate in #674
- Update dependency axios to v1.6.7 by @renovate in #676
- Update dependency husky to v9.0.6 by @renovate in #677
- Update dependency @types/node to v20.11.7 by @renovate in #678
- Update dependency msw to v2.1.5 by @renovate in #675
- Update dependency @types/node to v20.11.8 by @renovate in #679
- Update dependency @types/node to v20.11.9 by @renovate in #680
- Update dependency @types/node to v20.11.10 by @renovate in #681
- Update dependency husky to v9.0.7 by @renovate in #682
- Update dependency @types/node to v20.11.12 by @renovate in #683
- Update dependency @types/node to v20.11.13 by @renovate in #684
- Update dependency @types/node to v20.11.15 by @renovate in #685
- Update dependency husky to v9.0.8 by @renovate in #686
- Update dependency husky to v9.0.9 by @renovate in #687
- Update dependency @types/node to v20.11.16 by @renovate in #688
- Update dependency husky to v9.0.10 by @renovate in #689
- Update dependency prettier to v3.2.5 by @renovate in #692
- Update junit5 monorepo to v5.10.2 by @renovate in #693
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
- @inoue2002 made their first contribution in #691
Full Changelog: v8.2.0...v8.3.0