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(yargs-interactive): Extend Interactive interface with yargs.Argv interface #45831

Merged
merged 1 commit into from
Jul 12, 2020

Conversation

nanovazquez
Copy link
Contributor

This PR adds missing types to the yargs interactive Interactive interface. Since this library is an extension of yargs, its interface has to extend from it.


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.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/yargs/index.d.ts#L47
  • 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.

If removing a declaration:

  • If a package was never on Definitely Typed, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

@typescript-bot typescript-bot added the Author is Owner The author of this PR is a listed owner of the package. label Jul 1, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented Jul 1, 2020

@nanovazquez Thank you for submitting this PR!

This is a live comment which I will keep updated.

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, DT maintainers or others

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

Inactive

This PR has been inactive for 10 days — waiting for a DT maintainer!


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 45831,
  "author": "nanovazquez",
  "owners": [
    "szeck87",
    "nanovazquez"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "960ea16",
  "headCommitOid": "960ea16f5cd460f5e76e7131bfdf92ee606993a2",
  "mergeIsRequested": false,
  "stalenessInDays": 10,
  "lastPushDate": "2020-07-01T19:48:55.000Z",
  "lastCommentDate": "2020-07-01T19:48:55.000Z",
  "maintainerBlessed": false,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45831/files",
  "hasMergeConflict": false,
  "authorIsOwner": true,
  "isFirstContribution": false,
  "popularityLevel": "Well-liked by everyone",
  "anyPackageIsNew": false,
  "packages": [
    "yargs-interactive"
  ],
  "files": [
    {
      "path": "types/yargs-interactive/index.d.ts",
      "kind": "definition",
      "package": "yargs-interactive"
    },
    {
      "path": "types/yargs-interactive/yargs-interactive-tests.ts",
      "kind": "test",
      "package": "yargs-interactive"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 0,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Contributor

typescript-bot commented Jul 1, 2020

🔔 @szeck87 — 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 #45831 diff
Batch compilation
Memory usage (MiB) 64.3 66.7 +3.8%
Type count 8963 11345 +27%
Assignability cache size 1657 1912 +15%
Language service
Samples taken 24 28 +17%
Identifiers in tests 24 28 +17%
getCompletionsAtPosition
    Mean duration (ms) 338.4 359.2 +6.2%
    Mean CV 13.6% 12.3%
    Worst duration (ms) 424.8 468.5 +10.3%
    Worst identifier yargsInteractive wrap
getQuickInfoAtPosition
    Mean duration (ms) 337.5 352.6 +4.5%
    Mean CV 12.8% 10.6% -17.4%
    Worst duration (ms) 392.8 413.4 +5.2%
    Worst identifier default name

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 Jul 1, 2020
@typescript-bot typescript-bot added the Unmerged The author did not merge the PR when it was ready. label Jul 10, 2020
@weswigham weswigham merged commit d3facd7 into DefinitelyTyped:master Jul 12, 2020
@nanovazquez nanovazquez deleted the fix/yargs-interactive branch July 13, 2020 14:17
danielrearden pushed a commit to danielrearden/DefinitelyTyped that referenced this pull request Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author is Owner The author of this PR is a listed owner of the package. Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Unmerged The author did not merge the PR when it was ready.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants