diff --git a/bindings/nodejs/upgrade.md b/bindings/nodejs/upgrade.md index a31346c19061..9dda63cb5c21 100644 --- a/bindings/nodejs/upgrade.md +++ b/bindings/nodejs/upgrade.md @@ -1,3 +1,33 @@ +# Unreleased + +## Breaking change + +### Public API + +Now, the `append` operation has been removed. You can use below code instead. + +```js +op.write("path/to/file", Buffer.from("hello world"), { append: true }); +``` + +## New features + +### Public API + +Now, `write`, `writeSync`, `writer`, and `writerSync` operations support `WriteOptions` as optional third argument. + +```ts +export interface WriteOptions { + append?: boolean + chunk?: bigint + contentType?: string + contentDisposition?: string + cacheControl?: string +} +// Example +op.write("path/to/file", Buffer.from("hello world"), { contentType: "text/plain" }); +``` + # Upgrade to v0.44 ## Breaking change