Navigation Menu

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

Replace <rootDir> prior to path.join() #154

Merged
merged 24 commits into from Oct 4, 2021

Conversation

arabull
Copy link

@arabull arabull commented Dec 10, 2020

This allows outputDirectory to be formatted like <rootDir>/../some/dir. In that case, path.join() assumes the .. cancels out the <rootDir>, which seems entirely reasonable. Unfortunately, it means the final value is some/dir, and that ends up rooted at process.cwd(), which doesn't always match <rootDir>.

Handling the <rootDir> replacement first alleviates this problem.

This allows outputDirectory to be formatted like <rootDir>/../some/dir. In that case, path.join() assumes the .. cancels out the <rootDir>, which seems entirely reasonable. Unfortunately, it means the final value is some/dir, and that ends up rooted at process.cwd(), which doesn't always match <rootDir>.

Handling the <rootDir> replacement first allevaites this problem.
@arabull
Copy link
Author

arabull commented Dec 10, 2020

Wasn't sure if I need to manually bump the version or not. Let me know if I should do that, and I can.

@arabull
Copy link
Author

arabull commented Dec 10, 2020

Fixes #153.

@palmerj3
Copy link
Collaborator

Thank you! Please add a test so we know if this behavior regresses in future releases.

@arabull
Copy link
Author

arabull commented Dec 11, 2020

I was looking for a place to add a test, but there weren't any tests against index.js or processor, which is where the fix lives.

The processor function ends up writing a file, which we probably don't want a test to do. To properly test the logic I changed, I may have to refactor processor. That felt excessive to me, but I can do it if you'd prefer. Or I'm open to other suggestions.

@palmerj3
Copy link
Collaborator

Ok hold off for now. I'll take a closer look at this PR and the testability of things later on.

@arabull
Copy link
Author

arabull commented Jan 6, 2021

@palmerj3 Anything I can do to help get this merged? I'm happy to refactor the processor function to make it more testable if you'd like. It just felt a little dangerous for this small change.

dependabot bot and others added 18 commits March 31, 2021 03:49
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>
…npm_and_yarn/y18n-4.0.1

Bump y18n from 4.0.0 to 4.0.1
KeYu and others added 3 commits September 30, 2021 16:13
Detail:
Component and governance pipeline detect security vulnerability alert about ansi-regex(v4.1.0).
To update ansi-regex to v5.0.1, I update strip-ansi to v6.0.1
Fix CG by updating strip-ansi from 5.2.0 to 6.0.1
@palmerj3
Copy link
Collaborator

Please rebase when you can

Michael Johns added 2 commits September 30, 2021 15:25
This allows outputDirectory to be formatted like <rootDir>/../some/dir. In that case, path.join() assumes the .. cancels out the <rootDir>, which seems entirely reasonable. Unfortunately, it means the final value is some/dir, and that ends up rooted at process.cwd(), which doesn't always match <rootDir>.

Handling the <rootDir> replacement first allevaites this problem.
@arabull
Copy link
Author

arabull commented Sep 30, 2021

@palmerj3 Done. I had to re-apply my changes in a new location due to #168. Let me know if I screwed anything up.

@palmerj3 palmerj3 merged commit 017af76 into jest-community:master Oct 4, 2021
@palmerj3
Copy link
Collaborator

palmerj3 commented Oct 4, 2021

This has been released in 13.0.0

bors bot pushed a commit to ttbud/ttbud that referenced this pull request Oct 5, 2021
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [jest-junit](https://togithub.com/jest-community/jest-junit) | [`12.3.0` -> `13.0.0`](https://renovatebot.com/diffs/npm/jest-junit/12.3.0/13.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jest-junit/13.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jest-junit/13.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jest-junit/13.0.0/compatibility-slim/12.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jest-junit/13.0.0/confidence-slim/12.3.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>jest-community/jest-junit</summary>

### [`v13.0.0`](https://togithub.com/jest-community/jest-junit/releases/v13.0.0)

[Compare Source](https://togithub.com/jest-community/jest-junit/compare/v12.3.0...v13.0.0)

Update strip-ansi to newer version - [jest-community/jest-junit#188
Add noStackTrace CLI option - [jest-community/jest-junit#160
Fix rootDir usage - [jest-community/jest-junit#154

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/ttbud/ttbud).
bors bot pushed a commit to ttbud/ttbud that referenced this pull request Oct 6, 2021
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [jest-junit](https://togithub.com/jest-community/jest-junit) | [`12.3.0` -> `13.0.0`](https://renovatebot.com/diffs/npm/jest-junit/12.3.0/13.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jest-junit/13.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jest-junit/13.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jest-junit/13.0.0/compatibility-slim/12.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jest-junit/13.0.0/confidence-slim/12.3.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>jest-community/jest-junit</summary>

### [`v13.0.0`](https://togithub.com/jest-community/jest-junit/releases/v13.0.0)

[Compare Source](https://togithub.com/jest-community/jest-junit/compare/v12.3.0...v13.0.0)

Update strip-ansi to newer version - [jest-community/jest-junit#188
Add noStackTrace CLI option - [jest-community/jest-junit#160
Fix rootDir usage - [jest-community/jest-junit#154

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/ttbud/ttbud).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants