Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ab1bfe8
chore(ci): upgrade `actions/github-script`
stainless-app[bot] Jan 24, 2026
56900be
fix(client): avoid memory leak with abort signals
stainless-app[bot] Feb 3, 2026
fdf2834
chore(client): do not parse responses with empty content-length
stainless-app[bot] Feb 3, 2026
55978f2
chore(client): restructure abort controller binding
stainless-app[bot] Feb 5, 2026
d98d3e7
fix(types): correctly define false enum
stainless-app[bot] Feb 6, 2026
db6b522
fix(client): avoid removing abort listener too early
stainless-app[bot] Feb 6, 2026
a460ca8
chore(internal): avoid type checking errors with ts-reset
stainless-app[bot] Feb 12, 2026
a7577d3
chore(internal/client): fix form-urlencoded requests
stainless-app[bot] Feb 18, 2026
c43d01f
chore(internal): remove mock server code
stainless-app[bot] Feb 20, 2026
ffdfd49
chore: update mock server docs
stainless-app[bot] Feb 20, 2026
be11d0a
fix(docs/contributing): correct pnpm link command
stainless-app[bot] Feb 24, 2026
3792b09
chore(internal): move stringifyQuery implementation to internal function
stainless-app[bot] Feb 27, 2026
1fa19be
chore(internal): codegen related update
stainless-app[bot] Mar 6, 2026
2e885d3
chore(ci): skip uploading artifacts on stainless-internal branches
stainless-app[bot] Mar 7, 2026
2e95c34
fix(client): preserve URL params already embedded in path
stainless-app[bot] Mar 7, 2026
a5c0a52
chore(internal): update dependencies to address dependabot vulnerabil…
stainless-app[bot] Mar 10, 2026
f6b03e1
chore(internal): tweak CI branches
stainless-app[bot] Mar 17, 2026
b586d6c
chore(internal): update gitignore
stainless-app[bot] Mar 24, 2026
535a81c
chore(ci): skip lint on metadata-only changes
stainless-app[bot] Mar 25, 2026
ad2acff
chore(internal): codegen related update
stainless-app[bot] Mar 28, 2026
4d3051b
chore(internal): codegen related update
stainless-app[bot] Apr 9, 2026
d8899f9
chore(internal): codegen related update
stainless-app[bot] Apr 13, 2026
a5910a6
chore(internal): more robust bootstrap script
stainless-app[bot] Apr 23, 2026
be7a426
chore(internal): codegen related update
stainless-app[bot] Apr 28, 2026
f11a428
feat: support setting headers via env
stainless-app[bot] Apr 28, 2026
5fd099e
chore(format): run eslint and prettier separately
stainless-app[bot] Apr 29, 2026
6173dd6
codegen metadata
stainless-app[bot] May 1, 2026
764f596
codegen metadata
stainless-app[bot] May 1, 2026
6420eb0
chore: redact api-key headers in debug logs
stainless-app[bot] May 8, 2026
fa199bb
ci: pin GitHub Actions to commit SHAs
stainless-app[bot] May 13, 2026
aa9716d
chore(tests): remove redundant File import
stainless-app[bot] May 19, 2026
ce0b41d
fix(typescript): upgrade tsc-multi so that it works with Node 26
stainless-app[bot] May 19, 2026
84ad0c5
release: 0.30.0
stainless-app[bot] May 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: CI
on:
push:
branches-ignore:
- 'generated'
- 'codegen/**'
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
branches:
- '**'
- '!integrated/**'
- '!stl-preview-head/**'
- '!stl-preview-base/**'
- '!generated'
- '!codegen/**'
- 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
Expand All @@ -17,12 +19,12 @@ jobs:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/flowglad-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'

Expand All @@ -36,15 +38,15 @@ jobs:
timeout-minutes: 5
name: build
runs-on: ${{ github.repository == 'stainless-sdks/flowglad-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'

Expand All @@ -55,14 +57,18 @@ jobs:
run: ./scripts/build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/flowglad-typescript'
if: |-
github.repository == 'stainless-sdks/flowglad-typescript' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v6
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/flowglad-typescript'
if: |-
github.repository == 'stainless-sdks/flowglad-typescript' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand All @@ -74,10 +80,10 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/flowglad-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: '20'

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ jobs:
if: github.repository == 'flowglad/flowglad-node' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.FLOWGLAD_NPM_TOKEN || secrets.NPM_TOKEN }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.prism.log
.stdy.log
node_modules
yarn-error.log
codegen.log
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.29.0"
".": "0.30.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 54
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/flowglad%2Fflowglad-06c4dd78e137fdf8d3acd39424e5d6158e0a719903996d933af8832eee705d9c.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/flowglad/flowglad-c0ecb31777a8b9fbe565a160dff198024134f09b2599cf1bbf4d0fc85f25168a.yml
openapi_spec_hash: fd5d4fe4838681b6dc19595f6ad24923
config_hash: 7194205a326772d1af6151798bc4172e
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,48 @@
# Changelog
## 0.30.0 (2026-05-19)

Full Changelog: [v0.29.0...v0.30.0](https://github.com/flowglad/flowglad-node/compare/v0.29.0...v0.30.0)

### Features

* support setting headers via env ([f11a428](https://github.com/flowglad/flowglad-node/commit/f11a428c27039ecfe3c3463c7503e6ecd4412dce))


### Bug Fixes

* **client:** avoid memory leak with abort signals ([56900be](https://github.com/flowglad/flowglad-node/commit/56900bed3729ab2a7f4d872fad1692a888cbf802))
* **client:** avoid removing abort listener too early ([db6b522](https://github.com/flowglad/flowglad-node/commit/db6b522ba19e11051a8d26be9905d8a88796d455))
* **client:** preserve URL params already embedded in path ([2e95c34](https://github.com/flowglad/flowglad-node/commit/2e95c3400584f0b269b3d03bf32baf5c9845ac0d))
* **docs/contributing:** correct pnpm link command ([be11d0a](https://github.com/flowglad/flowglad-node/commit/be11d0a5c085b7c83925d729adda0c419195e9de))
* **types:** correctly define false enum ([d98d3e7](https://github.com/flowglad/flowglad-node/commit/d98d3e7d87551397703c141d873e8b4234a8a889))
* **typescript:** upgrade tsc-multi so that it works with Node 26 ([ce0b41d](https://github.com/flowglad/flowglad-node/commit/ce0b41db297739443c68e79a149ed862b6bbb4ef))


### Chores

* **ci:** skip lint on metadata-only changes ([535a81c](https://github.com/flowglad/flowglad-node/commit/535a81c7223a2b25aef440e1d7aa16bd8be2bbe9))
* **ci:** skip uploading artifacts on stainless-internal branches ([2e885d3](https://github.com/flowglad/flowglad-node/commit/2e885d3664f770c40e2e2ad106791a9108a7a26b))
* **ci:** upgrade `actions/github-script` ([ab1bfe8](https://github.com/flowglad/flowglad-node/commit/ab1bfe8705631f229c10ac023bc8ae205c4edd46))
* **client:** do not parse responses with empty content-length ([fdf2834](https://github.com/flowglad/flowglad-node/commit/fdf283447a556e939343febecc89663c4b2ac9e6))
* **client:** restructure abort controller binding ([55978f2](https://github.com/flowglad/flowglad-node/commit/55978f2f8d4ece515b0613b7e47833a5dd7c1a84))
* **format:** run eslint and prettier separately ([5fd099e](https://github.com/flowglad/flowglad-node/commit/5fd099eb41153efbbeb5b15242afea4d9ea40221))
* **internal/client:** fix form-urlencoded requests ([a7577d3](https://github.com/flowglad/flowglad-node/commit/a7577d3c4b321509d224b71464e184e8df875888))
* **internal:** avoid type checking errors with ts-reset ([a460ca8](https://github.com/flowglad/flowglad-node/commit/a460ca893ece9bf09c768db7fd3122c5b60d7caa))
* **internal:** codegen related update ([be7a426](https://github.com/flowglad/flowglad-node/commit/be7a426b5810fd9d183b005f097175c8b230d5a6))
* **internal:** codegen related update ([d8899f9](https://github.com/flowglad/flowglad-node/commit/d8899f9ab15a0a6900be9342ed65916ea4a92fc2))
* **internal:** codegen related update ([4d3051b](https://github.com/flowglad/flowglad-node/commit/4d3051b8e49e6df7c2f37ef00f5734dab256bf3d))
* **internal:** codegen related update ([ad2acff](https://github.com/flowglad/flowglad-node/commit/ad2acffa62f31f17960868ae3aeab9cb52139552))
* **internal:** codegen related update ([1fa19be](https://github.com/flowglad/flowglad-node/commit/1fa19be68f6a9fa3fb441055d9e7cbfea2d75de5))
* **internal:** more robust bootstrap script ([a5910a6](https://github.com/flowglad/flowglad-node/commit/a5910a66a047c6dc6b067fb5a7a8310eacabdf87))
* **internal:** move stringifyQuery implementation to internal function ([3792b09](https://github.com/flowglad/flowglad-node/commit/3792b09d9a46f121bd4d45e1b7142170ce039c3d))
* **internal:** remove mock server code ([c43d01f](https://github.com/flowglad/flowglad-node/commit/c43d01f473f3df46d3c718b61ddfa7892b5283c2))
* **internal:** tweak CI branches ([f6b03e1](https://github.com/flowglad/flowglad-node/commit/f6b03e1a88298b87982b912bff58aee377bcd3cc))
* **internal:** update dependencies to address dependabot vulnerabilities ([a5c0a52](https://github.com/flowglad/flowglad-node/commit/a5c0a5203845a06b1ea7e42e9b20ac43c3a56c6c))
* **internal:** update gitignore ([b586d6c](https://github.com/flowglad/flowglad-node/commit/b586d6c260bf9c09d0b9077092a6478e4e25e038))
* redact api-key headers in debug logs ([6420eb0](https://github.com/flowglad/flowglad-node/commit/6420eb0370c498b66e6d9e1fb5aff4924a3629b5))
* **tests:** remove redundant File import ([aa9716d](https://github.com/flowglad/flowglad-node/commit/aa9716df3bfa07a43ceccccc4a84400ee2960159))
* update mock server docs ([ffdfd49](https://github.com/flowglad/flowglad-node/commit/ffdfd49ee108db6b215a92b7f7953041cef7ee67))

## 0.29.0 (2026-01-18)

Full Changelog: [v0.28.0...v0.29.0](https://github.com/flowglad/flowglad-node/compare/v0.28.0...v0.29.0)
Expand Down
8 changes: 1 addition & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,11 @@ $ yarn link @flowglad/node
# With pnpm
$ pnpm link --global
$ cd ../my-package
$ pnpm link -global @flowglad/node
$ pnpm link --global @flowglad/node
```

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```sh
$ npx prism mock path/to/your/openapi.yml
```

```sh
$ yarn run test
```
Expand Down
3 changes: 0 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @ts-check
import tseslint from 'typescript-eslint';
import unusedImports from 'eslint-plugin-unused-imports';
import prettier from 'eslint-plugin-prettier';

export default tseslint.config(
{
Expand All @@ -14,11 +13,9 @@ export default tseslint.config(
plugins: {
'@typescript-eslint': tseslint.plugin,
'unused-imports': unusedImports,
prettier,
},
rules: {
'no-unused-vars': 'off',
'prettier/prettier': 'error',
'unused-imports/no-unused-imports': 'error',
'no-restricted-imports': [
'error',
Expand Down
16 changes: 13 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flowglad/node",
"version": "0.29.0",
"version": "0.30.0",
"description": "The official TypeScript library for the Flowglad API",
"author": "Flowglad <dev-feedback@flowglad.com>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -36,20 +36,30 @@
"@typescript-eslint/eslint-plugin": "8.31.1",
"@typescript-eslint/parser": "8.31.1",
"eslint": "^9.39.1",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-unused-imports": "^4.1.4",
"iconv-lite": "^0.6.3",
"jest": "^29.4.0",
"prettier": "^3.0.0",
"publint": "^0.2.12",
"ts-jest": "^29.1.0",
"ts-node": "^10.5.0",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz",
"tsconfig-paths": "^4.0.0",
"tslib": "^2.8.1",
"typescript": "5.8.3",
"typescript-eslint": "8.31.1"
},
"overrides": {
"minimatch": "^9.0.5"
},
"pnpm": {
"overrides": {
"minimatch": "^9.0.5"
}
},
"resolutions": {
"minimatch": "^9.0.5"
},
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

cd "$(dirname "$0")/.."

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
echo -n "==> Install Homebrew dependencies? (y/N): "
read -r response
Expand Down
9 changes: 3 additions & 6 deletions scripts/fast-format
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ if ! [ -z "$ESLINT_FILES" ]; then
fi

echo "==> Running prettier --write"
# format things eslint didn't
PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)"
if ! [ -z "$PRETTIER_FILES" ]; then
echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \
'!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
if ! [ -z "$FILE_LIST" ]; then
cat "$FILE_LIST" | xargs ./node_modules/.bin/prettier \
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern --ignore-unknown
fi
3 changes: 1 addition & 2 deletions scripts/format
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ echo "==> Running eslint --fix"
./node_modules/.bin/eslint --fix .

echo "==> Running prettier --write"
# format things eslint didn't
./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
./node_modules/.bin/prettier --write --cache --cache-strategy metadata .
3 changes: 3 additions & 0 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set -e

cd "$(dirname "$0")/.."

echo "==> Running prettier --check"
./node_modules/.bin/prettier --check .

echo "==> Running eslint"
./node_modules/.bin/eslint .

Expand Down
41 changes: 0 additions & 41 deletions scripts/mock

This file was deleted.

46 changes: 0 additions & 46 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,7 @@ set -e

cd "$(dirname "$0")/.."

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color

function prism_is_running() {
curl --silent "http://localhost:4010" >/dev/null 2>&1
}

kill_server_on_port() {
pids=$(lsof -t -i tcp:"$1" || echo "")
if [ "$pids" != "" ]; then
kill "$pids"
echo "Stopped $pids."
fi
}

function is_overriding_api_base_url() {
[ -n "$TEST_API_BASE_URL" ]
}

if ! is_overriding_api_base_url && ! prism_is_running ; then
# When we exit this script, make sure to kill the background mock server process
trap 'kill_server_on_port 4010' EXIT

# Start the dev server
./scripts/mock --daemon
fi

if is_overriding_api_base_url ; then
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
echo
elif ! prism_is_running ; then
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
echo -e "running against your OpenAPI spec."
echo
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo

exit 1
else
echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
echo
fi

echo "==> Running tests"
./node_modules/.bin/jest "$@"
Loading
Loading