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(pino): remedy destination static method and add missing option prettifier #44642

Conversation

emilio-martinez
Copy link
Contributor

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: https://github.com/pinojs/pino/blob/v6.0.0/pino.js#L196
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • Include tests for your changes
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

PR Summary

  • Fixes destination static method parameter to reflect pino’s documentation (https://getpino.io/#/docs/api?id=statics). This parameter should have already been typed this way for the current type version (v6.0.0), so no version change is required. As such, source code linked above refers to that version; no changes have been made to this portion of the API since then.
  • Adds missing option prettifier. This was also available in current type version (v6.0.0).

Fix `destination` static method parameter to reflect pino’s documentation (https://getpino.io/#/docs/api?id=statics).

This parameter should have already been typed this way for the current type version (v6.0.0), so no version change is required.
This option is documented in pino’s docs to support the `prettyPrint` options.
@typescript-bot typescript-bot added Where is Travis? Popular package This PR affects a popular package (as counted by NPM download counts). labels May 11, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented May 11, 2020

@emilio-martinez Thank you for submitting this PR!

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 44642,
  "author": "emilio-martinez",
  "owners": [
    "psnider",
    "BendingBender",
    "screendriver",
    "paambaati",
    "alferpal",
    "mortiy",
    "lummish",
    "raoulus",
    "Cooryd",
    "AdamVig",
    "austin-beer",
    "Pegase745"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "32d09db",
  "headCommitOid": "32d09dbf6d0fffe2944ccb33f396a86424ddf284",
  "mergeIsRequested": true,
  "stalenessInDays": 0,
  "lastCommitDate": "2020-05-11T12:02:24.000Z",
  "lastCommentDate": "2020-05-11T20:44:40.000Z",
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44642/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": false,
  "popularityLevel": "Popular",
  "anyPackageIsNew": false,
  "packages": [
    "pino"
  ],
  "files": [
    {
      "filePath": "types/pino/index.d.ts",
      "kind": "definition",
      "package": "pino"
    },
    {
      "filePath": "types/pino/pino-tests.ts",
      "kind": "test",
      "package": "pino"
    }
  ],
  "hasDismissedReview": false,
  "travisResult": "pass",
  "lastReviewDate": "2020-05-11T20:40:36.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 2,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Contributor

🔔 @psnider @BendingBender @screendriver @paambaati @alferpal @mortiy @lummish @raoulus @Cooryd @AdamVig @austin-beer @Pegase745 - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

Comparison details 📊
master #44642 diff
Batch compilation
Memory usage (MiB) 69.0 69.7 +1.0%
Type count 9752 9807 +1%
Assignability cache size 3249 3292 +1%
Language service
Samples taken 346 390 +13%
Identifiers in tests 346 390 +13%
getCompletionsAtPosition
    Mean duration (ms) 269.2 267.6 -0.6%
    Mean CV 10.6% 10.5%
    Worst duration (ms) 364.3 336.1 -7.7%
    Worst identifier stderr paths
getQuickInfoAtPosition
    Mean duration (ms) 268.1 268.7 +0.2%
    Mean CV 10.7% 10.8% +0.4%
    Worst duration (ms) 355.7 321.5 -9.6%
    Worst identifier serverResponse level

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label May 11, 2020
Copy link
Contributor

@lummish lummish left a comment

Choose a reason for hiding this comment

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

LGTM

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels May 11, 2020
@typescript-bot
Copy link
Contributor

@emilio-martinez Everything looks good here. Great job! I am ready to merge this PR on your behalf.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

@emilio-martinez
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit d44f68f into DefinitelyTyped:master May 11, 2020
@typescript-bot
Copy link
Contributor

I just published @types/pino@6.0.1 to npm.

andreialecu pushed a commit to andreialecu/DefinitelyTyped that referenced this pull request May 12, 2020
… method and add missing option prettifier by @emilio-martinez

* fix(pino): remedy destination static method param

Fix `destination` static method parameter to reflect pino’s documentation (https://getpino.io/#/docs/api?id=statics).

This parameter should have already been typed this way for the current type version (v6.0.0), so no version change is required.

* fix(pino): add missing option prettifier

This option is documented in pino’s docs to support the `prettyPrint` options.
jjballano-qatium pushed a commit to jjballano-qatium/DefinitelyTyped that referenced this pull request Jun 16, 2020
… method and add missing option prettifier by @emilio-martinez

* fix(pino): remedy destination static method param

Fix `destination` static method parameter to reflect pino’s documentation (https://getpino.io/#/docs/api?id=statics).

This parameter should have already been typed this way for the current type version (v6.0.0), so no version change is required.

* fix(pino): add missing option prettifier

This option is documented in pino’s docs to support the `prettyPrint` options.
@emilio-martinez emilio-martinez deleted the feat/pino-destination-param branch June 23, 2020 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Owner Approved A listed owner of this package signed off on the pull request. Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Popular package This PR affects a popular package (as counted by NPM download counts). Self Merge This PR can now be self-merged by the PR author or an owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants