File tree Expand file tree Collapse file tree 3 files changed +38
-40
lines changed
Expand file tree Collapse file tree 3 files changed +38
-40
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments