Skip to content

Commit 49df9af

Browse files
Version Packages (#479)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 1e7491c commit 49df9af

File tree

3 files changed

+38
-40
lines changed

3 files changed

+38
-40
lines changed

.changeset/wicked-rocks-roll.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# c2pa-ts
22

3+
## 0.13.0
4+
5+
### Minor Changes
6+
7+
- 1e7491c: Runtime Agnostic Streaming - Breaking API Change
8+
9+
### Changed APIs
10+
- `writeToFile(path: string)``writeToStream(stream: WritableStream<Uint8Array>)`
11+
12+
This change affects:
13+
- `AssetDataReader.writeToFile``AssetDataReader.writeToStream`
14+
- `Asset.writeToFile``Asset.writeToStream`
15+
- `BaseAsset.writeToFile``BaseAsset.writeToStream`
16+
- `BlobDataReader.writeToFile``BlobDataReader.writeToStream`
17+
- `BufferDataReader.writeToFile``BufferDataReader.writeToStream`
18+
19+
### Migration Guide
20+
21+
The caller is now responsible for creating the `WritableStream` using their runtime:
22+
23+
**Node.js:**
24+
25+
```typescript
26+
import { createWriteStream } from 'node:fs';
27+
import { Writable } from 'node:stream';
28+
29+
const nodeStream = createWriteStream(outputPath);
30+
const writableStream = Writable.toWeb(nodeStream);
31+
await asset.writeToStream(writableStream);
32+
```
33+
34+
### Removed Node.js Imports
35+
- Removed `import { createWriteStream, WriteStream } from 'node:fs'` from `BlobDataReader.ts`
36+
- Removed `import { writeFile } from 'node:fs/promises'` from `BufferDataReader.ts`
37+
38+
This enables the library to be bundled for client-side applications (e.g., Next.js with Turbopack) without Node.js polyfills.
39+
340
## 0.12.1
441

542
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@trustnxt/c2pa-ts",
3-
"version": "0.12.1",
3+
"version": "0.13.0",
44
"type": "module",
55
"author": "TrustNXT GmbH <mail@trustnxt.com>",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)