Skip to content

feat: can handle bigint data#186

Merged
AlemTuzlak merged 3 commits intocode-forge-io:mainfrom
kesoji:main
Feb 18, 2025
Merged

feat: can handle bigint data#186
AlemTuzlak merged 3 commits intocode-forge-io:mainfrom
kesoji:main

Conversation

@kesoji
Copy link
Copy Markdown
Contributor

@kesoji kesoji commented Feb 1, 2025

Description

Fixes #185

Type of change

Please delete options that are not relevant.

  • 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 not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I added returning bigint code in test-apps and check loader and action can handle bigint.

I want to add unit tests but can't figure out appropriate position to place tests.

  • Unit tests

Checklist:

  • My code follows the guidelines of this project
  • [ x I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Feb 3, 2025

Open in Stackblitz

npm i https://pkg.pr.new/forge-42/react-router-devtools@186

commit: a2d0d30

@@ -0,0 +1,17 @@
export const bigIntReplacer = (key: any, value: any) => (typeof value === "bigint" ? value.toString() : value)

export const convertBigIntToString = (data: any): any => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm pretty sure this util wouldn't work if the bigInt is nested?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@AlemTuzlak AlemTuzlak merged commit 53069ac into code-forge-io:main Feb 18, 2025
5 of 6 checks passed
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.

Loader returning BigInt breaks dev server

2 participants