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

BigInteger support #7

Merged
merged 12 commits into from
Feb 19, 2024
Merged

BigInteger support #7

merged 12 commits into from
Feb 19, 2024

Conversation

kartik-gupta-ij
Copy link

#6
Fixed using json-bigint

Comment on lines +102 to +110
"pnpm": {
"overrides": {
"@babel/traverse": "7.23.2",
"semver": "7.5.2",
"tough-cookie": "4.1.3",
"word-wrap": "1.2.4",
"graphql": " 16.8.1 "
}
},
Copy link
Member

Choose a reason for hiding this comment

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

why this is changed?

Copy link
Author

@kartik-gupta-ij kartik-gupta-ij Dec 11, 2023

Choose a reason for hiding this comment

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

Those packages has vulnerabilities

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would encourage you to explore more modern alternatives. This one was last published 4 years ago, and it seems to have quite a few issues opened.

I found one that might be a better candidate: https://github.com/Ivan-Korolenko/json-with-bigint/blob/main/json-with-bigint.js (much, much smaller and simpler and perhaps even faster?) from this S.O. discussion: https://stackoverflow.com/a/69644630

Copy link
Author

@kartik-gupta-ij kartik-gupta-ij Feb 7, 2024

Choose a reason for hiding this comment

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

@Rendez, The vulnerabilities exist in jest, msw, @typescript-eslint, jest-environment-jsdom, and @changesets/cli, and they have not been resolved yet.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Rendez, The vulnerabilities exist in jest, msw, @typescript-eslint, jest-environment-jsdom, and @changesets/cli, and they have not been resolved yet.

Can't we update these libraries to latest? Do they still have these vulnerabilites after updating?

Copy link
Author

@kartik-gupta-ij kartik-gupta-ij Feb 16, 2024

Choose a reason for hiding this comment

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

Yes, they have vulnerabilities in the latest version too.

@generall
Copy link
Member

shouldn't this be also changed https://github.com/qdrant/openapi-typescript-fetch/blob/f33b84870048e75efe68e1ebaf6876bf87548ab1/src/fetcher.ts#L97C2-L97C79 ?

@kartik-gupta-ij
Copy link
Author

@generall generall requested a review from Rendez February 2, 2024 09:18
src/fetcher.ts Show resolved Hide resolved
Comment on lines +102 to +110
"pnpm": {
"overrides": {
"@babel/traverse": "7.23.2",
"semver": "7.5.2",
"tough-cookie": "4.1.3",
"word-wrap": "1.2.4",
"graphql": " 16.8.1 "
}
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would encourage you to explore more modern alternatives. This one was last published 4 years ago, and it seems to have quite a few issues opened.

I found one that might be a better candidate: https://github.com/Ivan-Korolenko/json-with-bigint/blob/main/json-with-bigint.js (much, much smaller and simpler and perhaps even faster?) from this S.O. discussion: https://stackoverflow.com/a/69644630

@@ -5,7 +5,7 @@
"declarationDir": "dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"lib": ["dom", "dom.iterable", "es2019"],
"lib": ["dom", "dom.iterable", "es2019", "esnext"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

@@ -0,0 +1,41 @@
export type Json =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you add:

{
 "dependencies": {
    "json-with-bigint": "^2.1.0"
  }
}

And then copied the source here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I much rather have the dependency in case new versions with fixes happen, etc.

@@ -112,14 +112,14 @@ describe('fetch', () => {
})

it(`POST /accepted`, async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should test the conversion and parsing of responses with big int.

@generall generall merged commit 2ffe33f into main Feb 19, 2024
4 checks passed
Rendez added a commit that referenced this pull request Feb 20, 2024
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