Skip to content

Commit

Permalink
doc(nodejs): update upgrade.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bxb100 committed Jun 24, 2024
1 parent 591d034 commit 80b4f07
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions bindings/nodejs/upgrade.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 80b4f07

Please sign in to comment.