Skip to content

Commit 1517a80

Browse files
authored
Merge pull request #9 from PSPDFKit-labs/release/2.0.0
Release/2.0.0
2 parents 358cfd6 + 838c1a1 commit 1517a80

7 files changed

Lines changed: 85 additions & 40 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
_Nothing yet._
11+
12+
## [2.0.0] - 2026-01-27
13+
1014
### Security
1115

1216
- Updated `axios` from ^1.10.0 to ^1.13.2 to fix DoS vulnerability (GHSA-4hjh-wcwx-xvwj)
1317
- Updated `form-data` from ^4.0.4 to ^4.0.5
1418
- Added npm overrides for transitive dependency vulnerabilities:
1519
- `glob` ^11.0.4 (fixes GHSA-5j98-mcp5-4vw2 command injection)
1620
- `js-yaml` ^4.1.1 (fixes GHSA-mh29-5h37-fv8m prototype pollution)
21+
- URL inputs are no longer fetched client-side; URLs are passed to the server to mitigate SSRF risks
1722

1823
### Changed
1924

20-
- Updated devDependencies to latest compatible versions:
21-
- `@eslint/eslintrc` ^3.3.3
22-
- `@eslint/js` ^9.39.2
23-
- `@types/node` ^24.10.7
24-
- `@typescript-eslint/eslint-plugin` ^8.53.0
25-
- `@typescript-eslint/parser` ^8.53.0
26-
- `dotenv` ^17.2.3
27-
- `eslint` ^9.39.2
28-
- `eslint-config-prettier` ^10.1.8
29-
- `eslint-plugin-jest` ^29.12.1
30-
- `globals` ^16.5.0
31-
- `jest` ^30.2.0
32-
- `openapi-typescript` ^7.10.1
33-
- `prettier` ^3.7.4
34-
- `rimraf` ^6.1.2
35-
- `ts-jest` ^29.4.6
36-
- `tsup` ^8.5.1
37-
- `tsx` ^4.21.0
38-
- `typescript` ^5.9.3
25+
- Most methods accept URL inputs via `FileInputWithUrl` and pass URLs to the server for fetching
26+
- `sign()` now only accepts local files (file paths, Buffers, or Uint8Arrays); fetch remote files first
27+
- Updated devDependencies to latest compatible versions
3928
- Switched Jest coverage provider from Istanbul to V8 for Node.js 25+ compatibility
4029
- Excluded generated API types from coverage collection (reduces noise in coverage reports)
4130

31+
### Removed
32+
33+
- Removed client-side URL fetching helper `processRemoteFileInput` from public exports
34+
- Removed client-side PDF parsing helpers (`getPdfPageCount`, `isValidPdf`)
35+
4236
### Added
4337

38+
- SSRF protection documentation in README
4439
- This CHANGELOG.md file to track project changes
4540

41+
4642
## [1.0.1] - 2025-01-09
4743

4844
### Changed
@@ -68,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6864
- Comprehensive error handling with typed error classes
6965
- AI agent integration rules for Claude Code, Cursor, GitHub Copilot, Junie, and Windsurf
7066

71-
[Unreleased]: https://github.com/PSPDFKit-labs/nutrient-dws-client-typescript/compare/v1.0.1...HEAD
67+
[Unreleased]: https://github.com/PSPDFKit-labs/nutrient-dws-client-typescript/compare/v2.0.0...HEAD
68+
[2.0.0]: https://github.com/PSPDFKit-labs/nutrient-dws-client-typescript/compare/v1.0.1...v2.0.0
7269
[1.0.1]: https://github.com/PSPDFKit-labs/nutrient-dws-client-typescript/compare/v1.0.0...v1.0.1
7370
[1.0.0]: https://github.com/PSPDFKit-labs/nutrient-dws-client-typescript/releases/tag/v1.0.0

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ or
3434
yarn add @nutrient-sdk/dws-client-typescript
3535
```
3636

37+
## Migration Guides
38+
39+
- v2.0.0: See `docs/MIGRATION.md` for URL input changes and `sign()` restrictions.
40+
3741
## Integration with Coding Agents
3842

3943
This package has built-in support with popular coding agents like Claude Code, GitHub Copilot, Cursor, and Windsurf by exposing scripts that will inject rules instructing the coding agents on how to use the package. This ensures that the coding agent doesn't hallucinate documentation, as well as making full use of all the features offered in Nutrient DWS TypeScript Client.

docs/MIGRATION.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Migration Guide
2+
3+
## 2.0.0
4+
5+
### 1) URL inputs now use `FileInputWithUrl`
6+
7+
`FileInput` no longer includes URLs. If you need to pass URLs, use `FileInputWithUrl`.
8+
9+
```ts
10+
import type { FileInputWithUrl } from '@nutrient-sdk/dws-client-typescript';
11+
12+
const input: FileInputWithUrl = 'https://example.com/doc.pdf';
13+
const result = await client.convert(input, 'docx');
14+
```
15+
16+
### 2) `processRemoteFileInput` removed
17+
18+
If you previously used `processRemoteFileInput`, fetch the remote file yourself and pass a buffer.
19+
20+
```ts
21+
// v1.x (no longer available)
22+
import { processRemoteFileInput } from '@nutrient-sdk/dws-client-typescript';
23+
24+
// v2.0.0+
25+
const res = await fetch('https://example.com/doc.pdf');
26+
const buffer = Buffer.from(await res.arrayBuffer());
27+
const result = await client.sign(buffer, { data: { signatureType: 'cms' } });
28+
```
29+
30+
### 3) `sign()` no longer accepts URLs
31+
32+
`sign()` only accepts local inputs (file path, Buffer, or Uint8Array). For remote files, fetch first and pass a buffer.

examples/package-lock.json

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"private": true,
1111
"dependencies": {
1212
"dotenv": "^17.0.0",
13-
"@nutrient-sdk/dws-client-typescript": "file:../nutrient-sdk-dws-client-typescript-1.0.1.tgz"
13+
"@nutrient-sdk/dws-client-typescript": "file:../nutrient-sdk-dws-client-typescript-2.0.0.tgz"
1414
},
1515
"devDependencies": {
1616
"@types/node": "^24.0.7",

package-lock.json

Lines changed: 14 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nutrient-sdk/dws-client-typescript",
3-
"version": "1.0.1",
3+
"version": "2.0.0",
44
"description": "Node.js TypeScript client library for Nutrient Document Web Services (DWS) API",
55
"keywords": [
66
"nutrient",

0 commit comments

Comments
 (0)