Releases: line/line-bot-sdk-nodejs
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
v8.2.0
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
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
- Bump vite from 5.0.0 to 5.0.5 by @dependabot in #617
Full Changelog: v8.0.2...v8.1.0
8.0.2
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
- Update line-openapi digest to edba1b5 by @renovate in #565
- Update line-openapi digest to 81a963c by @renovate in #566
- Update line-openapi digest to 66b8d8b by @renovate in #592
Dependency updates
- Update dependency nock to v13.3.7 by @renovate in #563
- Update dependency @types/node to v20.8.10 by @renovate in #567
- Update dependency typedoc-plugin-markdown to v3.17.0 by @renovate in #569
- Update dependency msw to v2.0.3 by @renovate in #571
- Update junit5 monorepo to v5.10.1 by @renovate in #574
- Update dependency typedoc-plugin-markdown to v3.17.1 by @renovate in #575
- Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.2.2 by @renovate in #576
- Update dependency @types/body-parser to v1.19.5 by @renovate in #577
- Update dependency @types/express to v4.17.21 by @renovate in #578
- Update dependency @types/finalhandler to v1.2.3 by @renovate in #579
- Update dependency @types/mocha to v10.0.4 by @renovate in #580
- Update dependency @types/node to v20.9.0 by @renovate in #581
- Update dependency axios to v1.6.1 by @renovate in #583
- Update dependency msw to v2.0.4 by @renovate in #584
- Update dependency msw to v2.0.5 by @renovate in #585
- Update dependency vuepress to v2.0.0-beta.68 by @renovate in #586
- Update dependency msw to v2.0.6 by @renovate in #588
- Update dependency prettier to v3.1.0 by @renovate in #589
- Update dependency org.openapitools:openapi-generator to v7.1.0 by @renovate in #590
- Update dependency axios to v1.6.2 by @renovate in #591
- Update dependency msw to v2.0.7 by @renovate in #593
- Update dependency vuepress to v2.0.0-rc.0 by @renovate in #594
- Update dependency @types/node to v20.9.1 by @renovate in #595
- Update dependency msw to v2.0.8 by @renovate in #596
- Update dependency @types/node to v20.9.2 by @renovate in #599
- Update dependency @types/mocha to v10.0.5 by @renovate in #602
Other Changes
- Add build-sdk command in echo-bot-ts example by @Yang-33 in #556
- Enable merge queue by @Yang-33 in #562
- Include openapi-generator-cli in custom generator. by @tokuhirom in #564
- Do not run nyc on
npm test
task. by @tokuhirom in #570 - Use MSW instead of nock. by @tokuhirom in #568
- extend middleware test timeout by @tokuhirom in #573
- Apply prettier by @tokuhirom in #572
Full Changelog: v8.0.1...v8.0.2