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

fix(node/fs): Use correct offset and length in node:fs.read and write #25049

Merged
merged 7 commits into from
Aug 16, 2024

Conversation

nathanwhit
Copy link
Member

@nathanwhit nathanwhit commented Aug 15, 2024

My fix in #25030 was buggy, I forgot to pass the byteOffset and byteLength. Whoops.

I also discovered that fs.read was not respecting the offset argument, and we were constructing a new Buffer for the callback instead of just passing the original one (which is what node does, and the @types/node definitions also indicate the callback should get the same type).
Fixes #25028.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

a test would be good

Copy link
Contributor

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

Changes Look good. Should this have a test?

@nathanwhit nathanwhit changed the title fix(node/fs): Use correct byte offset and length when converting to Uint8Array fix(node/fs): Use correct offset and length in node:fs.read and write Aug 16, 2024
Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Support pglite
4 participants