Skip to content

Commit 91f040f

Browse files
feat!: Upgrade minimum node version to 20 (#158)
1 parent 108a50c commit 91f040f

File tree

10 files changed

+46
-20
lines changed

10 files changed

+46
-20
lines changed

.github/workflows/build-test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ on:
44
push:
55
branches:
66
- main
7-
- v1.x
87
- release/beta
98
pull_request:
109
branches:
1110
- main
12-
- v1.x
1311
- release/beta
1412

1513
concurrency:
@@ -22,7 +20,7 @@ jobs:
2220
runs-on: ubuntu-latest
2321
strategy:
2422
matrix:
25-
node: [ 18, 20, 22, 24 ]
23+
node: [ 20, 22, 24 ]
2624
permissions:
2725
contents: read
2826
actions: write

.github/workflows/linting.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ on:
44
push:
55
branches:
66
- main
7-
- v1.x
87
- release/beta
98
pull_request:
109
branches:
1110
- main
12-
- v1.x
1311
- release/beta
1412

1513
concurrency:

.github/workflows/publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
- v1.x
87

98
jobs:
109
run-publish:

.github/workflows/release-on-push.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
- v1.x
87

98
jobs:
109
release_on_push:

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ in a response, this weakens the Typescript type but does not cause existing usag
2020
This means when upgrading minor versions of the SDK, you may notice type errors. You can safely ignore these or fix by
2121
adding additional type guards.
2222

23+
## 3.0.0 - 2025-07-03
24+
25+
> **Breaking changes:** This version includes major improvements that introduce breaking changes. These are called out
26+
> below.
27+
28+
### Changed
29+
30+
- **Breaking change:** Updated the minimum required Node.js version to v20.
31+
- **Breaking change:** Changed default logging level to `error`. You can change it to `verbose` or `none` in the
32+
SDK configuration.
33+
- Changed the typescript configuration to transpile into ES2022
34+
35+
---
36+
2337
## 2.8.0 - 2025-06-18
2438

2539
### Added

UPGRADING.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,30 @@
22

33
All breaking changes will be documented in this file to assist with upgrading to newer versions of the SDK.
44

5+
## v3.0.0
6+
7+
There are two breaking changes in this release:
8+
9+
1. Minimum Node.js version is now 20.0.0.
10+
- We decided to drop support for Node.js 18 as it is no longer maintained.
11+
- If you are using Node.js version 18 or below, you will need to upgrade to Node.js version 20 or above.
12+
13+
2. Updated default logLevel.
14+
- Initially, the default log level was set to `verbose`, but we have changed it to `error` to reduce noise in the
15+
logs.
16+
- If you want to change the log level, you can do so by passing the `logLevel` option when initializing the SDK.
17+
518
## v2.0.0
619

720
There are two breaking changes in this release:
821

9-
1. Minimum Node.js version is now 18.0.0.
10-
- We had to restrict the minimum version as we would like to use native `fetch` API instead of `node-fetch` package.
11-
- If you are using Node.js version 16 or below, you will need to upgrade to Node.js version 18 or above.
22+
1. Minimum Node.js version is now 18.0.0.
23+
- We had to restrict the minimum version as we would like to use native `fetch` API instead of `node-fetch` package.
24+
- If you are using Node.js version 16 or below, you will need to upgrade to Node.js version 18 or above.
1225

1326
2. `Webhooks.unmarshal` and `Webhooks.isSignatureValid` now returns a promise.
14-
- As we started supporting edge runtimes, we had to make these methods async as the edge version of crypto returns a promise.
15-
- If you are using these methods, you will need to update your code to handle the promise.
27+
- As we started supporting edge runtimes, we had to make these methods async as the edge version of crypto returns a
28+
promise.
29+
- If you are using these methods, you will need to update your code to handle the promise.
1630

1731
---

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "@paddle/paddle-node-sdk",
3-
"version": "2.8.0",
3+
"version": "3.0.0",
44
"description": "A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.",
55
"main": "dist/cjs/index.cjs.node.js",
66
"module": "dist/esm/index.esm.node.js",
77
"types": "dist/types/index.cjs.node.d.ts",
88
"engines": {
9-
"node": ">=18"
9+
"node": ">=20"
1010
},
1111
"scripts": {
1212
"test": "jest",

src/internal/api/client.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ export class Client {
1717
private readonly options: PaddleOptions,
1818
) {
1919
this.baseUrl = this.getBaseUrl(this.options.environment);
20-
// TODO - Change the default to `error` in next major version
21-
Logger.logLevel = this.options.logLevel ?? LogLevel.verbose;
20+
Logger.logLevel = this.options.logLevel ?? LogLevel.error;
2221
}
2322

2423
private getBaseUrl(environment?: Environment): string {

src/paddle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class Paddle {
3030
private readonly client: Client;
3131
private readonly defaultPaddleOptions: Partial<PaddleOptions> = {
3232
environment: Environment.production,
33-
logLevel: LogLevel.verbose, // TODO - Change the default to `error` in next major version
33+
logLevel: LogLevel.error,
3434
};
3535

3636
public products: ProductsResource;

tsconfig.base.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"compilerOptions": {
3-
"target": "es2016",
4-
"lib": ["ESNext", "dom"],
3+
"target": "es2022",
4+
"lib": [
5+
"ESNext",
6+
"dom"
7+
],
58
"module": "NodeNext",
69
"rootDir": "./src",
710
"moduleResolution": "Node",
@@ -30,5 +33,7 @@
3033
"noPropertyAccessFromIndexSignature": true,
3134
"skipLibCheck": true
3235
},
33-
"include": ["./src"],
36+
"include": [
37+
"./src"
38+
]
3439
}

0 commit comments

Comments
 (0)