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鈥檒l 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

Conversation

@SimenB
Copy link
Collaborator

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?

@SimenB SimenB requested a review from rubennorte Jan 24, 2019
Copy link
Contributor

rubennorte left a comment

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

This comment has been minimized.

Copy link
Collaborator 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

This comment has been minimized.

Copy link
Contributor

cpojer commented Jan 24, 2019

hell yeah

@MartinHelmut MartinHelmut mentioned this pull request Jan 27, 2019
0 of 1 task complete
@SimenB SimenB added this to the Jest 25 milestone Jan 29, 2019
@SimenB SimenB force-pushed the SimenB:jest-core branch 5 times, most recently from 40563b8 to 42e8089 Feb 14, 2019
@SimenB SimenB force-pushed the SimenB:jest-core branch from 42e8089 to 3342b03 Feb 16, 2019
SimenB added 2 commits Feb 16, 2019
@SimenB

This comment has been minimized.

Copy link
Collaborator 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

This comment has been minimized.

Copy link

codecov-io commented Feb 16, 2019

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 facebook:master Feb 16, 2019
12 checks passed
12 checks passed
ci/circleci: lint-and-typecheck Your tests passed on CircleCI!
Details
ci/circleci: test-browser Your tests passed on CircleCI!
Details
ci/circleci: test-jest-circus Your tests passed on CircleCI!
Details
ci/circleci: test-node-10 Your tests passed on CircleCI!
Details
ci/circleci: test-node-11 Your tests passed on CircleCI!
Details
ci/circleci: test-node-6 Your tests passed on CircleCI!
Details
ci/circleci: test-node-8 Your tests passed on CircleCI!
Details
ci/circleci: test-or-deploy-website Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
facebook.jest #20190216.28 succeeded
Details
@SimenB SimenB deleted the SimenB:jest-core branch Feb 16, 2019
@cpojer

This comment has been minimized.

Copy link
Contributor

cpojer commented Feb 17, 2019

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

@SimenB

This comment has been minimized.

Copy link
Collaborator 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 馃檪

@3rd-Eden 3rd-Eden mentioned this pull request May 22, 2019
0 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can鈥檛 perform that action at this time.