-
Notifications
You must be signed in to change notification settings - Fork 887
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
feat(types): forbid using default log fn when custom only used (#1998) #1999
feat(types): forbid using default log fn when custom only used (#1998) #1999
Conversation
test/types/pino.ts
Outdated
// @ts-expect-error | ||
loggerCustomLevel.debug('test'); | ||
// @ts-expect-error | ||
loggerCustomLevel.trace('test'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use expectError
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @mcollina. I've moved the type tests to tsd files and used expectError
as recommended!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [pino](https://getpino.io) ([source](https://github.com/pinojs/pino)) | dependencies | minor | [`9.3.2` -> `9.4.0`](https://renovatebot.com/diffs/npm/pino/9.3.2/9.4.0) | --- ### Release Notes <details> <summary>pinojs/pino (pino)</summary> ### [`v9.4.0`](https://github.com/pinojs/pino/releases/tag/v9.4.0) [Compare Source](pinojs/pino@v9.3.2...v9.4.0) #### What's Changed - Drop failing pnpm tests by [@​mcollina](https://github.com/mcollina) in pinojs/pino#2015 - Add bun plugin link to docs by [@​vktrl](https://github.com/vktrl) in pinojs/pino#2016 - build(deps-dev): bump [@​types/node](https://github.com/types/node) from 20.14.13 to 22.0.0 by [@​dependabot](https://github.com/dependabot) in pinojs/pino#2017 - docs: Update transports.md by [@​Imgodmaoyouknow](https://github.com/Imgodmaoyouknow) in pinojs/pino#2027 - build(deps-dev): bump [@​yao-pkg/pkg](https://github.com/yao-pkg/pkg) from 5.12.0 to 5.12.1 by [@​dependabot](https://github.com/dependabot) in pinojs/pino#2031 - feat(types): forbid using default log fn when custom only used ([#​1998](pinojs/pino#1998)) by [@​chernodub](https://github.com/chernodub) in pinojs/pino#1999 - feat: accept level in capitals by [@​balaji-atoa](https://github.com/balaji-atoa) in pinojs/pino#2034 #### New Contributors - [@​vktrl](https://github.com/vktrl) made their first contribution in pinojs/pino#2016 - [@​Imgodmaoyouknow](https://github.com/Imgodmaoyouknow) made their first contribution in pinojs/pino#2027 - [@​chernodub](https://github.com/chernodub) made their first contribution in pinojs/pino#1999 - [@​balaji-atoa](https://github.com/balaji-atoa) made their first contribution in pinojs/pino#2034 **Full Changelog**: pinojs/pino@v9.3.2...v9.4.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), 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. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC42NC4xIiwidXBkYXRlZEluVmVyIjoiMzguNjQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/79 Reviewed-by: Alexandre Soro <code@soro.dev> Co-authored-by: renovate <renovate@git.tristess.app> Co-committed-by: renovate <renovate@git.tristess.app>
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pino](https://getpino.io) ([source](https://github.com/pinojs/pino)) | [`9.3.2` -> `9.4.0`](https://renovatebot.com/diffs/npm/pino/9.3.2/9.4.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pino/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pino/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pino/9.3.2/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pino/9.3.2/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>pinojs/pino (pino)</summary> ### [`v9.4.0`](https://github.com/pinojs/pino/releases/tag/v9.4.0) [Compare Source](https://github.com/pinojs/pino/compare/v9.3.2...v9.4.0) #### What's Changed - Drop failing pnpm tests by [@​mcollina](https://github.com/mcollina) in [https://github.com/pinojs/pino/pull/2015](https://github.com/pinojs/pino/pull/2015) - Add bun plugin link to docs by [@​vktrl](https://github.com/vktrl) in [https://github.com/pinojs/pino/pull/2016](https://github.com/pinojs/pino/pull/2016) - build(deps-dev): bump [@​types/node](https://github.com/types/node) from 20.14.13 to 22.0.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/pinojs/pino/pull/2017](https://github.com/pinojs/pino/pull/2017) - docs: Update transports.md by [@​Imgodmaoyouknow](https://github.com/Imgodmaoyouknow) in [https://github.com/pinojs/pino/pull/2027](https://github.com/pinojs/pino/pull/2027) - build(deps-dev): bump [@​yao-pkg/pkg](https://github.com/yao-pkg/pkg) from 5.12.0 to 5.12.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/pinojs/pino/pull/2031](https://github.com/pinojs/pino/pull/2031) - feat(types): forbid using default log fn when custom only used ([#​1998](https://github.com/pinojs/pino/issues/1998)) by [@​chernodub](https://github.com/chernodub) in [https://github.com/pinojs/pino/pull/1999](https://github.com/pinojs/pino/pull/1999) - feat: accept level in capitals by [@​balaji-atoa](https://github.com/balaji-atoa) in [https://github.com/pinojs/pino/pull/2034](https://github.com/pinojs/pino/pull/2034) #### New Contributors - [@​vktrl](https://github.com/vktrl) made their first contribution in [https://github.com/pinojs/pino/pull/2016](https://github.com/pinojs/pino/pull/2016) - [@​Imgodmaoyouknow](https://github.com/Imgodmaoyouknow) made their first contribution in [https://github.com/pinojs/pino/pull/2027](https://github.com/pinojs/pino/pull/2027) - [@​chernodub](https://github.com/chernodub) made their first contribution in [https://github.com/pinojs/pino/pull/1999](https://github.com/pinojs/pino/pull/1999) - [@​balaji-atoa](https://github.com/balaji-atoa) made their first contribution in [https://github.com/pinojs/pino/pull/2034](https://github.com/pinojs/pino/pull/2034) **Full Changelog**: pinojs/pino@v9.3.2...v9.4.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/redwoodjs/redwood). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pino](https://getpino.io) ([source](https://github.com/pinojs/pino)) | [`9.3.2` -> `9.4.0`](https://renovatebot.com/diffs/npm/pino/9.3.2/9.4.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pino/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pino/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pino/9.3.2/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pino/9.3.2/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>pinojs/pino (pino)</summary> ### [`v9.4.0`](https://github.com/pinojs/pino/releases/tag/v9.4.0) [Compare Source](https://github.com/pinojs/pino/compare/v9.3.2...v9.4.0) #### What's Changed - Drop failing pnpm tests by [@​mcollina](https://github.com/mcollina) in [https://github.com/pinojs/pino/pull/2015](https://github.com/pinojs/pino/pull/2015) - Add bun plugin link to docs by [@​vktrl](https://github.com/vktrl) in [https://github.com/pinojs/pino/pull/2016](https://github.com/pinojs/pino/pull/2016) - build(deps-dev): bump [@​types/node](https://github.com/types/node) from 20.14.13 to 22.0.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/pinojs/pino/pull/2017](https://github.com/pinojs/pino/pull/2017) - docs: Update transports.md by [@​Imgodmaoyouknow](https://github.com/Imgodmaoyouknow) in [https://github.com/pinojs/pino/pull/2027](https://github.com/pinojs/pino/pull/2027) - build(deps-dev): bump [@​yao-pkg/pkg](https://github.com/yao-pkg/pkg) from 5.12.0 to 5.12.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/pinojs/pino/pull/2031](https://github.com/pinojs/pino/pull/2031) - feat(types): forbid using default log fn when custom only used ([#​1998](https://github.com/pinojs/pino/issues/1998)) by [@​chernodub](https://github.com/chernodub) in [https://github.com/pinojs/pino/pull/1999](https://github.com/pinojs/pino/pull/1999) - feat: accept level in capitals by [@​balaji-atoa](https://github.com/balaji-atoa) in [https://github.com/pinojs/pino/pull/2034](https://github.com/pinojs/pino/pull/2034) #### New Contributors - [@​vktrl](https://github.com/vktrl) made their first contribution in [https://github.com/pinojs/pino/pull/2016](https://github.com/pinojs/pino/pull/2016) - [@​Imgodmaoyouknow](https://github.com/Imgodmaoyouknow) made their first contribution in [https://github.com/pinojs/pino/pull/2027](https://github.com/pinojs/pino/pull/2027) - [@​chernodub](https://github.com/chernodub) made their first contribution in [https://github.com/pinojs/pino/pull/1999](https://github.com/pinojs/pino/pull/1999) - [@​balaji-atoa](https://github.com/balaji-atoa) made their first contribution in [https://github.com/pinojs/pino/pull/2034](https://github.com/pinojs/pino/pull/2034) **Full Changelog**: pinojs/pino@v9.3.2...v9.4.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/redwoodjs/redwood). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pino](https://getpino.io) ([source](https://github.com/pinojs/pino)) | [`^9.3.2` -> `^9.4.0`](https://renovatebot.com/diffs/npm/pino/9.3.2/9.4.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pino/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pino/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pino/9.3.2/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pino/9.3.2/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [pino](https://getpino.io) ([source](https://github.com/pinojs/pino)) | [`^9.3.2` -> `^9.4.0`](https://renovatebot.com/diffs/npm/pino/8.17.1/9.4.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pino/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pino/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pino/8.17.1/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pino/8.17.1/9.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>pinojs/pino (pino)</summary> ### [`v9.4.0`](https://github.com/pinojs/pino/releases/tag/v9.4.0) [Compare Source](https://github.com/pinojs/pino/compare/v9.3.2...v9.4.0) #### What's Changed - Drop failing pnpm tests by [@​mcollina](https://github.com/mcollina) in [https://github.com/pinojs/pino/pull/2015](https://github.com/pinojs/pino/pull/2015) - Add bun plugin link to docs by [@​vktrl](https://github.com/vktrl) in [https://github.com/pinojs/pino/pull/2016](https://github.com/pinojs/pino/pull/2016) - build(deps-dev): bump [@​types/node](https://github.com/types/node) from 20.14.13 to 22.0.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/pinojs/pino/pull/2017](https://github.com/pinojs/pino/pull/2017) - docs: Update transports.md by [@​Imgodmaoyouknow](https://github.com/Imgodmaoyouknow) in [https://github.com/pinojs/pino/pull/2027](https://github.com/pinojs/pino/pull/2027) - build(deps-dev): bump [@​yao-pkg/pkg](https://github.com/yao-pkg/pkg) from 5.12.0 to 5.12.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/pinojs/pino/pull/2031](https://github.com/pinojs/pino/pull/2031) - feat(types): forbid using default log fn when custom only used ([#​1998](https://github.com/pinojs/pino/issues/1998)) by [@​chernodub](https://github.com/chernodub) in [https://github.com/pinojs/pino/pull/1999](https://github.com/pinojs/pino/pull/1999) - feat: accept level in capitals by [@​balaji-atoa](https://github.com/balaji-atoa) in [https://github.com/pinojs/pino/pull/2034](https://github.com/pinojs/pino/pull/2034) #### New Contributors - [@​vktrl](https://github.com/vktrl) made their first contribution in [https://github.com/pinojs/pino/pull/2016](https://github.com/pinojs/pino/pull/2016) - [@​Imgodmaoyouknow](https://github.com/Imgodmaoyouknow) made their first contribution in [https://github.com/pinojs/pino/pull/2027](https://github.com/pinojs/pino/pull/2027) - [@​chernodub](https://github.com/chernodub) made their first contribution in [https://github.com/pinojs/pino/pull/1999](https://github.com/pinojs/pino/pull/1999) - [@​balaji-atoa](https://github.com/balaji-atoa) made their first contribution in [https://github.com/pinojs/pino/pull/2034](https://github.com/pinojs/pino/pull/2034) **Full Changelog**: pinojs/pino@v9.3.2...v9.4.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rustymotors/server). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6ImRldiIsImxhYmVscyI6W119-->
Forbids using default log methods when
useOnlyCustomLevels
used.Only improves types, the actual behavior were not changed.
Closes #1998