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

fix: pass root in babel config #12689

Merged
merged 6 commits into from
Apr 19, 2022
Merged

fix: pass root in babel config #12689

merged 6 commits into from
Apr 19, 2022

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Apr 19, 2022

Summary

Setting root makes sure babel doesn't look for config outside of the root of the Jest project.

Closes #7794
Closes #12331

Test plan

Green CI

commit 0b5c1d0d2d8568e7e7e5cdab46690f9ccf4eaad1
Merge: 4d2ebc4 49a5eca
Author: Simen Bekkhus <[email protected]>
Date:   Tue Apr 19 15:03:01 2022 +0200

    Merge branch 'main' into multiprj-babel

commit 4d2ebc4
Author: Bradford Lemley <[email protected]>
Date:   Mon Feb 4 10:29:31 2019 -0700

    Add tests for a few other babel config methods

commit 4070442
Author: Bradford Lemley <[email protected]>
Date:   Mon Feb 4 08:14:39 2019 -0700

    Apply patch from jestjs#7794 (comment).

commit 51d008c
Author: Bradford Lemley <[email protected]>
Date:   Sun Feb 3 11:03:28 2019 -0700

    Configure babel cwd to be project rootDir

commit 0dc6df1
Author: Bradford Lemley <[email protected]>
Date:   Sun Feb 3 15:08:05 2019 -0700

    Add test demonstrating babel behavior difference individually vs. multiprj
@SimenB SimenB changed the title feat: pass root in babel config fix: pass root in babel config Apr 19, 2022
@SimenB SimenB merged commit 5183c15 into jestjs:main Apr 19, 2022
@SimenB SimenB deleted the babel-jest-root branch April 19, 2022 13:59
tasshi-me added a commit to kintone/js-sdk that referenced this pull request May 17, 2022
From jestjs/jest#12689, jest passes `rootDir` option to babel-jest.
If rootDir is project sub-directory (e.g. `src/`, `__tests__/`),
babel cannot load babel.config.js in project root.
tasshi-me added a commit to kintone/js-sdk that referenced this pull request May 19, 2022
* chore(deps): update jest monorepo to v28

* test: fix jest.config.js

From jestjs/jest#12689, jest passes `rootDir` option to babel-jest.
If rootDir is project sub-directory (e.g. `src/`, `__tests__/`),
babel cannot load babel.config.js in project root.

* chore(rest-api-client): fix type error for dom (#1513)

* test(create-plugin): fix jest.config.js

* chore(rest-api-client): add type definition of Blob and BlobPart

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Masaharu TASHIRO <[email protected]>
Co-authored-by: tasshi / Masaharu TASHIRO <[email protected]>
Co-authored-by: Masashi Hirano <[email protected]>
@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 20, 2022
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.

2 participants