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

[jest]: add type reference to jest-diff #33030

Merged
merged 1 commit into from Feb 13, 2019

Conversation

SimenB
Copy link
Contributor

@SimenB SimenB commented Feb 13, 2019

  • 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).

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: From Add diff to Jest's matcher utils #32891
  • Increase the version number in the header if appropriate.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }.

Is this enough to add the dependency?

It need to import @types/jest-diff

@SimenB SimenB mentioned this pull request Feb 13, 2019
9 tasks
@typescript-bot typescript-bot added this to Waiting for Reviewers in Pull Request Status Board Feb 13, 2019
@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Awaiting reviewer feedback labels Feb 13, 2019
@typescript-bot
Copy link
Contributor

typescript-bot commented Feb 13, 2019

@SimenB Thank you for submitting this PR!

🔔 @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @ahnpnl @JoshuaKGoldberg @UselessPickles @r3nya @Hotell @sebald @andys8 - 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.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@SimenB
Copy link
Contributor Author

SimenB commented Feb 13, 2019

Is there some way to preview the generated package.json?

@sirian
Copy link

sirian commented Feb 13, 2019

@SimenB try generate package using https://github.com/Microsoft/types-publisher

@sirian
Copy link

sirian commented Feb 13, 2019

cat data/definitions.json | jq '.jest."24"'
Click to expand
{
  "libraryName": "Jest",
  "typingsPackageName": "jest",
  "projectName": "http://facebook.github.io/jest/",
  "contributors": [
    {
      "name": "Asana",
      "url": "https://asana.com"
    },
    {
      "name": "Ivo Stratev",
      "url": "https://github.com/NoHomey",
      "githubUsername": "NoHomey"
    },
    {
      "name": "jwbay",
      "url": "https://github.com/jwbay",
      "githubUsername": "jwbay"
    },
    {
      "name": "Alexey Svetliakov",
      "url": "https://github.com/asvetliakov",
      "githubUsername": "asvetliakov"
    },
    {
      "name": "Alex Jover Morales",
      "url": "https://github.com/alexjoverm",
      "githubUsername": "alexjoverm"
    },
    {
      "name": "Allan Lukwago",
      "url": "https://github.com/epicallan",
      "githubUsername": "epicallan"
    },
    {
      "name": "Ika",
      "url": "https://github.com/ikatyang",
      "githubUsername": "ikatyang"
    },
    {
      "name": "Waseem Dahman",
      "url": "https://github.com/wsmd",
      "githubUsername": "wsmd"
    },
    {
      "name": "Jamie Mason",
      "url": "https://github.com/JamieMason",
      "githubUsername": "JamieMason"
    },
    {
      "name": "Douglas Duteil",
      "url": "https://github.com/douglasduteil",
      "githubUsername": "douglasduteil"
    },
    {
      "name": "Ahn",
      "url": "https://github.com/ahnpnl",
      "githubUsername": "ahnpnl"
    },
    {
      "name": "Josh Goldberg",
      "url": "https://github.com/joshuakgoldberg",
      "githubUsername": "joshuakgoldberg"
    },
    {
      "name": "Jeff Lau",
      "url": "https://github.com/UselessPickles",
      "githubUsername": "UselessPickles"
    },
    {
      "name": "Andrew Makarov",
      "url": "https://github.com/r3nya",
      "githubUsername": "r3nya"
    },
    {
      "name": "Martin Hochel",
      "url": "https://github.com/hotell",
      "githubUsername": "hotell"
    },
    {
      "name": "Sebastian Sebald",
      "url": "https://github.com/sebald",
      "githubUsername": "sebald"
    },
    {
      "name": "Andy",
      "url": "https://github.com/andys8",
      "githubUsername": "andys8"
    },
    {
      "name": "Antoine Brault",
      "url": "https://github.com/antoinebrault",
      "githubUsername": "antoinebrault"
    }
  ],
  "libraryMajorVersion": 24,
  "libraryMinorVersion": 0,
  "minTsVersion": "3.0",
  "typesVersions": [],
  "files": [
    "index.d.ts"
  ],
  "license": "MIT",
  "dependencies": [
    {
      "name": "jest-diff",
      "majorVersion": "*"
    }
  ],
  "testDependencies": [],
  "pathMappings": [],
  "packageJsonDependencies": [],
  "contentHash": "adb905c3644d1c270a0befec4f8b7705a41f2555b9597b7b25069067ce2ff3a9",
  "globals": [
    "afterAll",
    "afterEach",
    "beforeAll",
    "beforeEach",
    "describe",
    "expect",
    "fail",
    "fdescribe",
    "fit",
    "it",
    "jasmine",
    "jest",
    "pending",
    "spyOn",
    "test",
    "xdescribe",
    "xit",
    "xtest"
  ],
  "declaredModules": []
}

@sirian
Copy link

sirian commented Feb 13, 2019

@SimenB BTW, maybe it would be better to include typings in jest package itself rather than using DefinitelyTyped?

@SimenB
Copy link
Contributor Author

SimenB commented Feb 13, 2019

Thanks! That's almost right - it should depend on @types/jest-diff, not jest-diff (until we make a new release, at which point jest-diff will come with TS types out of the box).


BTW, maybe it would be better to include typings in jest package itself rather than using DefinitelyTyped?

Working on it 😉 jestjs/jest#7807

@minestarks minestarks merged commit 2b3a253 into DefinitelyTyped:master Feb 13, 2019
@SimenB SimenB deleted the patch-1 branch February 13, 2019 17:16
@typescript-bot typescript-bot removed this from Waiting for Reviewers in Pull Request Status Board Feb 13, 2019
@minestarks
Copy link
Contributor

@sandersn types-publisher has been pushing other packages but hasn't picked this one up yet. Is it stuck or am I just impatient?

@minestarks
Copy link
Contributor

Oh types-publisher is hanging out at #32990 currently. It'll get here eventually I assume 😄

@sandersn
Copy link
Contributor

Yep, someday. It's on handlebar-helpers right now.

@typescript-bot
Copy link
Contributor

I just published @types/jest@24.0.4 to npm.

@SimenB
Copy link
Contributor Author

SimenB commented Mar 7, 2019

BTW, maybe it would be better to include typings in jest package itself rather than using DefinitelyTyped?

Working on it 😉 facebook/jest#7807

#33705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Popular package This PR affects a popular package (as counted by NPM download counts).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants