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

feat: add defuSchema #104

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: add defuSchema #104

wants to merge 5 commits into from

Conversation

ferferga
Copy link

@ferferga ferferga commented Aug 27, 2023

πŸ”— Linked issue

Fixes #48

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

  • Minor code improvement by using optional chaining as well when checking for merger function
  • Create defuSchema for removing keys not present in the default object

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@ferferga
Copy link
Author

ferferga commented Oct 7, 2023

@pi0 Can I get a review in this please?

src/defu.ts Outdated Show resolved Hide resolved
@ferferga ferferga changed the title feat: create defuSchema and optional chaining feat: create defuSchema Oct 25, 2023
@ferferga ferferga mentioned this pull request Oct 25, 2023
8 tasks
@ferferga ferferga requested a review from pi0 October 25, 2023 07:16
@ferferga
Copy link
Author

ferferga commented Nov 6, 2023

@pi0 Can I get a re-review of this please? Would be realy useful to have this upstream already πŸ˜…

src/defu.ts Outdated Show resolved Hide resolved
@ferferga ferferga requested a review from pi0 November 8, 2023 22:28
src/defu.ts Outdated Show resolved Hide resolved
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks! (i will try to merge and release by this week)

@pi0 pi0 changed the title feat: create defuSchema feat: add `defuSchema Nov 8, 2023
@pi0
Copy link
Member

pi0 commented Nov 8, 2023

Once last thing, it is missing in https://github.com/unjs/defu/blob/main/lib/defu.cjs

@pi0 pi0 changed the title feat: add `defuSchema feat: add defuSchema Nov 8, 2023
@ferferga
Copy link
Author

ferferga commented Nov 9, 2023

@pi0 Done!

@ferferga
Copy link
Author

ferferga commented Jan 6, 2024

@pi0 Hey sorry for pinging again about this... But it would be really useful to have this upstream!

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
@ferferga
Copy link
Author

@pi0 I fixed the conflicts after the merge of #121

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.

request: schema support
2 participants