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

Remove deprecated API and options in v7 option. #1249

Merged
merged 7 commits into from
May 31, 2022
Merged

Conversation

mcollina
Copy link
Member

@mcollina mcollina commented Nov 30, 2021

100% code coverage back.

This is the start of a v8 planning. We might want to do this sooner than expected and roll it out with Fastify v4.

Removes:

  • prettyPrint
  • pino.final()

100% code coverage back.
@jsumners
Copy link
Member

🤣 #1106 (comment)

@mcollina mcollina changed the title Remove prettyPrint option. Remove deprecated API and options in v7 option. Nov 30, 2021
@mcollina
Copy link
Member Author

@kibertoad could you take a look why TS is failing badly?

@davidmarkclements
Copy link
Member

should we create a v8 branch and merge to that?

warning.create(warnName, 'PINODEP008', 'prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.')

warning.create(warnName, 'PINODEP009', 'The use of pino.final is discouraged in Node.js v14+ and not required. It will be removed in the next major version')
// warning.create(warnName, 'PINODEP010', 'A new deprecation')
Copy link
Member

Choose a reason for hiding this comment

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

stray comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is on purpose to avoid deleting this file.

Copy link
Member

Choose a reason for hiding this comment

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

is the file needed? if not we should remove it - if we ever need it again it's in the commit history right?

Copy link
Member

Choose a reason for hiding this comment

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

It's easier to keep it and update it as necessary.

@@ -3,8 +3,6 @@
const warning = require('fastify-warning')()
module.exports = warning

const warnName = 'PinoWarning'
Copy link
Member

Choose a reason for hiding this comment

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

is this file required anywhere else now? if not, remove?

Copy link
Member Author

Choose a reason for hiding this comment

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

We'll definitely need it at some point in the future, better to keep.

Copy link
Member

Choose a reason for hiding this comment

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

for me it's a loose end - maybe this whole concept should be a separate module or something

@mcollina
Copy link
Member Author

should we create a v8 branch and merge to that?

It should be a next branch. I'll get that started asap.

@@ -510,16 +316,6 @@ function buildFormatters (level, bindings, log) {
}
}

function setMetadataProps (dest, that) {
Copy link
Member

Choose a reason for hiding this comment

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

love to see this go

@@ -503,21 +503,17 @@ test('flushSync', function (t) {
'_' + Math.random().toString(36).substr(2, 9)
)
const destination = pino.destination({ dest: tmp, sync: false, minLength: 4096 })
const log = pino({ level: 'info' }, multistream([{ level: 'info', stream: destination }]))
const stream = multistream([{ level: 'info', stream: destination }])
Copy link
Member

Choose a reason for hiding this comment

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

pino v8 side note: can we merge multistream and transport APIs in a way where the multistream same-thread logic is used based on available threads (or a force option)

Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest to park this till v9, it's better to ship what we have and improve in the next iteration.

@kibertoad
Copy link
Contributor

@kibertoad could you take a look why TS is failing badly?

I'm on it.

@kibertoad
Copy link
Contributor

kibertoad commented Nov 30, 2021

@mcollina Please don't laugh, but I think this one was actually a Jest issue. Fixed in a non-elegant way for now because Jest requires it, but shouldn't matter because we only use tsconfig for local testing anyway. Not sure why it only triggered now.

They promise to do better in v28: jestjs/jest#12098

@kibertoad
Copy link
Contributor

@mcollina Is there anything else that you want to see in this PR, or we can merge after CI is green?

@mcollina
Copy link
Member Author

Can you add Node v18 and drop v17?

@mcollina mcollina marked this pull request as ready for review May 31, 2022 20:02
@mcollina
Copy link
Member Author

@jsumners you good with pino@8 being a tiny update just to drop node v12?

@jsumners
Copy link
Member

@jsumners you good with pino@8 being a tiny update just to drop node v12?

Yes.

@mcollina mcollina mentioned this pull request May 31, 2022
@mcollina mcollina merged commit ff1546b into master May 31, 2022
@mcollina mcollina deleted the rip-apart-prettifier branch May 31, 2022 22:25
@github-actions
Copy link

github-actions bot commented Jun 1, 2023

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 Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants