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

[haste-map]: Ignore Sapling vcs directories #13674

Merged
merged 2 commits into from
Jan 1, 2023
Merged

Conversation

vegerot
Copy link
Contributor

@vegerot vegerot commented Dec 14, 2022

Stack created with Sapling. Best reviewed with ReviewStack.

[haste-map]: Ignore Sapling vcs directories

Summary: Ignore .sl directories in HasteMap. This will allow Sapling to be
used with jest projects

Test Plan: packages/jest-haste-map/src/__tests__/index.test.js similar
testing plan to what's in #13673

Closes #13673

Summary: Ignore `.sl` directories in HasteMap.  This will allow Sapling to be
used with jest projects

Test Plan: `packages/jest-haste-map/src/__tests__/index.test.js` similar
testing plan to what's in jestjs#13673

Closes jestjs#13673
@facebook-github-bot
Copy link
Contributor

Hi @vegerot!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Comment on lines +353 to +354
const {hasteFS} = await (await HasteMap.create(defaultConfig)).build();
expect(hasteFS.matchFiles('.sl')).toEqual([]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

without the patch in index.ts this throws an error about "could not parse invalid JSON"

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

Thanks! Can you add a changelog entry.

Do we need a docs update? I'm unsure if we've documented our builtin vcs ignores

@mrazauskas
Copy link
Contributor

Do we need a docs update? I'm unsure if we've documented our builtin vcs ignores

Docs of watchPathIgnorePatterns option mentions .git and .hg. I’m not sure if haste-map is involved in this or not?

https://github.com/facebook/jest/blob/41bf2300895a2c00d0525d21260f0a392819871f/docs/Configuration.md?plain=1#L2259

@SimenB
Copy link
Member

SimenB commented Dec 20, 2022

That's haste-map, yeah

@vegerot
Copy link
Contributor Author

vegerot commented Dec 21, 2022

@SimenB how's this? 🙂

@vegerot
Copy link
Contributor Author

vegerot commented Dec 23, 2022

@SimenB My CI pipeline is failing. Do you know why?

@SimenB
Copy link
Member

SimenB commented Jan 1, 2023

@vegerot would you be up for adding full sapling support? e.g. to https://github.com/facebook/jest/tree/main/packages/jest-changed-files? Which would mean onlyChanged, changedSince etc..

@SimenB SimenB merged commit 0b27bbb into jestjs:main Jan 1, 2023
@vegerot
Copy link
Contributor Author

vegerot commented Jan 7, 2023

@vegerot would you be up for adding full sapling support? e.g. to https://github.com/facebook/jest/tree/main/packages/jest-changed-files? Which would mean onlyChanged, changedSince etc..

sure, why not? Do we have issues to track these already?

@SimenB
Copy link
Member

SimenB commented Jan 7, 2023

Not as far as I know. Feel free to open one (or jump right to the pr)

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

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 Feb 7, 2023
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.

[Bug]: Jest cannot run tests in Sapling repos with invalid JSON backups
4 participants