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

Remove binary-parser usage #137

Merged
merged 3 commits into from
Aug 8, 2024
Merged

Remove binary-parser usage #137

merged 3 commits into from
Aug 8, 2024

Conversation

cmdcolin
Copy link
Contributor

@cmdcolin cmdcolin commented Aug 1, 2024

This PR replaces all usages of binary-parser with plain buffer parsing

The binary-parser package was problematic because it's use of eval triggers CSP warnings on webpages

CSP is a new method of securing webpages https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP

some small bonuses are improved typescript, and not having to maintain @gmod/binary-parser (similar work would need to be done to bbi-js and twobit-js to fully remove) and potentially faster code (not measured yet)

some small downsides are reduced readability due to manually managed byte offsets

@cmdcolin cmdcolin merged commit 8675701 into master Aug 8, 2024
1 check passed
@cmdcolin cmdcolin deleted the no_binary_parser branch August 8, 2024 21:20
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.

1 participant