-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: expose issue.path in .allIssues() for field containers
#14784
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
Conversation
🦋 Changeset detectedLatest commit: 0ab1434 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
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.
thank you!
|
I don't love that we added a new interface for this. Wouldn't it be simpler to just add |
|
opened #14864 |
|
You're right. I could have done that too. |
fixes #14688
Changes
.allIssues()from{ message: string }to the following to indicate where in the field container the issue occurred.Demo
As the issue shows, this can be used to group issues with
Object.groupBy().Discriminated Unions
#14771 was a big step forward to being able to work with discriminated union schemas. However, you still can't get the issues for a field in a D.U. Having access to the path here would be the final thing needed to support D.U. schemas. You still can't use
.as()or.issues(), but you can set the attributes manually like this:Discriminated Union Demo
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits