Releases: line/line-bot-sdk-nodejs
v9.2.2 Fix issue overriding client config
What's Changed
Now this version fixed an issue where passing the client config to the client would result in unconfigured properties being added.
Dependency updates
- Update dependency @types/node to v20.12.8 by @renovate in #837
- Update dependency vite to v5.2.11 by @renovate in #838
- Update vitest monorepo to v1.6.0 by @renovate in #839
- Update dependency @types/node to v20.12.10 by @renovate in #841
Other Changes
Full Changelog: v9.2.1...v9.2.2
v9.2.1 Delete meaningless unknown type
What's Changed
A type indicating Unknown*
were defined for TypeScript but not used, so they have been removed. While this could be considered a breaking change, there should be no existing usage, so we're treating it as a bug fix.
- Remove unknown types from model generator by @wolffparkinson in #834
line-openapi updates
Dependency updates
- Update dependency org.openapitools:openapi-generator-cli to v7.5.0 by @renovate in #823
- Update dependency msw to v2.2.14 by @renovate in #824
- Update dependency vitepress to v1.1.3 by @renovate in #825
- Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.4.1 by @renovate in #826
- Update dependency vite to v5.2.10 by @renovate in #827
- Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.3 by @renovate in #828
- Update vitest monorepo to v1.5.1 by @renovate in #829
- Update vitest monorepo to v1.5.2 by @renovate in #830
- Update dependency vitepress to v1.1.4 by @renovate in #832
- Update vitest monorepo to v1.5.3 by @renovate in #833
New Contributors
- @wolffparkinson made their first contribution in #834
Full Changelog: v9.2.0...v9.2.1
v9.2.0 Loading animation
What's Changed
In the Messaging API, we've added a new endpoint that allows you to display a loading animation. After your LINE Official Account receives a message from a user, the response may takes some time due to message preparation or reservation processing. In such cases, you can visually tell the user that you want them to wait by displaying a loading animation.
news: https://developers.line.biz/en/news/2024/04/17/loading-indicator/
line-openapi updates
- Codes are generated by openapi by @github-actions in #821
Dependency updates
- Update dependency typedoc to v0.25.13 by @renovate in #813
- Update dependency @types/node to v20.12.6 by @renovate in #814
- Update dependency vitepress to v1.1.0 by @renovate in #815
- Update dependency @types/node to v20.12.7 by @renovate in #816
- Update dependency typescript to v5.4.5 by @renovate in #817
- Update vitest monorepo to v1.5.0 by @renovate in #818
- Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.4.0 by @renovate in #819
- Update dependency vite to v5.2.9 by @renovate in #820
Full Changelog: v9.1.0...v9.2.0
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 Drop file-type dependency
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 Drop some dependencies and fix get followers bug
v9.0.1 Add node: prefix for some built-in modules
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