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

added typing for "validate" function added in uuid release 8.3.0 #46557

Merged
merged 2 commits into from
Aug 5, 2020

Conversation

dcgudeman
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 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/uuidjs/uuid/blob/master/src/validate.js
  • 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
Copy link
Contributor

typescript-bot commented Aug 5, 2020

@dcgudeman 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.

Code Reviews

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

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ❌ Most recent commit is approved by DT maintainers

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": 46557,
  "author": "dcgudeman",
  "owners": [
    "iamolivinius",
    "felipeochoa",
    "cjbarth",
    "LinusU",
    "ctavan"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "a879b2c",
  "headCommitOid": "a879b2c65cc79fa82a37f1f790565f974e1f3c34",
  "mergeIsRequested": false,
  "stalenessInDays": 0,
  "lastPushDate": "2020-08-05T00:38:15.000Z",
  "lastCommentDate": "2020-08-05T00:38:15.000Z",
  "maintainerBlessed": false,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46557/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": true,
  "popularityLevel": "Critical",
  "anyPackageIsNew": false,
  "packages": [
    "uuid"
  ],
  "files": [
    {
      "path": "types/uuid/index.d.ts",
      "kind": "definition",
      "package": "uuid"
    },
    {
      "path": "types/uuid/interfaces.d.ts",
      "kind": "definition",
      "package": "uuid"
    },
    {
      "path": "types/uuid/uuid-tests.ts",
      "kind": "test",
      "package": "uuid"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 0,
  "isChangesRequested": false
}

@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Aug 5, 2020
@typescript-bot
Copy link
Contributor

🔔 @iamolivinius @felipeochoa @cjbarth @LinusU @ctavan — 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 typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Aug 5, 2020
@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 #46557 diff
Batch compilation
Memory usage (MiB) 62.0 63.8 +2.9%
Type count 9022 9025 0%
Assignability cache size 1649 1649 0%
Language service
Samples taken 122 126 +3%
Identifiers in tests 122 126 +3%
getCompletionsAtPosition
    Mean duration (ms) 312.7 310.9 -0.6%
    Mean CV 11.2% 11.3%
    Worst duration (ms) 367.8 381.5 +3.7%
    Worst identifier bufferv1 alloc
getQuickInfoAtPosition
    Mean duration (ms) 310.5 306.6 -1.3%
    Mean CV 11.3% 11.1% -1.7%
    Worst duration (ms) 400.8 369.5 -7.8%
    Worst identifier c5 Buffer

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 Aug 5, 2020
@rbuckton rbuckton merged commit c50f120 into DefinitelyTyped:master Aug 5, 2020
@typescript-bot typescript-bot removed this from Needs Maintainer Review in New Pull Request Status Board Aug 5, 2020
@ctavan
Copy link
Contributor

ctavan commented Aug 5, 2020

@rbuckton it’s a bit unfortunate that this one got merged while #46395 still sits there unmerged. Could you have a look at the other (more complete) OR as well?

ctavan added a commit to ctavan/DefinitelyTyped that referenced this pull request Aug 5, 2020
@ctavan ctavan mentioned this pull request Aug 5, 2020
10 tasks
ctavan added a commit to ctavan/DefinitelyTyped that referenced this pull request Aug 6, 2020
ctavan added a commit to ctavan/DefinitelyTyped that referenced this pull request Aug 7, 2020
typescript-bot pushed a commit that referenced this pull request Aug 12, 2020
* Revert "added typing for "validate" function added in uuid release 8.3.0 (#46557)"

This reverts commit c50f120.

* Upgrade types for uuid@8.3.0

* Export v1/v4 options
chivesrs pushed a commit to chivesrs/DefinitelyTyped that referenced this pull request Sep 2, 2020


* Revert "added typing for "validate" function added in uuid release 8.3.0 (DefinitelyTyped#46557)"

This reverts commit c50f120.

* Upgrade types for uuid@8.3.0

* Export v1/v4 options
danielrearden pushed a commit to danielrearden/DefinitelyTyped that referenced this pull request Sep 22, 2020
…initelyTyped#46557)

* added type for validation function and added test

* added type for validation function and added test. Forgot to add changes in last commit
danielrearden pushed a commit to danielrearden/DefinitelyTyped that referenced this pull request Sep 22, 2020


* Revert "added typing for "validate" function added in uuid release 8.3.0 (DefinitelyTyped#46557)"

This reverts commit c50f120.

* Upgrade types for uuid@8.3.0

* Export v1/v4 options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants