8000 [@sinonjs/fake-timers]: add performance to node clock interface by jneander · Pull Request #57395 · DefinitelyTyped/DefinitelyTyped · GitHub 10000
[go: up one dir, main page]

Skip to content

Conversation

@jneander
Copy link
Contributor
@jneander jneander commented Nov 27, 2021

Sinon Fake Timers makes the .performance object available on the clock object conditionally based on the current environment. The global performance object has been made available as of v16, so Fake Timers will provide clock.performance when running on modern Node.js.

Please fill in this template.

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: sinonjs source node.js merge
  • 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.

Sinon Fake Timers makes the `.performance` object available on the clock
object conditionally based on the current environment. Since a variation
of Performance API has been available in Node.js since v8.5.0, Fake
Timers will provide `clock.performance` when running on modern Node.js.
@typescript-bot
Copy link
Contributor
typescript-bot commented Nov 27, 2021

@jneander Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Most recent commit is approved by a DT maintainer

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 57395,
  "author": "jneander",
  "headCommitOid": "243c075f373c669208d9695aadf63a2210b63627",
  "lastPushDate": "2021-11-29T22:05:37.000Z",
  "lastActivityDate": "2021-11-29T22:27:29.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "sinonjs__fake-timers",
      "kind": "edit",
      "files": [
        {
          "path": "types/sinonjs__fake-timers/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/sinonjs__fake-timers/sinonjs__fake-timers-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "Nemo157",
        "rogierschouten",
        "zyishai",
        "remcohaszing",
        "JadenSimon"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "JadenSimon",
      "date": "2021-11-29T22:27:29.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 980797076,
  "ciResult": "pass"
}

@typescript-bot
Copy link
Contributor

🔔 @Nemo157 @rogierschouten @zyishai @remcohaszing @JadenSimon — 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.

Copy link
Contributor
@JadenSimon JadenSimon left a comment

Choose a reason for hiding this comment

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

Trying to access performance on earlier versions of node just throws right?

Co-authored-by: JadenSimon <31319484+JadenSimon@users.noreply.github.com>
@jneander
Copy link
Contributor Author

Trying to access performance on earlier versions of node just throws right?

Yep. I confirmed that locally. While the API is available in earlier versions, the global appears to be an addition with v16.

@typescript-bot
Copy link
Contributor

@JadenSimon Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Nov 29, 2021
@sandersn sandersn merged commit 97862ce into DefinitelyTyped:master Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Owner Approved A listed owner of this package signed off on the pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0