Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve setErrorHandler example #4484

Merged
merged 4 commits into from Jan 1, 2023
Merged

Conversation

trim21
Copy link
Contributor

@trim21 trim21 commented Dec 27, 2022

Checklist

The example in document will make fastify never send a response if handle throw a error which is not expected error. For example if a handle throw new Error(...). Original document is not clear about this and example doesn't handle it.

Original document make me confused, I assumed that rest of errors will be handled automatically without returning them, but turns out it doesn't. I'm not sure if "error handler return unhanded error and pop them to parent handler" it expected behavior, but looks like it is, so I create this pr to fix them example. And if it's, I hope the document of setErrorHandler could be updated to o, so users can know they can pop error to default error handler. https://www.fastify.io/docs/latest/Reference/Server/#seterrorhandler

like this: GET /bad-case

fastify.get('/', function(request, reply) {
  reply.code('bad status code').send({ hello: 'world' })
});

fastify.get('/bad-case', function(request, reply) {
  throw new Error("");
});


fastify.setErrorHandler(function(error, request, reply) {
  if (error instanceof Fastify.errorCodes.FST_ERR_BAD_STATUS_CODE) {
    // Log error
    this.log.error(error);
    // Send error response
    reply.status(500).send({ ok: false });
  }
});

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 27, 2022
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina requested a review from Fdawgs December 28, 2022 18:32
@trim21
Copy link
Contributor Author

trim21 commented Dec 29, 2022

@Fdawgs your suggestions doesn't show

@Fdawgs
Copy link
Member

Fdawgs commented Dec 29, 2022

@Fdawgs your suggestions doesn't show

Yeah something was up when doing it on mobile.
Will review properly next week when back from leave and at a computer.

@trim21
Copy link
Contributor Author

trim21 commented Dec 29, 2022

@Fdawgs your suggestions doesn't show

Yeah something was up when doing it on mobile. Will review properly next week when back from leave and at a computer.

I find your suggestions in notification email

@trim21
Copy link
Contributor Author

trim21 commented Dec 29, 2022

@Fdawgs you suggest to replace return error with throw error, but I don't think it's a good idea.

If user error handler return error, fastify will use default error handler to handle it and send a response, but if it throw error, fastify will exit and throw this error, this is documented behavior in onResponse about circular error.

@climba03003
Copy link
Member

return error and throw error should be the same in custom error handler.

@trim21
Copy link
Contributor Author

trim21 commented Dec 29, 2022

return error and throw error should be the same in custom error handler.

No, maybe they should, but they don't.

Try this:

main.mjs

import Fastify from 'fastify';
import * as http from 'http';

const fastify = Fastify();

fastify.get('/', async (request, reply) => {
  throw new Error("tt");
});


fastify.setErrorHandler(function(error, request, reply) {
  throw error;
});

console.log(await fastify.listen({ port: 4000, host: '127.0.0.1' }));

http.request('http://127.0.0.1:4000');

(latest fastify version, 4.10.2)

But it works with return error

@climba03003
Copy link
Member

Interesting, but given as the example itself. It does work.

import Fastify from 'fastify';

const fastify = Fastify({ logger: false })

fastify.get('/', function(request, reply) {
  reply.code('bad status code').send({ hello: 'world' })
});

fastify.get('/bad-case', function(request, reply) {
  throw new Error("bad-case");
});


fastify.setErrorHandler(function(error, request, reply) {
  if (error instanceof Fastify.errorCodes.FST_ERR_BAD_STATUS_CODE) {
    // Send error response
    reply.status(500).send({ ok: false });
  } else {
    throw error
  }
});

{
  const { statusCode, payload } = await fastify.inject('/')
  console.log(statusCode, payload)
}

{
  const { statusCode, payload } = await fastify.inject('/bad-case')
  console.log(statusCode, payload)
}

@trim21
Copy link
Contributor Author

trim21 commented Dec 29, 2022

@climba03003 you need to use async handler

@trim21
Copy link
Contributor Author

trim21 commented Dec 29, 2022

- fastify.get('/bad-case', function(request, reply) {
+ fastify.get('/bad-case', async function(request, reply) {
  throw new Error("bad-case");
});

@trim21
Copy link
Contributor Author

trim21 commented Dec 29, 2022

this will trigger node:internal/process/promises:288 triggerUncaughtException(err, true /* fromPromise */);

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: err
    at Object.<anonymous> (c:\Users\Trim21\proj\bangumi\graphql\lib\server.ts:66:11)
    at preHandlerCallback (c:\Users\Trim21\proj\bangumi\graphql\node_modules\fastify\lib\handleRequest.js:128:37)
    at preValidationCallback (c:\Users\Trim21\proj\bangumi\graphql\node_modules\fastify\lib\handleRequest.js:112:5)
    at handler (c:\Users\Trim21\proj\bangumi\graphql\node_modules\fastify\lib\handleRequest.js:76:7)
    at handleRequest (c:\Users\Trim21\proj\bangumi\graphql\node_modules\fastify\lib\handleRequest.js:24:5)
    at runPreParsing (c:\Users\Trim21\proj\bangumi\graphql\node_modules\fastify\lib\route.js:528:5)
    at Object.routeHandler (c:\Users\Trim21\proj\bangumi\graphql\node_modules\fastify\lib\route.js:475:7)
    at Router.callHandler (c:\Users\Trim21\proj\bangumi\graphql\node_modules\find-my-way\index.js:413:14)
    at Router.lookup (c:\Users\Trim21\proj\bangumi\graphql\node_modules\find-my-way\index.js:391:17)
    at Server.preRouting (c:\Users\Trim21\proj\bangumi\graphql\node_modules\fastify\fastify.js:773:14)

@trim21
Copy link
Contributor Author

trim21 commented Dec 29, 2022

Interesting, but given as the example itself. It does work.

This may be a bug?

@climba03003
Copy link
Member

This may be a bug?

I would say yes, it just fall into some edge case that can actually crash the problem.
It creates an error that never able to be catch by the users.

Let see what the others say. @fastify/core

@trim21
Copy link
Contributor Author

trim21 commented Dec 29, 2022

them I think it should be return error in this PR, considering throwing error has potential bug. 🤔

Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@trim21
Copy link
Contributor Author

trim21 commented Dec 29, 2022

About this bug, you can throw error from both sync/async handler in async error Handler, this is expected behavior

This works find in all case

fastify.setErrorHandler(async function(error, request, reply) {
  if (error instanceof Fastify.errorCodes.FST_ERR_BAD_STATUS_CODE) {
    // Send error response
    return reply.status(500).send({ ok: false });
  }

  throw error;
});

But you can't throw error from async handler in sync error handler

BUG:

fastify.get('/bad-case', async function(request, reply) {
  throw new Error("bad-case");
});


fastify.setErrorHandler(function(error, request, reply) {
  if (error instanceof Fastify.errorCodes.FST_ERR_BAD_STATUS_CODE) {
    // Send error response
    return reply.status(500).send({ ok: false });
  }

  throw error;
});

@climba03003 climba03003 mentioned this pull request Dec 29, 2022
4 tasks
@mcollina mcollina merged commit 0557c0a into fastify:main Jan 1, 2023
@trim21 trim21 deleted the error-handler-example branch January 1, 2023 22:33
ddadaal pushed a commit to PKUHPC/SCOW that referenced this pull request Jan 3, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/jest](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) |
[`29.2.4` ->
`29.2.5`](https://renovatebot.com/diffs/npm/@types%2fjest/29.2.4/29.2.5)
|
[![age](https://badges.renovateapi.com/packages/npm/@types%2fjest/29.2.5/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@types%2fjest/29.2.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@types%2fjest/29.2.5/compatibility-slim/29.2.4)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@types%2fjest/29.2.5/confidence-slim/29.2.4)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/typescript-eslint)
| [`5.47.1` ->
`5.48.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/5.47.1/5.48.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@typescript-eslint%2feslint-plugin/5.48.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@typescript-eslint%2feslint-plugin/5.48.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@typescript-eslint%2feslint-plugin/5.48.0/compatibility-slim/5.47.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@typescript-eslint%2feslint-plugin/5.48.0/confidence-slim/5.47.1)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@typescript-eslint/parser](https://togithub.com/typescript-eslint/typescript-eslint)
| [`5.47.1` ->
`5.48.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/5.47.1/5.48.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@typescript-eslint%2fparser/5.48.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@typescript-eslint%2fparser/5.48.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@typescript-eslint%2fparser/5.48.0/compatibility-slim/5.47.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@typescript-eslint%2fparser/5.48.0/confidence-slim/5.47.1)](https://docs.renovatebot.com/merge-confidence/)
|
| [antd](https://ant.design)
([source](https://togithub.com/ant-design/ant-design)) | [`5.1.1` ->
`5.1.2`](https://renovatebot.com/diffs/npm/antd/5.1.1/5.1.2) |
[![age](https://badges.renovateapi.com/packages/npm/antd/5.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/antd/5.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/antd/5.1.2/compatibility-slim/5.1.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/antd/5.1.2/confidence-slim/5.1.1)](https://docs.renovatebot.com/merge-confidence/)
|
| [eslint](https://eslint.org)
([source](https://togithub.com/eslint/eslint)) | [`8.30.0` ->
`8.31.0`](https://renovatebot.com/diffs/npm/eslint/8.30.0/8.31.0) |
[![age](https://badges.renovateapi.com/packages/npm/eslint/8.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/eslint/8.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/eslint/8.31.0/compatibility-slim/8.30.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/eslint/8.31.0/confidence-slim/8.30.0)](https://docs.renovatebot.com/merge-confidence/)
|
| [fastify](https://www.fastify.io/)
([source](https://togithub.com/fastify/fastify)) | [`4.10.2` ->
`4.11.0`](https://renovatebot.com/diffs/npm/fastify/4.10.2/4.11.0) |
[![age](https://badges.renovateapi.com/packages/npm/fastify/4.11.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/fastify/4.11.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/fastify/4.11.0/compatibility-slim/4.10.2)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/fastify/4.11.0/confidence-slim/4.10.2)](https://docs.renovatebot.com/merge-confidence/)
|
| [husky](https://typicode.github.io/husky)
([source](https://togithub.com/typicode/husky)) | [`8.0.2` ->
`8.0.3`](https://renovatebot.com/diffs/npm/husky/8.0.2/8.0.3) |
[![age](https://badges.renovateapi.com/packages/npm/husky/8.0.3/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/husky/8.0.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/husky/8.0.3/compatibility-slim/8.0.2)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/husky/8.0.3/confidence-slim/8.0.2)](https://docs.renovatebot.com/merge-confidence/)
|
| [jest-extended](https://togithub.com/jest-community/jest-extended) |
[`3.2.0` ->
`3.2.1`](https://renovatebot.com/diffs/npm/jest-extended/3.2.0/3.2.1) |
[![age](https://badges.renovateapi.com/packages/npm/jest-extended/3.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/jest-extended/3.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/jest-extended/3.2.1/compatibility-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/jest-extended/3.2.1/confidence-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/)
|
| [liquidjs](https://togithub.com/harttle/liquidjs) | [`10.3.3` ->
`10.4.0`](https://renovatebot.com/diffs/npm/liquidjs/10.3.3/10.4.0) |
[![age](https://badges.renovateapi.com/packages/npm/liquidjs/10.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/liquidjs/10.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/liquidjs/10.4.0/compatibility-slim/10.3.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/liquidjs/10.4.0/confidence-slim/10.3.3)](https://docs.renovatebot.com/merge-confidence/)
|
| [tsconfig-paths](https://togithub.com/dividab/tsconfig-paths) |
[`4.1.1` ->
`4.1.2`](https://renovatebot.com/diffs/npm/tsconfig-paths/4.1.1/4.1.2) |
[![age](https://badges.renovateapi.com/packages/npm/tsconfig-paths/4.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/tsconfig-paths/4.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/tsconfig-paths/4.1.2/compatibility-slim/4.1.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/tsconfig-paths/4.1.2/confidence-slim/4.1.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>typescript-eslint/typescript-eslint
(@&#8203;typescript-eslint/eslint-plugin)</summary>

###
[`v5.48.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#&#8203;5480-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5471v5480-2023-01-02)

[Compare
Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0)

##### Features

- **eslint-plugin:** specify which method is unbound and added test case
([#&#8203;6281](https://togithub.com/typescript-eslint/typescript-eslint/issues/6281))
([cf3ffdd](https://togithub.com/typescript-eslint/typescript-eslint/commit/cf3ffdd49aceb734ce18dc44ed6a11f7701f178e))

####
[5.47.1](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1)
(2022-12-26)

##### Bug Fixes

- **ast-spec:** correct some incorrect ast types
([#&#8203;6257](https://togithub.com/typescript-eslint/typescript-eslint/issues/6257))
([0f3f645](https://togithub.com/typescript-eslint/typescript-eslint/commit/0f3f64571ea5d938081b1a9f3fd1495765201700))
- **eslint-plugin:** \[member-ordering] correctly invert
optionalityOrder
([#&#8203;6256](https://togithub.com/typescript-eslint/typescript-eslint/issues/6256))
([ccd45d4](https://togithub.com/typescript-eslint/typescript-eslint/commit/ccd45d4a998946b7be1161f8c8216bc458e50b4e))

</details>

<details>
<summary>typescript-eslint/typescript-eslint
(@&#8203;typescript-eslint/parser)</summary>

###
[`v5.48.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#&#8203;5480-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5471v5480-2023-01-02)

[Compare
Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0)

**Note:** Version bump only for package
[@&#8203;typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)

####
[5.47.1](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1)
(2022-12-26)

**Note:** Version bump only for package
[@&#8203;typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)

</details>

<details>
<summary>ant-design/ant-design</summary>

###
[`v5.1.2`](https://togithub.com/ant-design/ant-design/releases/tag/5.1.2)

[Compare
Source](https://togithub.com/ant-design/ant-design/compare/5.1.1...5.1.2)

- 🆕 Theme Editor supports uploading themes.
[#&#8203;39621](https://togithub.com/ant-design/ant-design/pull/39621)
[@&#8203;BoyYangzai](https://togithub.com/BoyYangzai)
- 💄 Refactor wave effect that can now trigger multiple times.
[#&#8203;39705](https://togithub.com/ant-design/ant-design/pull/39705)
[@&#8203;li-jia-nan](https://togithub.com/li-jia-nan)
-   Table
- 🐞 Fix Table `column.filtered` cannot be updated.
[#&#8203;39883](https://togithub.com/ant-design/ant-design/pull/39883)
- 🐞 Fix Table fixed column which is sorted or filtered transparent
background bug.
[#&#8203;39012](https://togithub.com/ant-design/ant-design/pull/39012)
[@&#8203;kiner-tang](https://togithub.com/kiner-tang)
- 🐞 Fix Image preview style conflict with TailwindCSS.
[#&#8203;39914](https://togithub.com/ant-design/ant-design/pull/39914)
- 🐞 Fix Dropdown `danger` and `disabled` style priority bug.
[#&#8203;39904](https://togithub.com/ant-design/ant-design/pull/39904)
[@&#8203;Wxh16144](https://togithub.com/Wxh16144)
- 🐞 Fix App.useApp `modal` default `okText`.
[#&#8203;39884](https://togithub.com/ant-design/ant-design/pull/39884)
[@&#8203;BoyYangzai](https://togithub.com/BoyYangzai)
- 💄 Fix Input.Group misplace style when zoom up in windows.
[#&#8203;39842](https://togithub.com/ant-design/ant-design/pull/39842)
[@&#8203;heiyu4585](https://togithub.com/heiyu4585)
- 🐞 Fix Slider missing Tooltip appear motion.
[#&#8203;39857](https://togithub.com/ant-design/ant-design/pull/39857)
- 🐞 Fix QRCode missing expired style.
[#&#8203;39849](https://togithub.com/ant-design/ant-design/pull/39849)
[@&#8203;li-jia-nan](https://togithub.com/li-jia-nan)
- 🐞 Fix Tree switcher's background display unexpected in dark theme.
[#&#8203;39838](https://togithub.com/ant-design/ant-design/pull/39838)
[@&#8203;kiner-tang](https://togithub.com/kiner-tang)
- 🐞 Fix Menu slide bar style issue when `border` is reset by preset.
[#&#8203;39819](https://togithub.com/ant-design/ant-design/pull/39819)
[@&#8203;MadCcc](https://togithub.com/MadCcc)
- 🐞 Fix Checkbox not support Tooltip or Popover when it is `disabled`.
[#&#8203;39829](https://togithub.com/ant-design/ant-design/pull/39829)

***

- 🆕
官网主题编辑器添加主题上传功能。[#&#8203;39621](https://togithub.com/ant-design/ant-design/pull/39621)
[@&#8203;BoyYangzai](https://togithub.com/BoyYangzai)
- 💄
重构水波纹视效,现在可以多个水波纹同时触发了。[#&#8203;39705](https://togithub.com/ant-design/ant-design/pull/39705)
[@&#8203;li-jia-nan](https://togithub.com/li-jia-nan)
-   Table
- 🐞 修复 Table `column.filtered`
更新不生效的问题。[#&#8203;39883](https://togithub.com/ant-design/ant-design/pull/39883)
- 🐞 修复 Table
排序/筛选的固定列背景色透明的样式异常问题。[#&#8203;39012](https://togithub.com/ant-design/ant-design/pull/39012)
[@&#8203;kiner-tang](https://togithub.com/kiner-tang)
- 🐞 解决 Image 预览样式会被 TailwindCSS
影响的问题。[#&#8203;39914](https://togithub.com/ant-design/ant-design/pull/39914)
- 🐞 修复 Dropdown 组件 `danger` 和 `disabled`
属性同时使用的样式问题。[#&#8203;39904](https://togithub.com/ant-design/ant-design/pull/39904)
[@&#8203;Wxh16144](https://togithub.com/Wxh16144)
- 🐞 修复 App `useApp` 中 `modal`
确认按钮文案。[#&#8203;39884](https://togithub.com/ant-design/ant-design/pull/39884)
[@&#8203;BoyYangzai](https://togithub.com/BoyYangzai)
- 🐞 修复 Input.Group 在 windows
下缩放屏幕时的错位问题。[#&#8203;39842](https://togithub.com/ant-design/ant-design/pull/39842)
[@&#8203;heiyu4585](https://togithub.com/heiyu4585)
- 🐞 修复 Slider 展示 Tooltip
时动画丢失的问题。[#&#8203;39857](https://togithub.com/ant-design/ant-design/pull/39857)
- 🐞 修复 QRCode
过期文案在暗色模式下看不清的问题。[#&#8203;39849](https://togithub.com/ant-design/ant-design/pull/39849)
[@&#8203;li-jia-nan](https://togithub.com/li-jia-nan)
- 🐞 修复 Tree 在暗黑模式下 `switcher`
背景显示异常问题。[#&#8203;39838](https://togithub.com/ant-design/ant-design/pull/39838)
[@&#8203;kiner-tang](https://togithub.com/kiner-tang)
- 🐞 修复 Menu 组件滑块在 `border`
被预设值重置时的样式问题。[#&#8203;39819](https://togithub.com/ant-design/ant-design/pull/39819)
- 🐞 修复 Checkbox 禁用时不支持 Tooltip 和 Popover
的问题。[#&#8203;39829](https://togithub.com/ant-design/ant-design/pull/39829)

</details>

<details>
<summary>eslint/eslint</summary>

### [`v8.31.0`](https://togithub.com/eslint/eslint/releases/tag/v8.31.0)

[Compare
Source](https://togithub.com/eslint/eslint/compare/v8.30.0...v8.31.0)

#### Features

-
[`52c7c73`](https://togithub.com/eslint/eslint/commit/52c7c73c052e1ec2528c6b4af78181bc30cf8cdd)
feat: check assignment patterns in no-underscore-dangle
([#&#8203;16693](https://togithub.com/eslint/eslint/issues/16693))
(Milos Djermanovic)
-
[`b401cde`](https://togithub.com/eslint/eslint/commit/b401cde47d44746ff91b8feced3fb3a4e32c0e12)
feat: add options to check destructuring in no-underscore-dangle
([#&#8203;16006](https://togithub.com/eslint/eslint/issues/16006))
(Morten Kaltoft)
-
[`30d0daf`](https://togithub.com/eslint/eslint/commit/30d0daf55e85a412995f6d69f47cab3fb591f2c3)
feat: group properties with values in parentheses in `key-spacing`
([#&#8203;16677](https://togithub.com/eslint/eslint/issues/16677))
(Francesco Trotta)

#### Bug Fixes

-
[`35439f1`](https://togithub.com/eslint/eslint/commit/35439f1572e1a8888f7feb6c5e51a15b5582495d)
fix: correct syntax error in `prefer-arrow-callback` autofix
([#&#8203;16722](https://togithub.com/eslint/eslint/issues/16722))
(Francesco Trotta)
-
[`87b2470`](https://togithub.com/eslint/eslint/commit/87b247058ed520061fe1a146b7f0e7072a94990d)
fix: new instance of FlatESLint should load latest config file version
([#&#8203;16608](https://togithub.com/eslint/eslint/issues/16608))
(Milos Djermanovic)

#### Documentation

-
[`4339dc4`](https://togithub.com/eslint/eslint/commit/4339dc462d78888fe2e10acdfacd6f57245ce6ae)
docs: Update README (GitHub Actions Bot)
-
[`4e4049c`](https://togithub.com/eslint/eslint/commit/4e4049c5fa355b2091afc8948690fcd7b1c1e6df)
docs: optimize code block structure
([#&#8203;16669](https://togithub.com/eslint/eslint/issues/16669)) (Sam
Chen)
-
[`54a7ade`](https://togithub.com/eslint/eslint/commit/54a7ade5d8e6f59554afeb9202ba6143f8afdf57)
docs: do not escape code blocks of formatters examples
([#&#8203;16719](https://togithub.com/eslint/eslint/issues/16719)) (Sam
Chen)
-
[`e5ecfef`](https://togithub.com/eslint/eslint/commit/e5ecfefa1c952195a3a8371f5953cc655d844079)
docs: Add function call example for no-undefined
([#&#8203;16712](https://togithub.com/eslint/eslint/issues/16712))
(Elliot Huffman)
-
[`a3262f0`](https://togithub.com/eslint/eslint/commit/a3262f0a6305d2a721fac137a60c62c019b26aa4)
docs: Add mastodon link
([#&#8203;16638](https://togithub.com/eslint/eslint/issues/16638))
(Amaresh S M)
-
[`a14ccf9`](https://togithub.com/eslint/eslint/commit/a14ccf91af1122e419710f58ef494980fc4894b3)
docs: clarify files property
([#&#8203;16709](https://togithub.com/eslint/eslint/issues/16709)) (Sam
Chen)
-
[`3b29eb1`](https://togithub.com/eslint/eslint/commit/3b29eb14e00182614c986d8498b483a9917976e7)
docs: fix npm link
([#&#8203;16710](https://togithub.com/eslint/eslint/issues/16710))
(Abdullah Osama)
-
[`a638673`](https://togithub.com/eslint/eslint/commit/a638673ee6e94344c46d12dfc988adeb3783f817)
docs: fix search bar focus on `Esc`
([#&#8203;16700](https://togithub.com/eslint/eslint/issues/16700))
(Shanmughapriyan S)
-
[`f62b722`](https://togithub.com/eslint/eslint/commit/f62b722251858a5dfb157591910edbaaeb4a966f)
docs: country flag missing in windows
([#&#8203;16698](https://togithub.com/eslint/eslint/issues/16698))
(Shanmughapriyan S)
-
[`4d27ec6`](https://togithub.com/eslint/eslint/commit/4d27ec6019847afabeebf592dddc014e9220057c)
docs: display zh-hans in the docs language switcher
([#&#8203;16686](https://togithub.com/eslint/eslint/issues/16686))
(Percy Ma)
-
[`8bda20e`](https://togithub.com/eslint/eslint/commit/8bda20e8276c6ba17d31842fcdd63ba65476fbbd)
docs: remove manually maintained anchors
([#&#8203;16685](https://togithub.com/eslint/eslint/issues/16685))
(Percy Ma)
-
[`b68440f`](https://togithub.com/eslint/eslint/commit/b68440ff2b8322fc00373792701169205c94ed94)
docs: User Guide Getting Started expansion
([#&#8203;16596](https://togithub.com/eslint/eslint/issues/16596)) (Ben
Perlmutter)

#### Chores

-
[`65d4e24`](https://togithub.com/eslint/eslint/commit/65d4e24c36367cd63f0eba7371820e0e81dae7aa)
chore: Upgrade
[@&#8203;eslint/eslintrc](https://togithub.com/eslint/eslintrc)[@&#8203;1](https://togithub.com/1).4.1
([#&#8203;16729](https://togithub.com/eslint/eslint/issues/16729))
(Brandon Mills)
-
[`8d93081`](https://togithub.com/eslint/eslint/commit/8d93081a717f6e8b8cb60c3075cc1d7e4e655e6b)
chore: fix CI failure
([#&#8203;16721](https://togithub.com/eslint/eslint/issues/16721)) (Sam
Chen)
-
[`8f17247`](https://togithub.com/eslint/eslint/commit/8f17247a93240ff8a08980d8e06352e4ff4e8fe3)
chore: Set up automatic updating of README
([#&#8203;16717](https://togithub.com/eslint/eslint/issues/16717))
(Nicholas C. Zakas)
-
[`4cd87cb`](https://togithub.com/eslint/eslint/commit/4cd87cb3c52412277577ba00c4fbb1aec36acc8c)
ci: bump actions/stale from 6 to 7
([#&#8203;16713](https://togithub.com/eslint/eslint/issues/16713))
(dependabot\[bot])
-
[`fd20c75`](https://togithub.com/eslint/eslint/commit/fd20c75b1059c54d598c0abaf63e7d7a80f04f32)
chore: sort package.json scripts in alphabetical order
([#&#8203;16705](https://togithub.com/eslint/eslint/issues/16705))
(Darius Dzien)
-
[`10a5c78`](https://togithub.com/eslint/eslint/commit/10a5c7839370219c79f44d4206cbd7c28a72bad5)
chore: update ignore patterns in `eslint.config.js`
([#&#8203;16678](https://togithub.com/eslint/eslint/issues/16678))
(Milos Djermanovic)

</details>

<details>
<summary>fastify/fastify</summary>

###
[`v4.11.0`](https://togithub.com/fastify/fastify/releases/tag/v4.11.0)

[Compare
Source](https://togithub.com/fastify/fastify/compare/v4.10.2...v4.11.0)

##### What's Changed

- fix: use generic for Logger to register plugins when using a custom
logger
([#&#8203;4435](https://togithub.com/fastify/fastify/issues/4435)) by
[@&#8203;marcoreni](https://togithub.com/marcoreni) in
[fastify/fastify#4436
- Incorrect example in default text parser docs by
[@&#8203;SaumyaBhushan](https://togithub.com/SaumyaBhushan) in
[fastify/fastify#4448
- chore: fix test skips for nodejs prereleases by
[@&#8203;nlf](https://togithub.com/nlf) in
[fastify/fastify#4449
- Move [@&#8203;Ethan-Arrowood](https://togithub.com/Ethan-Arrowood) to
Past Collaborator section by
[@&#8203;Ethan-Arrowood](https://togithub.com/Ethan-Arrowood) in
[fastify/fastify#4451
- build(deps): bump lycheeverse/lychee-action from 1.5.1 to 1.5.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/fastify#4454
- build(deps): bump actions/dependency-review-action from 2 to 3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/fastify#4455
- build(deps-dev): bump tsd from 0.24.1 to 0.25.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/fastify#4460
- docs: add fastify-user-agent by
[@&#8203;Eomm](https://togithub.com/Eomm) in
[fastify/fastify#4466
- chore(ecosystem): rename fastify-lyra plugin by
[@&#8203;mateonunez](https://togithub.com/mateonunez) in
[fastify/fastify#4474
- docs(ecosystem): add fastify-at-mysql plugin by
[@&#8203;mateonunez](https://togithub.com/mateonunez) in
[fastify/fastify#4473
- fix: make res.statusCode optional by
[@&#8203;polRk](https://togithub.com/polRk) in
[fastify/fastify#4471
- docs(ecosystem): add fastify-at-postgres plugin by
[@&#8203;mateonunez](https://togithub.com/mateonunez) in
[fastify/fastify#4475
- perf: precompute isEssence for RegExp of content-type-parser method
compareRegExpContentType by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[fastify/fastify#4481
- lib: deprecate the default route and improve its documentation by
[@&#8203;RafaelGSS](https://togithub.com/RafaelGSS) in
[fastify/fastify#4480
- docs(reference/reply): When using async-await, need return by
[@&#8203;radiorz](https://togithub.com/radiorz) in
[fastify/fastify#4429
- fix: re-thrown error crash by
[@&#8203;climba03003](https://togithub.com/climba03003) in
[fastify/fastify#4488
- build(deps): bump thollander/actions-comment-pull-request from 1 to 2
by [@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/fastify#4489
- build(deps): bump xt0rted/markdownlint-problem-matcher from 1.1.0 to
2.0.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[fastify/fastify#4490
- improve `setErrorHandler` example by
[@&#8203;trim21](https://togithub.com/trim21) in
[fastify/fastify#4484

##### New Contributors

- [@&#8203;marcoreni](https://togithub.com/marcoreni) made their first
contribution in
[fastify/fastify#4436
- [@&#8203;SaumyaBhushan](https://togithub.com/SaumyaBhushan) made their
first contribution in
[fastify/fastify#4448
- [@&#8203;nlf](https://togithub.com/nlf) made their first contribution
in
[fastify/fastify#4449
- [@&#8203;polRk](https://togithub.com/polRk) made their first
contribution in
[fastify/fastify#4471
- [@&#8203;radiorz](https://togithub.com/radiorz) made their first
contribution in
[fastify/fastify#4429
- [@&#8203;trim21](https://togithub.com/trim21) made their first
contribution in
[fastify/fastify#4484

**Full Changelog**:
fastify/fastify@v4.10.2...v4.11.0

</details>

<details>
<summary>typicode/husky</summary>

### [`v8.0.3`](https://togithub.com/typicode/husky/releases/tag/v8.0.3)

[Compare
Source](https://togithub.com/typicode/husky/compare/v8.0.2...v8.0.3)

- fix: add git not installed message
[#&#8203;1208](https://togithub.com/typicode/husky/issues/1208)

</details>

<details>
<summary>jest-community/jest-extended</summary>

###
[`v3.2.1`](https://togithub.com/jest-community/jest-extended/releases/tag/v3.2.1)

[Compare
Source](https://togithub.com/jest-community/jest-extended/compare/v3.2.0...v3.2.1)

#### What's Changed

- Change return type in Expect interface to void by
[@&#8203;keeganwitt](https://togithub.com/keeganwitt) in
[jest-community/jest-extended#535
- Create pass/fail error messages only if required by
[@&#8203;overlookmotel](https://togithub.com/overlookmotel) in
[jest-community/jest-extended#545

#### New Contributors

- [@&#8203;verdecchia](https://togithub.com/verdecchia) made their first
contribution in
[jest-community/jest-extended#541
- [@&#8203;Unclemortuary](https://togithub.com/Unclemortuary) made their
first contribution in
[jest-community/jest-extended#540

**Full Changelog**:
jest-community/jest-extended@v3.2.0...v3.2.1

</details>

<details>
<summary>harttle/liquidjs</summary>

###
[`v10.4.0`](https://togithub.com/harttle/liquidjs/blob/HEAD/CHANGELOG.md#&#8203;1040-httpsgithubcomharttleliquidjscomparev1033v1040-2023-01-02)

[Compare
Source](https://togithub.com/harttle/liquidjs/compare/v10.3.3...v10.4.0)

##### Features

- support `not` operator,
[#&#8203;575](https://togithub.com/harttle/liquidjs/issues/575)
([3f21382](https://togithub.com/harttle/liquidjs/commit/3f21382d43cafa1e32162e58adabd22d5c3709ed))
- support calling `date` without format string,
[#&#8203;573](https://togithub.com/harttle/liquidjs/issues/573)
([aafaa0b](https://togithub.com/harttle/liquidjs/commit/aafaa0b4f9e84f466fbcc2cb2ae37fe8704c5272))

####
[10.3.3](https://togithub.com/harttle/liquidjs/compare/v10.3.2...v10.3.3)
(2022-12-18)

##### Bug Fixes

- type compatible with v9 tag definition, support `Context` as scope in
various render APIs,
[#&#8203;570](https://togithub.com/harttle/liquidjs/issues/570)
([fb6a9f8](https://togithub.com/harttle/liquidjs/commit/fb6a9f8717cd57522d53687da7e4718b28a7f68a))

####
[10.3.2](https://togithub.com/harttle/liquidjs/compare/v10.3.1...v10.3.2)
(2022-12-13)

##### Bug Fixes

- re-export error classes,
[#&#8203;569](https://togithub.com/harttle/liquidjs/issues/569)
([2663ee1](https://togithub.com/harttle/liquidjs/commit/2663ee16a066c74cbd387fe40154fdeb2136f35a))

####
[10.3.1](https://togithub.com/harttle/liquidjs/compare/v10.3.0...v10.3.1)
(2022-12-12)

##### Bug Fixes

- support `Context` as `evalValue` parameter,
[#&#8203;568](https://togithub.com/harttle/liquidjs/issues/568)
([0f4916b](https://togithub.com/harttle/liquidjs/commit/0f4916bc5a93f5e744e4246336c68f2e89774272))

</details>

<details>
<summary>dividab/tsconfig-paths</summary>

###
[`v4.1.2`](https://togithub.com/dividab/tsconfig-paths/blob/HEAD/CHANGELOG.md#&#8203;412---2023-01-02)

[Compare
Source](https://togithub.com/dividab/tsconfig-paths/compare/v4.1.1...v4.1.2)

##### Fixed

- Bump JSON5 dependency to 2.2.2 to fix CVE-2022-46175. See PR
[#&#8203;232](https://togithub.com/dividab/tsconfig-paths/pull/232).
Thanks to [@&#8203;oparisblue](https://togithub.com/oparisblue) for this
PR!

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/PKUHPC/SCOW).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC43NC4yIiwidXBkYXRlZEluVmVyIjoiMzQuNzQuMiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Copy link

github-actions bot commented Jan 3, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants