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

create @jest/core package #7696

Merged
merged 3 commits into from
Feb 16, 2019
Merged

create @jest/core package #7696

merged 3 commits into from
Feb 16, 2019

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Jan 24, 2019

Summary

We want to provide a programmatic API. A first step is to make jest-cli actually just deal with the CLI, and not everything else. We probably wanna make jest-core (or whatever it ends up being named) have a better API - for now it just expects a massaged argv object, which in theory can be constructed however you want.

We've discussed this briefly before, I just wanted to see how much work just the split was.

No hard feelings if it's not merged 🙂

I kept yargs and --init functionality in jest-cli

Test plan

Green CI?

Copy link
Contributor

@rubennorte rubennorte left a comment

Choose a reason for hiding this comment

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

I like the idea of doing this progressively, even if the boundary between jest-cli and jest-core isn't clear yet. I'd keep the README in jest-cli and have a temporary one in jest-core specifying it's internal and unstable to use directy.

@SimenB
Copy link
Member Author

SimenB commented Jan 24, 2019

@rubennorte if you merge this, make sure to get publish access from @cpojer to jest-core: https://www.npmjs.com/package/jest-core (I like that it has 119 weekly downloads 😛)

@cpojer
Copy link
Member

cpojer commented Jan 24, 2019

hell yeah

@SimenB
Copy link
Member Author

SimenB commented Feb 16, 2019

Made it non-breaking (require('jest') and require('jest-cli') still returns the same thing they currently do), so gonna merge this if CI is happy

(@jest/core, fwiw)

@thymikee thymikee changed the title create jest-core package create @jest/core package Feb 16, 2019
@codecov-io
Copy link

Codecov Report

Merging #7696 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7696      +/-   ##
==========================================
- Coverage   58.32%   58.31%   -0.01%     
==========================================
  Files         164      163       -1     
  Lines        6047     6046       -1     
  Branches        5        5              
==========================================
- Hits         3527     3526       -1     
  Misses       2518     2518              
  Partials        2        2
Impacted Files Coverage Δ
...st-core/src/getNoTestFoundRelatedToChangedFiles.js 0% <ø> (ø)
packages/jest-core/src/getNoTestFoundFailed.js 0% <ø> (ø)
packages/jest-core/src/TestWatcher.js 42.85% <ø> (ø)
packages/jest-cli/src/init/modify_package_json.js 100% <ø> (ø)
packages/jest-core/src/ReporterDispatcher.js 87.5% <ø> (ø)
packages/jest-core/src/plugins/quit.js 42.85% <ø> (ø)
packages/jest-core/src/TestNamePatternPrompt.js 44.44% <ø> (ø)
...t-core/src/plugins/update_snapshots_interactive.js 65.51% <ø> (ø)
packages/jest-cli/src/init/questions.js 100% <ø> (ø)
packages/jest-core/src/TestPathPatternPrompt.js 46.66% <ø> (ø)
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c14a45d...54d346e. Read the comment docs.

@SimenB SimenB merged commit 6af2f67 into jestjs:master Feb 16, 2019
@SimenB SimenB deleted the jest-core branch February 16, 2019 22:08
@cpojer
Copy link
Member

cpojer commented Feb 17, 2019

Holy shit, this PR is a dream come true. Amazing @SimenB, thank you!

@SimenB
Copy link
Member Author

SimenB commented Feb 17, 2019

🎉 I've also split out @jest/reporters from jest-cli (would have been from @jest/core if this was merged first) and @jest/transform from jest-runtime. There's probably more stuff we can do, but at least this is a start 🙂

@pauldraper pauldraper mentioned this pull request Sep 29, 2020
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants