-
Notifications
You must be signed in to change notification settings - Fork 0
fix: back to thrift-typescript package #211
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
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThe pull request introduces changes to the frontend's dependency management and code generation process. Two new Thrift-related dependencies are added to the Changes
Possibly related PRs
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
frontend/scripts/codegen.sh (1)
14-20
: Add error handling.Add error checks for the npx command execution.
npx thrift-typescript \ --rootDir ".." \ --outDir "$OUT_DIR" \ --sourceDir "$THRIFT_DIR" \ --target thrift-server \ --fallbackNamespace none \ - $THRIFT_FILES + $THRIFT_FILES || { echo "Thrift generation failed"; exit 1; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
⛔ Files ignored due to path filters (1)
frontend/package-lock.json
is excluded by!**/package-lock.json
📒 Files selected for processing (2)
frontend/package.json
(1 hunks)frontend/scripts/codegen.sh
(1 hunks)
🔇 Additional comments (3)
frontend/scripts/codegen.sh (2)
3-4
: LGTM: Path changes are more explicit.
6-11
: Verify unique filenames across directories.Using basename could conflict if different directories have .thrift files with same names.
frontend/package.json (1)
61-62
: Verify package versions for security.The thrift packages are using older versions. Check for security advisories and newer versions.
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.
Summary
While working with the types generated by the Thrift compiler, I noticed it was generating files using the
require
keyword. This is only compatible with a Node.js server and not usable in the browser. I attempted several fixes but couldn't find a solution.Ultimately, I switched to the
thrift-typescript
package and managed to get it working. As of now, it provides everything we need for the exploration code.Checklist
Summary by CodeRabbit
Dependencies
@creditkarma/thrift-server-core
(v1.0.4)@creditkarma/thrift-typescript
(v3.7.6)glob
(v9.0.0)Chores