Skip to content

Commit cc792f8

Browse files
authored
Merge pull request #167 from flowglad/release-please--branches--main--changes--next--components--node
release: 0.20.0
2 parents cf17066 + 5d7eea6 commit cc792f8

File tree

115 files changed

+13498
-352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+13498
-352
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
"postCreateCommand": "yarn install",
1010
"customizations": {
1111
"vscode": {
12-
"extensions": [
13-
"esbenp.prettier-vscode"
14-
]
12+
"extensions": ["esbenp.prettier-vscode"]
1513
}
1614
}
1715
}

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- 'integrated/**'
88
- 'stl-preview-head/**'
99
- 'stl-preview-base/**'
10+
pull_request:
11+
branches-ignore:
12+
- 'stl-preview-head/**'
13+
- 'stl-preview-base/**'
1014

1115
jobs:
1216
lint:
@@ -19,7 +23,7 @@ jobs:
1923
- name: Set up Node
2024
uses: actions/setup-node@v4
2125
with:
22-
node-version: '18'
26+
node-version: '20'
2327

2428
- name: Bootstrap
2529
run: ./scripts/bootstrap
@@ -40,7 +44,7 @@ jobs:
4044
- name: Set up Node
4145
uses: actions/setup-node@v4
4246
with:
43-
node-version: '18'
47+
node-version: '20'
4448

4549
- name: Bootstrap
4650
run: ./scripts/bootstrap
@@ -72,10 +76,13 @@ jobs:
7276
- name: Set up Node
7377
uses: actions/setup-node@v4
7478
with:
75-
node-version: '18'
79+
node-version: '22'
7680

7781
- name: Bootstrap
7882
run: ./scripts/bootstrap
7983

84+
- name: Build
85+
run: ./scripts/build
86+
8087
- name: Run tests
8188
run: ./scripts/test

.github/workflows/publish-npm.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
name: Publish NPM
55
on:
66
workflow_dispatch:
7+
inputs:
8+
path:
9+
description: The path to run the release in, e.g. '.' or 'packages/mcp-server'
10+
required: true
711

812
release:
913
types: [published]
@@ -19,14 +23,19 @@ jobs:
1923
- name: Set up Node
2024
uses: actions/setup-node@v3
2125
with:
22-
node-version: '18'
26+
node-version: '20'
2327

