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

feat: types for ellipsize ( npmjs.com/package/ellipsize) added #45006

Merged
merged 2 commits into from May 28, 2020

Conversation

natterstefan
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.

@typescript-bot
Copy link
Contributor

typescript-bot commented May 23, 2020

@natterstefan Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 - keep an eye on this comment as I'll be updating it with information as things progress.

Code Reviews

This PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Only a DT maintainer can merge changes when there are new packages added

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": 45006,
  "author": "natterstefan",
  "owners": [],
  "dangerLevel": "ScopedAndConfiguration",
  "headCommitAbbrOid": "178ca36",
  "headCommitOid": "178ca36f9aed964ecde626aaec17b74658730312",
  "mergeIsRequested": false,
  "stalenessInDays": 4,
  "lastCommitDate": "2020-05-23T13:35:14.000Z",
  "lastCommentDate": "2020-05-23T13:35:14.000Z",
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45006/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": true,
  "popularityLevel": "Well-liked by everyone",
  "anyPackageIsNew": true,
  "packages": [
    "ellipsize"
  ],
  "files": [
    {
      "filePath": "types/ellipsize/ellipsize-tests.ts",
      "kind": "test",
      "package": "ellipsize"
    },
    {
      "filePath": "types/ellipsize/index.d.ts",
      "kind": "definition",
      "package": "ellipsize"
    },
    {
      "filePath": "types/ellipsize/tsconfig.json",
      "kind": "package-meta",
      "package": "ellipsize"
    },
    {
      "filePath": "types/ellipsize/tslint.json",
      "kind": "package-meta",
      "package": "ellipsize"
    }
  ],
  "hasDismissedReview": false,
  "travisResult": "pass",
  "lastReviewDate": "2020-05-28T01:08:20.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 4,
  "isChangesRequested": false
}

@typescript-bot typescript-bot added the New Definition This PR creates a new definition package. label May 23, 2020
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board May 23, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board May 23, 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?

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 ellipsize with its source on master.

Comparison details 📊
Batch compilation
Type count 2168
Assignability cache size 114
Language service measurements
Samples taken 16
Identifiers in tests 16
getCompletionsAtPosition
    Mean duration (ms) 68.8
    Mean CV 18.8%
    Worst duration (ms) 84.5
    Worst identifier ellipsize
getQuickInfoAtPosition
    Mean duration (ms) 69.5
    Mean CV 20.5%
    Worst duration (ms) 82.1
    Worst identifier ellipsize
System information
Node version v12.16.3
CPU count 2
CPU speed 2.095 GHz
CPU model Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz
CPU Architecture x64
Memory 6.8 GiB
Platform linux
Release 4.15.0-1082-azure

@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board May 23, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 23, 2020
Copy link
Contributor

@amcasey amcasey left a comment

Choose a reason for hiding this comment

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

Thanks!

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels May 28, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in New Pull Request Status Board May 28, 2020
@amcasey amcasey merged commit eb24b18 into DefinitelyTyped:master May 28, 2020
@typescript-bot typescript-bot removed this from Waiting for Author to Merge in New Pull Request Status Board May 28, 2020
@typescript-bot
Copy link
Contributor

I just published @types/ellipsize@0.1.0 to npm.

@natterstefan
Copy link
Contributor Author

You're welcome @amcasey!

@natterstefan natterstefan deleted the feature/ellipsize branch May 28, 2020 06:47
jjballano-qatium pushed a commit to jjballano-qatium/DefinitelyTyped that referenced this pull request Jun 16, 2020
…itelyTyped#45006)

* feat: types for ellipsize added

* refactor: incorporate feedback of danger-public
ngbrown pushed a commit to ngbrown-forks/DefinitelyTyped that referenced this pull request Jul 11, 2020
…itelyTyped#45006)

* feat: types for ellipsize added

* refactor: incorporate feedback of danger-public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintainer Approved New Definition This PR creates a new definition package. 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.

None yet

3 participants