Skip to content

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

@nathanwhit nathanwhit merged commit ff4226a into denoland:main Aug 16, 2024
17 checks passed
@nathanwhit nathanwhit mentioned this pull request Aug 16, 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.

Support pglite
4 participants