2428
- name: Install dependencies
2529
run: |
2630
yarn install
2731
2832
- name: Publish to NPM
2933
run: |
30-
bash ./bin/publish-npm
34+
if [ -n "${{ github.event.inputs.path }}" ]; then
35+
PATHS_RELEASED='[\"${{ github.event.inputs.path }}\"]'
36+
else
37+
PATHS_RELEASED='[\".\", \"packages/mcp-server\"]'
38+
fi
39+
yarn tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
3140
env:
3241
NPM_TOKEN: ${{ secrets.FLOWGLAD_NPM_TOKEN || secrets.NPM_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ jobs:
1919
bash ./bin/check-release-environment
2020
env:
2121
NPM_TOKEN: ${{ secrets.FLOWGLAD_NPM_TOKEN || secrets.NPM_TOKEN }}
22-

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ CHANGELOG.md
44
/deno
55

66
# don't format tsc output, will break source maps
7-
/dist
7+
dist

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.19.3"
2+
".": "0.20.0"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 47
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/flowglad%2Fflowglad-00982324965dd53510b4c1f874349206c20a750409b11e6bb3105d4a9bd47c99.yml
33
openapi_spec_hash: 1265eacb911822059d557d67651ce9a4
4-
config_hash: 67ca63fcd5d20f837ad72100ba11dd71
4+
config_hash: b58ee2165665ca3b3a690e4399dfea45

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,49 @@
11
# Changelog
2+
## 0.20.0 (2025-06-23)
3+
4+
Full Changelog: [v0.19.3...v0.20.0](https://github.com/flowglad/flowglad-node/compare/v0.19.3...v0.20.0)
5+
6+
### Features
7+
8+
* **client:** add support for endpoint-specific base URLs ([5a82f21](https://github.com/flowglad/flowglad-node/commit/5a82f2175b03b4f3a8257997de18443fa95adb6b))
9+
* **client:** add withOptions helper ([ccd3f8d](https://github.com/flowglad/flowglad-node/commit/ccd3f8d8d85f1be17fb41047572477810b138941))
10+
11+
12+
### Bug Fixes
13+
14+
* **client:** always overwrite when merging headers ([be6125e](https://github.com/flowglad/flowglad-node/commit/be6125e4fa45c50f6bdf6cf79d21c346faf099ee))
15+
* **client:** explicitly copy fetch in withOptions ([a075167](https://github.com/flowglad/flowglad-node/commit/a075167dc9cee2557b3b89a84e652a0c9148b74a))
16+
* compat with more runtimes ([c6e2c80](https://github.com/flowglad/flowglad-node/commit/c6e2c80a6f410aeb25ab05c8ea3ea1cdd6e15ae4))
17+
* publish script — handle NPM errors correctly ([58f80d7](https://github.com/flowglad/flowglad-node/commit/58f80d7d4c2a250e3f01b9fec831f82c3a2329ec))
18+
19+
20+
### Chores
21+
22+
* adjust eslint.config.mjs ignore pattern ([17914a2](https://github.com/flowglad/flowglad-node/commit/17914a24f1796b54b28cefc6dc62c684259a3b60))
23+
* avoid type error in certain environments ([f8edd17](https://github.com/flowglad/flowglad-node/commit/f8edd17560cc0dc62801e18c0eb36248bc458eee))
24+
* **ci:** enable for pull requests ([3742f46](https://github.com/flowglad/flowglad-node/commit/3742f46b541c90d80a3f62584d53e93f612c312f))
25+
* **client:** drop support for EOL node versions ([fe63be8](https://github.com/flowglad/flowglad-node/commit/fe63be8a99b4bc10335ade513595b5c57df36c51))
26+
* **client:** refactor imports ([7ccd8cd](https://github.com/flowglad/flowglad-node/commit/7ccd8cd67f75c4f8aaf4745b6f6b8814d0d017f1))
27+
* configure new SDK language ([fc92220](https://github.com/flowglad/flowglad-node/commit/fc92220a3df6f0032f664592e6ab4540b5a5ce95))
28+
* **deps:** bump eslint-plugin-prettier ([cad7a60](https://github.com/flowglad/flowglad-node/commit/cad7a603f5d66d6ba02fbe6d6e3af7695b209370))
29+
* **docs:** grammar improvements ([381cb9f](https://github.com/flowglad/flowglad-node/commit/381cb9fa9171106cefef5161b3cab75f616affa4))
30+
* **docs:** use top-level-await in example snippets ([fa4d484](https://github.com/flowglad/flowglad-node/commit/fa4d484b457830c7fa307af2955422dec4dacbb6))
31+
* improve publish-npm script --latest tag logic ([25c4a83](https://github.com/flowglad/flowglad-node/commit/25c4a834927a82798fd3be38fc8c9c3eba544045))
32+
* **internal:** add pure annotations, make base APIResource abstract ([3c796f4](https://github.com/flowglad/flowglad-node/commit/3c796f4c39455395e8548f08229d3a3dc468a2fc))
33+
* **internal:** codegen related update ([46cb6de](https://github.com/flowglad/flowglad-node/commit/46cb6de1846471fd9e329d1d7e8724e3d2dadc35))
34+
* **internal:** fix readablestream types in node 20 ([7e9b2bc](https://github.com/flowglad/flowglad-node/commit/7e9b2bc80d4159f465548ebf1fbb6637176c4de3))
35+
* **internal:** refactor utils ([c77f96e](https://github.com/flowglad/flowglad-node/commit/c77f96efcc737e22af3564dcd9cb1cc5aa5448cd))
36+
* **internal:** share typescript helpers ([3d4da28](https://github.com/flowglad/flowglad-node/commit/3d4da2880f8db32231763163897e8a81922d2e9e))
37+
* **internal:** update jest config ([fc657ba](https://github.com/flowglad/flowglad-node/commit/fc657ba6cd143572fdf23a060527606e0c4e8354))
38+
* **package:** remove engines ([fc2699b](https://github.com/flowglad/flowglad-node/commit/fc2699b14740fc8de8b13a4461bfaf4bfbbf39e6))
39+
* **readme:** update badges ([aeeecfb](https://github.com/flowglad/flowglad-node/commit/aeeecfbba8054e1346ba5af3b16b2564c2018b85))
40+
* **readme:** use better example snippet for undocumented params ([830a80c](https://github.com/flowglad/flowglad-node/commit/830a80c218feee976d2b919867d298629162bb22))
41+
42+
43+
### Documentation
44+
45+
* **readme:** fix typo ([6dd84f2](https://github.com/flowglad/flowglad-node/commit/6dd84f2502fb96abd38fd9842b5ab4a690aa4f93))
46+
247
## 0.19.3 (2025-04-28)
348

449
Full Changelog: [v0.19.2...v0.19.3](https://github.com/flowglad/flowglad-node/compare/v0.19.2...v0.19.3)

README.md

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Flowglad TypeScript API Library
22

3-
[![NPM version](https://img.shields.io/npm/v/@flowglad/node.svg)](https://npmjs.org/package/@flowglad/node) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@flowglad/node)
3+
[![NPM version](<https://img.shields.io/npm/v/@flowglad/node.svg?label=npm%20(stable)>)](https://npmjs.org/package/@flowglad/node) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@flowglad/node)
44

55
This library provides convenient access to the Flowglad REST API from server-side TypeScript or JavaScript.
66

@@ -24,13 +24,9 @@ import Flowglad from '@flowglad/node';
2424

2525
const client = new Flowglad();
2626

27-
async function main() {
28-
const payments = await client.payments.list();
27+
const payments = await client.payments.list();
2928

30-
console.log(payments.data);
31-
}
32-
33-
main();
29+
console.log(payments.data);
3430
```
3531

3632
### Request & Response types
@@ -43,11 +39,7 @@ import Flowglad from '@flowglad/node';
4339

4440
const client = new Flowglad();
4541

46-
async function main() {
47-
const payments: Flowglad.PaymentListResponse = await client.payments.list();
48-
}
49-
50-
main();
42+
const payments: Flowglad.PaymentListResponse = await client.payments.list();
5143
```
5244

5345
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
@@ -60,22 +52,18 @@ a subclass of `APIError` will be thrown:
6052

6153
<!-- prettier-ignore -->
6254
```ts
63-
async function main() {
64-
const payments = await client.payments.list().catch(async (err) => {
65-
if (err instanceof Flowglad.APIError) {
66-
console.log(err.status); // 400
67-
console.log(err.name); // BadRequestError
68-
console.log(err.headers); // {server: 'nginx', ...}
69-
} else {
70-
throw err;
71-
}
72-
});
73-
}
74-
75-
main();
55+
const payments = await client.payments.list().catch(async (err) => {
56+
if (err instanceof Flowglad.APIError) {
57+
console.log(err.status); // 400
58+
console.log(err.name); // BadRequestError
59+
console.log(err.headers); // {server: 'nginx', ...}
60+
} else {
61+
throw err;
62+
}
63+
});
7664
```
7765

78-
Error codes are as followed:
66+
Error codes are as follows:
7967

8068
| Status Code | Error Type |
8169
| ----------- | -------------------------- |
@@ -230,9 +218,8 @@ parameter. This library doesn't validate at runtime that the request matches the
230218
send will be sent as-is.
231219

232220
```ts
233-
client.foo.create({
234-
foo: 'my_param',
235-
bar: 12,
221+
client.payments.list({
222+
// ...
236223
// @ts-expect-error baz is not yet public
237224
baz: 'undocumented option',
238225
});
@@ -350,7 +337,7 @@ TypeScript >= 4.9 is supported.
350337
The following runtimes are supported:
351338

352339
- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
353-
- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
340+
- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
354341
- Deno v1.28.0 or higher.
355342
- Bun 1.0 or later.
356343
- Cloudflare Workers.

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Flowglad please follow the respective company's security reporting guidelines.
19+
or products provided by Flowglad, please follow the respective company's security reporting guidelines.
2020

2121
### Flowglad Terms and Policies
2222

23-
Please contact dev-feedback@flowglad.com for any questions or concerns regarding security of our services.
23+
Please contact dev-feedback@flowglad.com for any questions or concerns regarding the security of our services.
2424

2525
---
2626

0 commit comments

Comments
 (0)