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

fix: typescript types #1783

Merged
merged 12 commits into from Dec 13, 2023
Merged

fix: typescript types #1783

merged 12 commits into from Dec 13, 2023

Conversation

Zamiell
Copy link
Contributor

@Zamiell Zamiell commented Aug 12, 2023

Fixes #1782

The PR causes an error in one of the existing tests:

image

It's line 312 in "pino.test-d.ts". I don't understand the error or what it is supposed to be testing. Can anyone shed some light on this?

EDIT:

  • See THIS COMMENT if you are here about logging in try / catch blocks or logging unknown.
  • See THIS COMMENT if you are here about providing the first generic type param to the logger in order to validate an object.

@Zamiell Zamiell changed the title Types fix: typescript types Aug 12, 2023
@Zamiell
Copy link
Contributor Author

Zamiell commented Aug 12, 2023

Oh, I think I understand the error, due to my changes the TypeScript compiler is actually catching the runtime error that the code is intentionally performing, LOL.

@Zamiell
Copy link
Contributor Author

Zamiell commented Aug 12, 2023

There is a "breaking" change in this PR (depending on how exactly you want to define breaking) such that you can no longer use the first generic type parameter as a means to validate the object that you are passing. Users should be directed to use the satisfies operator instead in the patch notes for the next release.

(satisfies was released as part of TypeScript 4.9 on November 15th, 2022. Now that it exists, it makes sense to validate your objects with satisfies like you would with any other TypeScript code and to not provide library-specific hacks to do it.)

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, good work!

@Zamiell
Copy link
Contributor Author

Zamiell commented Aug 12, 2023

Oh, looks like the tests are failing because the version of TypeScript is too old to have the satisfies operator. Do you want me to do a separate PR that upgrades TypeScript?

@kibertoad
Copy link
Contributor

@Zamiell yes, please!

@Zamiell
Copy link
Contributor Author

Zamiell commented Aug 12, 2023

Actually, on second thought, the version of TypeScript is really recent.

