-
Notifications
You must be signed in to change notification settings - Fork 1k
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: [ENG-8644] overriding omit in fetchOneEntry to be empty string #3975
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 7465cfa The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 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 |
View your CI Pipeline Execution ↗ for commit 7465cfa.
☁️ Nx Cloud last updated this comment at |
@yash-builder could you add tests for this?
this could be a reference |
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.
- Do add tests for both Generations SDKs
- Also add changeset changes
@@ -54,6 +54,18 @@ function App() { | |||
} | |||
}, []); | |||
|
|||
useEffect(() => { |
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.
I think the better way would be to add unit test in generate-content-url.test.ts
instead of useEffect here. The aim is to respect empty string ''
passed to omit
field.
@samijaber or @sidmohanty11 can correct me on this.
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.
The snapshots also should be updated to differentiate omit as undefined vs omit as empty string.
ie generate-content-url.test.ts.snap
Description:
This PR fixes an issue where
meta.componentsUsed
is omitted by default when usingfetchOneEntry
. Previously, to includemeta.componentsUsed
, you had to explicitly setomit: ' '
(a space) as a workaround.Changes Made:
meta.componentsUsed
by default unless explicitly omitted.omit ?? 'meta.componentsUsed'
to ensurecomponentsUsed
is not omitted whenomit
is set to an empty string (''
).Why This Change Was Made:
To allow
meta.componentsUsed
to be included without requiring a workaround and to ensure better handling of theomit
parameter.Loom
https://www.loom.com/share/938cd062796c4e2aaaf42b408039713e?sid=f087a66d-478d-42ce-ae41-b8e809535da6