Skip to content

feat(js): use build-client-streamed for JS SDK#657

Merged
daniel-jonathan merged 1 commit intomainfrom
feat/js-use-streamed-build
Nov 19, 2025
Merged

feat(js): use build-client-streamed for JS SDK#657
daniel-jonathan merged 1 commit intomainfrom
feat/js-use-streamed-build

Conversation

@daniel-jonathan
Copy link
Copy Markdown
Contributor

@daniel-jonathan daniel-jonathan commented Nov 3, 2025

Summary

Use build-client-streamed for JavaScript SDK to include streaming endpoints.

Changes

  • Makefile: Switch build-client-js to use build-client-streamed (aligns with Python SDK)

Related

Summary by CodeRabbit

  • Chores
    • Updated build process infrastructure for the JavaScript client.

Switch JavaScript SDK build to use build-client-streamed target (like Python SDK).
This includes the streaming endpoints in the generated SDK.

Changes:
- Makefile: build-client-js uses build-client-streamed instead of build-client

This allows the JS SDK to include StreamedListObjects endpoint while custom
code in js-sdk repo (common.ts, client.ts) implements the streaming logic.

Related:
- openfga/js-sdk#280
- #76
@daniel-jonathan daniel-jonathan requested a review from a team as a code owner November 3, 2025 19:38
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 3, 2025

Walkthrough

The Makefile's JavaScript client build recipe now invokes the build-client-streamed target instead of the standard build-client target, changing the build variant used during the build process.

Changes

Cohort / File(s) Summary
Build configuration
Makefile
Updated build-client-js recipe to use build-client-streamed target instead of build-client

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

  • Verify that the build-client-streamed target exists and is properly defined
  • Confirm the behavioral differences between the standard and streamed build variants align with intended changes
  • Check for any downstream impacts on dependent build targets or CI/CD workflows

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and concisely summarizes the main change: switching the JS SDK build to use build-client-streamed instead of the standard build-client target.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/js-use-streamed-build

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19d1271 and 22819f9.

📒 Files selected for processing (1)
  • Makefile (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
Makefile

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Makefile: Update OPEN_API_REF in the Makefile when targeting new OpenFGA API versions
Update Docker image tags in the Makefile when upgrading build tools
Use official, tagged Docker images for containerized builds

Files:

  • Makefile
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to scripts/build_client.sh : Implement and maintain OpenAPI transformations in scripts/build_client.sh (remove streaming endpoints, rename Object to FgaObject, strip v1. prefixes) when API schemas change
📚 Learning: 2025-09-04T17:35:34.111Z
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to scripts/build_client.sh : Implement and maintain OpenAPI transformations in scripts/build_client.sh (remove streaming endpoints, rename Object to FgaObject, strip v1. prefixes) when API schemas change

Applied to files:

  • Makefile
📚 Learning: 2025-09-04T17:35:34.111Z
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to Makefile : Update Docker image tags in the Makefile when upgrading build tools

Applied to files:

  • Makefile
📚 Learning: 2025-09-04T17:35:34.111Z
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to scripts/build_client.sh : Clean up temporary directories and containers during/after builds to manage resources efficiently

Applied to files:

  • Makefile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-and-test-java-sdk
  • GitHub Check: build-and-test-dotnet-sdk
  • GitHub Check: build-and-test-go-sdk
🔇 Additional comments (1)
Makefile (1)

70-71: Align JS SDK build with Python SDK by using streaming build target.

The change correctly switches build-client-js to invoke build-client-streamed, which preserves streaming endpoints in the OpenAPI spec (compared to the standard build-openapi which removes them). This aligns the JS SDK build with the Python SDK (line 131), enabling support for streaming endpoints.

The post-processing steps (lines 72–76) remain compatible with the new spec variant.

Please verify that the JS SDK builds and tests successfully with streaming endpoints included. You can confirm this is working by running the build-client-js and test-client-js targets locally or via CI.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Member

@SoulPancake SoulPancake left a comment

Choose a reason for hiding this comment

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

LG
We can merge this after the SDK changes are merged

@daniel-jonathan
Copy link
Copy Markdown
Contributor Author

@SoulPancake sounds good.

@rhamzeh
Copy link
Copy Markdown
Member

rhamzeh commented Nov 10, 2025

@daniel-jonathan @SoulPancake can you check if we still need build-client-streamed? Ideally, once all SDKs w/ StreamedListObjects are out we have build-client just do all the work and remoce this other target

daniel-jonathan added a commit that referenced this pull request Nov 10, 2025
- Switch from build-client to build-client-streamed
- Aligns with Python SDK and JS SDK (PR #657)
- Includes StreamedListObjects endpoint in generated SDK
- No library parameter needed (not applicable to .NET generator)

Related:
- openfga/dotnet-sdk#156
- #76
@daniel-jonathan
Copy link
Copy Markdown
Contributor Author

daniel-jonathan commented Nov 10, 2025

@rhamzeh

@daniel-jonathan @SoulPancake can you check if we still need build-client-streamed? Ideally, once all SDKs w/ StreamedListObjects are out we have build-client just do all the work and remoce this other target

Great point! Once we are fully supported across the board, we won't need the separation.

@daniel-jonathan daniel-jonathan added this pull request to the merge queue Nov 19, 2025
Merged via the queue into main with commit 5821f0c Nov 19, 2025
15 checks passed
@daniel-jonathan daniel-jonathan deleted the feat/js-use-streamed-build branch November 19, 2025 18:36
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.

3 participants