Can someone click the button to re-run CI for me (since I'm a first time contributor)?

@Zamiell
Copy link
Contributor Author

Zamiell commented Aug 14, 2023

From the CI logs:

 ✖  278:2   Cannot find name satisfies.     

But according to the package.json file at the root of the repository, the version of TypeScript is 5.1.3, which should have the satisfies operator, which was introduced in TypeScript version 4.9.0. Thus, I conclude that the CI is running on an old version of the dependencies, so something in this repo is broken with respect to caching and/or node_modules, which is outside of the scope of my types PR.

Can a maintainer take a look at this please?

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

@Zamiell
Copy link
Contributor Author

Zamiell commented Oct 4, 2023

@mcollina Can we work to get this merged? It's been sitting for a while.

@mcollina
Copy link
Member

mcollina commented Oct 4, 2023

I don't have time to investigate at the moment Happy to land with a green CI.

@Zamiell
Copy link
Contributor Author

Zamiell commented Oct 4, 2023

@mcollina Can we get another maintainer to investigate? I'm fairly certain that the errors in CI are not related to my PR.

@mcollina
Copy link
Member

mcollina commented Oct 4, 2023

CI is passing on master, please rebase

@Zamiell
Copy link
Contributor Author

Zamiell commented Nov 19, 2023

CI is passing on master, please rebase

I'm aware of that, I am talking about the CI errors inside of this pull request. Can we get another maintainer to investigate?

@jsumners
Copy link
Member

You need to rebase this PR.

@Zamiell
Copy link
Contributor Author

Zamiell commented Nov 19, 2023

@jsumners I rebased this PR onto master just now. Let me know if anything additional is required.

@mcollina
Copy link
Member

CI is failing

@Zamiell
Copy link
Contributor Author

Zamiell commented Nov 25, 2023

@mcollina Sorry, I think we are looping. Yes, CI is failing for the same reason that I posted in my reply on October 4th here: #1783 (comment)

This reply explains why the errors are not part of my PR and why I think that a maintainer needs to investigate: #1783 (comment)

To recap, in response to asking for a maintainer to look at the logs, it was requested that I rebase the PR on main, which I have now done, but CI still gives the same error, so we are back to square 1, and I would ask again that a maintainer please take a look at these logs, as they do not seem related to my PR!

@jsumners
Copy link
Member

What I can tell you is that npm run test-ci works locally on the main branch, but it fails on this branch.

@Zamiell
Copy link
Contributor Author

Zamiell commented Nov 25, 2023

@jsumners It fails on this branch because I am using TypeScript's satisfies operator in my PR, which is not present in the codebase otherwise. As I explained in a previous comment in this thread, the satisfies operator was added in TypeScript version 4.9.0, and the version of TypeScript that is used by this package is 5.1.3. Thus, CI should not be throwing an error about the satisfies operator, so I conclude that your CI is drunk. Possibly a caching issue of some kind?

@kibertoad
Copy link
Contributor

I can take a look on Monday

@Zamiell
Copy link
Contributor Author

Zamiell commented Nov 29, 2023

Looks like CI is green now, finally.

The fact that tsd uses its own version of TypeScript seems really weird. Naively I would expect it to be a peer dep and let the user bring their own version. But I'm seeing that it supports testing against multiple versions of TypeScript, so I guess that is the justification.

@mcollina mcollina merged commit 7f739d3 into pinojs:master Dec 13, 2023
17 of 20 checks passed
@beemdvp
Copy link

beemdvp commented Dec 13, 2023

fyi these typing changes really should've been a major bump even if they're a "fix". This has broken an app in pipeline for production use. Guess we shouldnt really trust any package to respect semantic versioning but still

@kibertoad
Copy link
Contributor

@mcollina I think we should revert.

@beemdvp can you share the code example that got broken? we need to expand our testsuite, it seems.

@beemdvp
Copy link

beemdvp commented Dec 13, 2023

@kibertoad it was a minor thing but I'd rather deal with updating types in a separate story I'm working on. Previously we were allowed to log unknown (default type in catch block) types as well but as you can imagine, I had to find that out from this release and its a pain to change every single line in the same PR im working on at work

@mcollina
Copy link
Member

Given that typescript or DefinitelyTyped does not support semantic versioning, how could anybody expect types to stay stable?

@kibertoad
Copy link
Contributor

@mcollina Fair point.

Not being able to log unknown anymore sounds like a regression to me, as it's a very common and very useful use-case.

@beemdvp would you be open to send a fix PR for it?

@mcollina
Copy link
Member

Not being able to log unknown anymore sounds like a regression to me, as it's a very common and very useful use-case.

Generically this seems like a bad idea. Basically you want to log something that you know nothing about, and expect everything to be safe. This seems a good case for a warning, because... who knows what's in that unknown?

@arijnr
Copy link

arijnr commented Dec 13, 2023

Hi everyone.

I wanted to let you know that I also had problems during a deployment to production due to changes in this PR that are now available in version 8.17.0.

For now I will have to use the previous version.

@kibertoad
Copy link
Contributor

@mcollina realistically in 99.9% cases catch block will return an error. in 0.1% it'll be a string. pino can log both of them just fine.

obviosly people can log unknown in other cases too, but I'd say that it shouldn't be on pino to hand-hold against it

@mcollina
Copy link
Member

Agreed. However I don't think it's possible to support unknown while validating the interpolation arguments.

@Zamiell Zamiell deleted the types branch December 13, 2023 12:51
@Zamiell
Copy link
Contributor Author

Zamiell commented Dec 13, 2023

However I don't think it's possible to support unknown while validating the interpolation arguments.

To give more context here, currently the LogFn is typed as a bunch of overloads. Adding an overload to handle unknown at the top would match everything, making all the overloads below it useless (at least for one arg). And adding an overload for unknown at the bottom would match everything, resulting in 0 type errors. So in either case, the following code would not error, because it would be caught by the unknown overload:

// We want this to be a type error, because we forgot to supply the string corresponding to "%s",
// but it matches: `(arg: unknown) => void`
logger.info("hello, %s");

in 99.9% cases catch block will return an error. in 0.1% it'll be a string. pino can log both of them just fine.

You're right. In these cases, I recommend changing the following code:

try {
  dangerousFunc();
} catch (err) {
  logger.error(err)
}

To this:

try {
  dangerousFunc();
} catch (err) {
  logger.error(err as never)
}

But we should remember that the whole point of unknown is that you are supposed to type-narrow it. So the more-correct and more-safe solution is to abstract the check into a new helper function that you can use throughout your codebase. Something along the lines of:

/**
 * Helper function to narrow an unknown value to an object (i.e. a TypeScript record).
 *
 * Under the hood, this checks for `typeof variable === "object"`, `variable !== null`, and
 * `!Array.isArray(variable)`.
 */
export function isObject(
  variable: unknown,
): variable is Record<string, unknown> {
  return (
    typeof variable === "object" &&
    variable !== null &&
    !Array.isArray(variable)
  );
}

/** Helper function to log an `unknown` value in a type-safe way using type-narrowing. */
export function logError(err: unknown) {
  if (typeof err === "boolean" || typeof err === "number") {
    logger.error(err);
  } else if (typeof err === "string") {
    logger.error(err);
  } else if (isObject(err)) {
    logger.error(err);
  } else {
    // Pino only supports booleans, numbers, strings, and objects, so convert this to a string.
    const msg = `${typeof err} - ${err}`;
    logger.error(msg);
  }
}

// --------------------------------------------------------

try {
  dangerousFunc();
} catch (err) {
  logError(err);
}

mcollina added a commit that referenced this pull request Dec 14, 2023
mcollina added a commit that referenced this pull request Dec 14, 2023
* Revert "fix: typescript types (#1783)"

This reverts commit 7f739d3.

* Add check

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

---------

Signed-off-by: Matteo Collina <hello@matteocollina.com>
renovate bot added a commit to ettorepuccetti/terrarossa that referenced this pull request Dec 22, 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 |
|---|---|---|---|---|---|
| [pino](https://getpino.io)
([source](https://togithub.com/pinojs/pino)) | [`8.16.2` ->
`8.17.1`](https://renovatebot.com/diffs/npm/pino/8.16.2/8.17.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/pino/8.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pino/8.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pino/8.16.2/8.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pino/8.16.2/8.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pinojs/pino (pino)</summary>

### [`v8.17.1`](https://togithub.com/pinojs/pino/releases/tag/v8.17.1)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.17.0...v8.17.1)

#### What's Changed

- Support unknown, reverts 1783, add tests by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1866
- Add Type Example for custom logger by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1867

**Full Changelog**:
pinojs/pino@v8.17.0...v8.17.1

### [`v8.17.0`](https://togithub.com/pinojs/pino/releases/tag/v8.17.0)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.16.2...v8.17.0)

#### What's Changed

- build(deps): bump actions/github-script from 6 to 7 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1857
- Make license detectable by GitHub by
[@&#8203;10xLaCroixDrinker](https://togithub.com/10xLaCroixDrinker) in
[pinojs/pino#1859
- docs: Clarify how to log both to a custom transport and to stdout by
[@&#8203;kibertoad](https://togithub.com/kibertoad) in
[pinojs/pino#1860
- Fix/types by
[@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour) in
[pinojs/pino#1858
- Bumped tsd to v0.29.0 by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1863
- fix: typescript types by
[@&#8203;Zamiell](https://togithub.com/Zamiell) in
[pinojs/pino#1783
- build(deps): bump pnpm/action-setup from 2.2.4 to 2.4.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1766

#### New Contributors

- [@&#8203;10xLaCroixDrinker](https://togithub.com/10xLaCroixDrinker)
made their first contribution in
[pinojs/pino#1859
- [@&#8203;Zamiell](https://togithub.com/Zamiell) made their first
contribution in
[pinojs/pino#1783

**Full Changelog**:
pinojs/pino@v8.16.2...v8.17.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 10am on Friday" (UTC),
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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ettorepuccetti/terrarossa).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to fwouts/previewjs that referenced this pull request Dec 26, 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 |
|---|---|---|---|---|---|
| [pino](https://getpino.io)
([source](https://togithub.com/pinojs/pino)) | [`^8.16.2` ->
`^8.17.2`](https://renovatebot.com/diffs/npm/pino/8.16.2/8.17.2) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/pino/8.17.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pino/8.17.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pino/8.16.2/8.17.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pino/8.16.2/8.17.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pinojs/pino (pino)</summary>

### [`v8.17.2`](https://togithub.com/pinojs/pino/releases/tag/v8.17.2)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.17.1...v8.17.2)

#### What's Changed

- build(deps): bump process-warning from 2.3.2 to 3.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1869
- fix: type of child logger with custom levels by
[@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour) in
[pinojs/pino#1871

**Full Changelog**:
pinojs/pino@v8.17.1...v8.17.2

### [`v8.17.1`](https://togithub.com/pinojs/pino/releases/tag/v8.17.1)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.17.0...v8.17.1)

#### What's Changed

- Support unknown, reverts 1783, add tests by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1866
- Add Type Example for custom logger by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1867

**Full Changelog**:
pinojs/pino@v8.17.0...v8.17.1

### [`v8.17.0`](https://togithub.com/pinojs/pino/releases/tag/v8.17.0)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.16.2...v8.17.0)

#### What's Changed

- build(deps): bump actions/github-script from 6 to 7 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1857
- Make license detectable by GitHub by
[@&#8203;10xLaCroixDrinker](https://togithub.com/10xLaCroixDrinker) in
[pinojs/pino#1859
- docs: Clarify how to log both to a custom transport and to stdout by
[@&#8203;kibertoad](https://togithub.com/kibertoad) in
[pinojs/pino#1860
- Fix/types by
[@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour) in
[pinojs/pino#1858
- Bumped tsd to v0.29.0 by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1863
- fix: typescript types by
[@&#8203;Zamiell](https://togithub.com/Zamiell) in
[pinojs/pino#1783
- build(deps): bump pnpm/action-setup from 2.2.4 to 2.4.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1766

#### New Contributors

- [@&#8203;10xLaCroixDrinker](https://togithub.com/10xLaCroixDrinker)
made their first contribution in
[pinojs/pino#1859
- [@&#8203;Zamiell](https://togithub.com/Zamiell) made their first
contribution in
[pinojs/pino#1783

**Full Changelog**:
pinojs/pino@v8.16.2...v8.17.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 these
updates again.

---

- [ ] <!-- 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://developer.mend.io/github/fwouts/previewjs).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuMTAzLjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to redwoodjs/redwood that referenced this pull request Mar 19, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [pino](https://getpino.io)
([source](https://togithub.com/pinojs/pino)) | [`8.16.2` ->
`8.19.0`](https://renovatebot.com/diffs/npm/pino/8.16.2/8.19.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/pino/8.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pino/8.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pino/8.16.2/8.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pino/8.16.2/8.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pinojs/pino (pino)</summary>

### [`v8.19.0`](https://togithub.com/pinojs/pino/releases/tag/v8.19.0)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.18.0...v8.19.0)

#### What's Changed

- api.md: Fix link declaration by
[@&#8203;homersimpsons](https://togithub.com/homersimpsons) in
[pinojs/pino#1900
- Update transports.md by
[@&#8203;huijiewei](https://togithub.com/huijiewei) in
[pinojs/pino#1897
- Add a basic `formatters` option to the browser pino by
[@&#8203;KatelynKim](https://togithub.com/KatelynKim) in
[pinojs/pino#1898
- `setLevel` should respect level comparison option by
[@&#8203;obrus-corcentric](https://togithub.com/obrus-corcentric) in
[pinojs/pino#1901
- Add formatters log option by
[@&#8203;KatelynKim](https://togithub.com/KatelynKim) in
[pinojs/pino#1905

#### New Contributors

- [@&#8203;homersimpsons](https://togithub.com/homersimpsons) made their
first contribution in
[pinojs/pino#1900
- [@&#8203;huijiewei](https://togithub.com/huijiewei) made their first
contribution in
[pinojs/pino#1897
- [@&#8203;KatelynKim](https://togithub.com/KatelynKim) made their first
contribution in
[pinojs/pino#1898

**Full Changelog**:
pinojs/pino@v8.18.0...v8.19.0

### [`v8.18.0`](https://togithub.com/pinojs/pino/releases/tag/v8.18.0)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.17.2...v8.18.0)

#### What's Changed

- build(deps): bump actions/upload-artifact from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1873
- chore(license): Update licensing year by
[@&#8203;codershiba](https://togithub.com/codershiba) in
[pinojs/pino#1882
- fix: destination docs and types by
[@&#8203;codershiba](https://togithub.com/codershiba) in
[pinojs/pino#1881
- Correct type of `pino`'s `stream` parameter by
[@&#8203;quisido](https://togithub.com/quisido) in
[pinojs/pino#1874
- Add ability to override custom levels comparison by
[@&#8203;obrus-corcentric](https://togithub.com/obrus-corcentric) in
[pinojs/pino#1883
- build(deps-dev): bump tsd from 0.29.0 to 0.30.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1888

#### New Contributors

- [@&#8203;codershiba](https://togithub.com/codershiba) made their first
contribution in
[pinojs/pino#1882
- [@&#8203;quisido](https://togithub.com/quisido) made their first
contribution in
[pinojs/pino#1874
- [@&#8203;obrus-corcentric](https://togithub.com/obrus-corcentric) made
their first contribution in
[pinojs/pino#1883

**Full Changelog**:
pinojs/pino@v8.17.2...v8.18.0

### [`v8.17.2`](https://togithub.com/pinojs/pino/releases/tag/v8.17.2)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.17.1...v8.17.2)

#### What's Changed

- build(deps): bump process-warning from 2.3.2 to 3.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1869
- fix: type of child logger with custom levels by
[@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour) in
[pinojs/pino#1871

**Full Changelog**:
pinojs/pino@v8.17.1...v8.17.2

### [`v8.17.1`](https://togithub.com/pinojs/pino/releases/tag/v8.17.1)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.17.0...v8.17.1)

#### What's Changed

- Support unknown, reverts 1783, add tests by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1866
- Add Type Example for custom logger by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1867

**Full Changelog**:
pinojs/pino@v8.17.0...v8.17.1

### [`v8.17.0`](https://togithub.com/pinojs/pino/releases/tag/v8.17.0)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.16.2...v8.17.0)

#### What's Changed

- build(deps): bump actions/github-script from 6 to 7 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1857
- Make license detectable by GitHub by
[@&#8203;10xLaCroixDrinker](https://togithub.com/10xLaCroixDrinker) in
[pinojs/pino#1859
- docs: Clarify how to log both to a custom transport and to stdout by
[@&#8203;kibertoad](https://togithub.com/kibertoad) in
[pinojs/pino#1860
- Fix/types by
[@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour) in
[pinojs/pino#1858
- Bumped tsd to v0.29.0 by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1863
- fix: typescript types by
[@&#8203;Zamiell](https://togithub.com/Zamiell) in
[pinojs/pino#1783
- build(deps): bump pnpm/action-setup from 2.2.4 to 2.4.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1766

#### New Contributors

- [@&#8203;10xLaCroixDrinker](https://togithub.com/10xLaCroixDrinker)
made their first contribution in
[pinojs/pino#1859
- [@&#8203;Zamiell](https://togithub.com/Zamiell) made their first
contribution in
[pinojs/pino#1783

**Full Changelog**:
pinojs/pino@v8.16.2...v8.17.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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/redwoodjs/redwood).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: David Price <thedavid@thedavidprice.com>
thedavidprice added a commit to redwoodjs/redwood that referenced this pull request Mar 27, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [pino](https://getpino.io)
([source](https://togithub.com/pinojs/pino)) | [`8.16.2` ->
`8.19.0`](https://renovatebot.com/diffs/npm/pino/8.16.2/8.19.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/pino/8.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pino/8.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pino/8.16.2/8.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pino/8.16.2/8.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pinojs/pino (pino)</summary>

### [`v8.19.0`](https://togithub.com/pinojs/pino/releases/tag/v8.19.0)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.18.0...v8.19.0)

#### What's Changed

- api.md: Fix link declaration by
[@&#8203;homersimpsons](https://togithub.com/homersimpsons) in
[pinojs/pino#1900
- Update transports.md by
[@&#8203;huijiewei](https://togithub.com/huijiewei) in
[pinojs/pino#1897
- Add a basic `formatters` option to the browser pino by
[@&#8203;KatelynKim](https://togithub.com/KatelynKim) in
[pinojs/pino#1898
- `setLevel` should respect level comparison option by
[@&#8203;obrus-corcentric](https://togithub.com/obrus-corcentric) in
[pinojs/pino#1901
- Add formatters log option by
[@&#8203;KatelynKim](https://togithub.com/KatelynKim) in
[pinojs/pino#1905

#### New Contributors

- [@&#8203;homersimpsons](https://togithub.com/homersimpsons) made their
first contribution in
[pinojs/pino#1900
- [@&#8203;huijiewei](https://togithub.com/huijiewei) made their first
contribution in
[pinojs/pino#1897
- [@&#8203;KatelynKim](https://togithub.com/KatelynKim) made their first
contribution in
[pinojs/pino#1898

**Full Changelog**:
pinojs/pino@v8.18.0...v8.19.0

### [`v8.18.0`](https://togithub.com/pinojs/pino/releases/tag/v8.18.0)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.17.2...v8.18.0)

#### What's Changed

- build(deps): bump actions/upload-artifact from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1873
- chore(license): Update licensing year by
[@&#8203;codershiba](https://togithub.com/codershiba) in
[pinojs/pino#1882
- fix: destination docs and types by
[@&#8203;codershiba](https://togithub.com/codershiba) in
[pinojs/pino#1881
- Correct type of `pino`'s `stream` parameter by
[@&#8203;quisido](https://togithub.com/quisido) in
[pinojs/pino#1874
- Add ability to override custom levels comparison by
[@&#8203;obrus-corcentric](https://togithub.com/obrus-corcentric) in
[pinojs/pino#1883
- build(deps-dev): bump tsd from 0.29.0 to 0.30.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1888

#### New Contributors

- [@&#8203;codershiba](https://togithub.com/codershiba) made their first
contribution in
[pinojs/pino#1882
- [@&#8203;quisido](https://togithub.com/quisido) made their first
contribution in
[pinojs/pino#1874
- [@&#8203;obrus-corcentric](https://togithub.com/obrus-corcentric) made
their first contribution in
[pinojs/pino#1883

**Full Changelog**:
pinojs/pino@v8.17.2...v8.18.0

### [`v8.17.2`](https://togithub.com/pinojs/pino/releases/tag/v8.17.2)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.17.1...v8.17.2)

#### What's Changed

- build(deps): bump process-warning from 2.3.2 to 3.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1869
- fix: type of child logger with custom levels by
[@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour) in
[pinojs/pino#1871

**Full Changelog**:
pinojs/pino@v8.17.1...v8.17.2

### [`v8.17.1`](https://togithub.com/pinojs/pino/releases/tag/v8.17.1)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.17.0...v8.17.1)

#### What's Changed

- Support unknown, reverts 1783, add tests by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1866
- Add Type Example for custom logger by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1867

**Full Changelog**:
pinojs/pino@v8.17.0...v8.17.1

### [`v8.17.0`](https://togithub.com/pinojs/pino/releases/tag/v8.17.0)

[Compare
Source](https://togithub.com/pinojs/pino/compare/v8.16.2...v8.17.0)

#### What's Changed

- build(deps): bump actions/github-script from 6 to 7 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1857
- Make license detectable by GitHub by
[@&#8203;10xLaCroixDrinker](https://togithub.com/10xLaCroixDrinker) in
[pinojs/pino#1859
- docs: Clarify how to log both to a custom transport and to stdout by
[@&#8203;kibertoad](https://togithub.com/kibertoad) in
[pinojs/pino#1860
- Fix/types by
[@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour) in
[pinojs/pino#1858
- Bumped tsd to v0.29.0 by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[pinojs/pino#1863
- fix: typescript types by
[@&#8203;Zamiell](https://togithub.com/Zamiell) in
[pinojs/pino#1783
- build(deps): bump pnpm/action-setup from 2.2.4 to 2.4.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pinojs/pino#1766

#### New Contributors

- [@&#8203;10xLaCroixDrinker](https://togithub.com/10xLaCroixDrinker)
made their first contribution in
[pinojs/pino#1859
- [@&#8203;Zamiell](https://togithub.com/Zamiell) made their first
contribution in
[pinojs/pino#1783

**Full Changelog**:
pinojs/pino@v8.16.2...v8.17.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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/redwoodjs/redwood).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: David Price <thedavid@thedavidprice.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript interface LogFn bugged (e.g. logger.info, logger.debug, etc.)
6 participants