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: create @jest/config-utils package #9403

Closed
wants to merge 4 commits into from

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Jan 14, 2020

Summary

Not too happy about the name. Main idea is to colocate both types and utils, since jest-config depends on the world to be able to resolve default dependencies in a pnp context.

This makes it so only jest-circus, jest-jasmine, jest-each and jest-environment* depends on @jest/types.

Fixes #8570

Test plan

Green CI

@@ -5,7 +5,8 @@
* LICENSE file in the root directory of this source tree.
*
*/
import {Config} from '@jest/types';
Copy link
Member Author

Choose a reason for hiding this comment

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

this is the fix for #8570

@thymikee
Copy link
Collaborator

Doesn't it make sense to create @jest/config-types with config types only then?

@SimenB
Copy link
Member Author

SimenB commented Jan 15, 2020

The reason I did it this way is so people can reuse some of the helpers without pulling in the massive jest-config, e.g. https://github.com/jest-community/jest-junit/blob/master/utils/replaceRootDirInPath.js. Thoughts?

@thymikee
Copy link
Collaborator

Ah I see, we have somewhat similar situation in expect and jest-matcher-utils, right? For some reason I thought we have a generic jest-utils 😅 Then I think it kinda make sense, too bad it has "utils" in name, but I don't have better idea.

@SimenB
Copy link
Member Author

SimenB commented Jan 15, 2020

I wondered about creating a @jest/config-normalizer or something which would be what's left in jest-config in this PR and have jest-config be what's in the new util package

@SimenB
Copy link
Member Author

SimenB commented Jan 16, 2020

Let's circle back later

@SimenB SimenB closed this Jan 16, 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.

expect triggers incompatibility with mocha declarations
3 participants