Skip to content

Conversation

TerrorJack
Copy link
Contributor

Closes #93. Note that I've also taken some time to upgrade all the outdated dependencies and fix the code accordingly, if you wouldn't mind.

@bjorn3
Copy link
Owner

bjorn3 commented Oct 18, 2025

Please move the dependency updates to a separate commit and skip the version bump commit.

@bjorn3
Copy link
Owner

bjorn3 commented Oct 18, 2025

I meant separate PR, not commit. My bad.

@TerrorJack
Copy link
Contributor Author

At the very least, typescript must be bumped, otherwise the baseline 2024 arraybuffer grow type signature as well as the Uint8Array<ArrayBuffer> type would not be available at all. So it's not really feasible to spin out only the changes here and make it typecheck without any bumps.

@bjorn3
Copy link
Owner

bjorn3 commented Oct 18, 2025

The dependency bump PR could be merged first.

newData = new Uint8Array(newBuffer);
newData.set(data);
return newData;
}
Copy link
Owner

Choose a reason for hiding this comment

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

This function has inconsistent indentation. I don't know why prettier doesn't complain about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not inconsistent, this is multiple constant bindings in a single const declaration, so newData is one increased level of indentation here.

const newBuffer = new ArrayBuffer(newDataSize, {
maxByteLength: newDataSize,
}),
newData = new Uint8Array(newBuffer);
Copy link
Owner

Choose a reason for hiding this comment

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

This is missing a const newData, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See above.

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.

fd_write is slow because of repeatedly concatenating buffers

2 participants