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

[@pollyjs/node-server] Types for the @pollyjs/node-server package #38597

Merged

Conversation

@offirgolan
Copy link
Contributor

commented Sep 25, 2019

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 adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • Represents shape of module/library correctly
  • tslint.json should be present and it shouldn't have any additional or disabling of rules. Just content as { "extends": "dtslint/dt.json" }. If for reason the some 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.
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.
@offirgolan offirgolan force-pushed the offirgolan:@pollyjs-node-server branch from 3e9985c to db78d92 Sep 25, 2019
@typescript-bot

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2019

👋 Hi there! I’ve run some quick performance metrics against master and your PR. This is still an experiment, so don’t panic if I say something crazy! I’m still learning how to interpret these metrics.

Let’s review the numbers, shall we?

These typings are for a package that doesn’t yet exist on master, so I don’t have anything to compare against yet! In the future, I’ll be able to compare PRs to pollyjs__node-server with its source on master.

Comparison details 📊
Batch compilation
Type count 9871
Assignability cache size 3218
Subtype cache size 1
Identity cache size 1
Language service measurements
Samples taken 69
Identifiers in tests 69
getCompletionsAtPosition
    Mean duration (ms) 396.1
    Median duration (ms) 392.7
    Mean CV 12.9%
    Worst duration (ms) 516.9
    Worst identifier app
getQuickInfoAtPosition
    Mean duration (ms) 435.1
    Median duration (ms) 428.4
    Mean CV 14.2%
    Worst duration (ms) 574.8
    Worst identifier registerExpressAPI
System information
Node version v10.16.3
CPU count 2
CPU speed 2.397 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
CPU Architecture x64
Memory 6.8 GiB
Platform linux
Release 4.15.0-1055-azure

If you have any questions or comments about me, you can ping @andrewbranch. Have a nice day!

@typescript-bot

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2019

@offirgolan Thank you for submitting this PR!

Because this is a new definition, a DefinitelyTyped maintainer will be reviewing this PR in the next few days once the Travis CI build passes.

In the meantime, if the build fails or a merge conflict occurs, I'll let you know. Have a nice day!

@typescript-bot

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2019

Updated numbers for you here from 17320e1:

These typings are for a package that doesn’t yet exist on master, so I don’t have anything to compare against yet! In the future, I’ll be able to compare PRs to pollyjs__node-server with its source on master.

Comparison details 📊
Batch compilation
Type count 9871
Assignability cache size 3218
Subtype cache size 1
Identity cache size 1
Language service measurements
Samples taken 69
Identifiers in tests 69
getCompletionsAtPosition
    Mean duration (ms) 376.6
    Median duration (ms) 372.0
    Mean CV 16.0%
    Worst duration (ms) 486.1
    Worst identifier app
getQuickInfoAtPosition
    Mean duration (ms) 404.2
    Median duration (ms) 398.9
    Mean CV 16.5%
    Worst duration (ms) 528.8
    Worst identifier registerExpressAPI
System information
Node version v10.16.3
CPU count 2
CPU speed 2.294 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU Architecture x64
Memory 6.8 GiB
Platform linux
Release 4.15.0-1055-azure
// Project: https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/node-server
// Definitions by: Offir Golan <https://github.com/offirgolan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.5

This comment has been minimized.

Copy link
@uniqueiniquity

uniqueiniquity Sep 25, 2019

Contributor

This should be the minimum version of TypeScript compatible with these type definitions - TS 3.5 seems high, but I might be missing something.

This comment has been minimized.

Copy link
@offirgolan

offirgolan Sep 25, 2019

Author Contributor

Yeah, that was my bad. Reduced it to 2.4.

@offirgolan offirgolan force-pushed the offirgolan:@pollyjs-node-server branch from f0d2e99 to 6be0dc2 Sep 25, 2019
@typescript-bot

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2019

Updated numbers for you here from ebcfef1:

These typings are for a package that doesn’t yet exist on master, so I don’t have anything to compare against yet! In the future, I’ll be able to compare PRs to pollyjs__node-server with its source on master.

Comparison details 📊
Batch compilation
Type count 9871
Assignability cache size 3218
Subtype cache size 1
Identity cache size 1
Language service measurements
Samples taken 69
Identifiers in tests 69
getCompletionsAtPosition
    Mean duration (ms) 372.0
    Median duration (ms) 369.6
    Mean CV 15.9%
    Worst duration (ms) 462.2
    Worst identifier app
getQuickInfoAtPosition
    Mean duration (ms) 397.5
    Median duration (ms) 396.5
    Mean CV 17.5%
    Worst duration (ms) 515.6
    Worst identifier registerExpressAPI
System information
Node version v10.16.3
CPU count 2
CPU speed 2.294 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU Architecture x64
Memory 6.8 GiB
Platform linux
Release 4.15.0-1055-azure
@typescript-bot typescript-bot moved this from Review to Needs Author Attention in Pull Request Status Board Sep 25, 2019
@typescript-bot

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2019

@offirgolan One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. Thank you!

@typescript-bot

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2019

🔔 @uniqueiniquity - Thanks for your review of this PR! Can you please look at the new code and update your review status if appropriate?

@uniqueiniquity uniqueiniquity merged commit f966375 into DefinitelyTyped:master Sep 25, 2019
3 checks passed
3 checks passed
DefinitelyTyped.BenchmarkPR Build #16310 succeeded
Details
DefinitelyTyped.DefinitelyTyped Build #20190925.70 succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Pull Request Status Board automation moved this from Needs Author Attention to Done Sep 25, 2019
@typescript-bot

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.