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

[sitecore-jss] Introduce separate flow for fetching streams #2022

Closed
wants to merge 5 commits into from

Conversation

art-alexeyenko
Copy link
Contributor

@art-alexeyenko art-alexeyenko commented Jan 27, 2025

Description / Motivation

Follow up for #2020

Previous approach introduced a bug where every fetch operation response was considered a stream - because response.body always has type ReadableStream.
An alterative approach is to explicitly state an intent of getting a stream - so we optionally pass a resneponse handler into the fetch operation and get what we need.

Testing Details

  • Unit Test Added
  • Manual Test/Other (Please elaborate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@art-alexeyenko art-alexeyenko requested a review from a team January 27, 2025 21:13
Copy link
Contributor

@addy-pathania addy-pathania left a comment

Choose a reason for hiding this comment

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

Please see some comments.
Also, from my understanding this would be a breaking change and we wont be able to release a patch with this change.
Can't we do anything simple by directly processing the ReadStream in the previous if block the way we do in Sitemap.ts api file?

@@ -16,7 +16,7 @@ Our versioning strategy is as follows:
### 🐛 Bug Fixes

* `[sitecore-jss-nextjs]` Fix Chromes editing mode when rendering host URL is internally redirected in XMCloud ([#2019](https://github.com/Sitecore/jss/pull/2019))
* `[sitecore-jss]` NativeDataFetcher doesn't return stream response ([#2020](https://github.com/Sitecore/jss/pull/2020))
* `[sitecore-jss]` NativeDataFetcher doesn't return stream response ([#2020](https://github.com/Sitecore/jss/pull/2020)[#2022](https://github.com/Sitecore/jss/pull/2022))
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be under the breaking change section?

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.

2 participants