-
Notifications
You must be signed in to change notification settings - Fork 158
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: join command failing on null values with --prefix-components-with-info-prop option #1444
fix: join command failing on null values with --prefix-components-with-info-prop option #1444
Conversation
🦋 Changeset detectedLatest commit: ddc3e2b The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Coverage report
Show files with reduced coverage 🔻
Test suite run success713 tests passing in 101 suites. Report generated by 🧪jest coverage report action from ddc3e2b |
|
40a972c
to
d2516fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor grammatical update.
Might be worth adding a comment about why this was the answer? I see the bug report, I see some changes to dependencies, but it's not obvious to me (or future-us) why this is the fix.
Co-authored-by: Lorna Jane Mitchell <github@lornajane.net>
@lornajane updated the description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changeset is good
.split('/') | ||
.map((name: string, i: number, arr: []) => { | ||
.map((name, i, arr) => { | ||
return arr.length - 1 === i && !name.includes(componentsPrefix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check would better be !name.startsWith(componentsPrefix)
so that if someone coincidentally uses the component prefix somewhere inside the name, the prefix is added nonetheless
What/Why/How?
Since 1.9.0
join
fails when used with the --prefix-components-with-info-prop option and a schema containsnull
value.This PR resolves the issue by moving the crawl visitor out of the loop.
Also, did a small refactoring of
split
command (reusing shared things withjoin
, types correction).Reference
Fixes #1440
Testing
Screenshots (optional)
Has code been changed?
Security