diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 842da6f7..b52c1095 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,7 +29,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
- version: '10.24.0'
+ version: '10.27.0'
- name: Bootstrap
run: ./scripts/bootstrap
@@ -56,7 +56,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
- version: '10.24.0'
+ version: '10.27.0'
- name: Bootstrap
run: ./scripts/bootstrap
@@ -94,7 +94,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
- version: '10.24.0'
+ version: '10.27.0'
- name: Bootstrap
run: ./scripts/bootstrap
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 48fbed91..a5d1cf28 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "2.1.1"
+ ".": "2.2.0"
}
diff --git a/.stats.yml b/.stats.yml
index 0b9b0427..d87998c4 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 30
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-ba1aa76b54891af8c72220bd811d652cb2e743c4f86b8a589dd6cb2938b09f1c.yml
-openapi_spec_hash: 10de3e6e4b87644087c976b62b571405
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-b0c6cc68de341e8d1e6f38b60aadfbffbeaf333804191a1e001f21b7524dcacb.yml
+openapi_spec_hash: 772eb395f3ca214821653a6185ee0e4e
config_hash: bf64816643634a621cd0ffd93d9c4347
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b95f336e..287c8aeb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,25 @@
# Changelog
+## 2.2.0 (2026-02-06)
+
+Full Changelog: [v2.1.1...v2.2.0](https://github.com/ArcadeAI/arcade-js/compare/v2.1.1...v2.2.0)
+
+### Features
+
+* **api:** api update ([bf01d02](https://github.com/ArcadeAI/arcade-js/commit/bf01d02cfddbacf1270c1372461c08b38c322d6f))
+
+
+### Bug Fixes
+
+* **client:** avoid removing abort listener too early ([9c4802e](https://github.com/ArcadeAI/arcade-js/commit/9c4802e63244418cf2e04f58c2c2e34b8735ba78))
+
+
+### Chores
+
+* **client:** restructure abort controller binding ([1a83b30](https://github.com/ArcadeAI/arcade-js/commit/1a83b3057f9879f7eb0c7252d0baadbd479e51bf))
+* **internal:** fix pagination internals not accepting option promises ([6f96352](https://github.com/ArcadeAI/arcade-js/commit/6f96352e7736a1c9c7776f6c5917ec6ce5356040))
+* **internal:** upgrade pnpm ([332eae9](https://github.com/ArcadeAI/arcade-js/commit/332eae981cc04b4611cd47d354636bc66dd9d8f0))
+
## 2.1.1 (2026-02-03)
Full Changelog: [v2.1.0...v2.1.1](https://github.com/ArcadeAI/arcade-js/compare/v2.1.0...v2.1.1)
diff --git a/api.md b/api.md
index a43259c3..e9a97696 100644
--- a/api.md
+++ b/api.md
@@ -129,7 +129,7 @@ Types:
Methods:
- client.tools.formatted.list({ ...params }) -> FormattedListResponsesOffsetPage
-- client.tools.formatted.get(name, { ...params }) -> unknown
+- client.tools.formatted.get(name, { ...params }) -> FormattedGetResponse
# Workers
diff --git a/package.json b/package.json
index e1affe44..e21d4fb1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@arcadeai/arcadejs",
- "version": "2.1.1",
+ "version": "2.2.0",
"description": "The official TypeScript library for the Arcade API",
"author": "Arcade ",
"types": "dist/index.d.ts",
@@ -8,7 +8,7 @@
"type": "commonjs",
"repository": "github:ArcadeAI/arcade-js",
"license": "MIT",
- "packageManager": "pnpm@10.24.0",
+ "packageManager": "pnpm@10.27.0",
"files": [
"**/*"
],
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9643a973..7a6d1aaf 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1898,7 +1898,7 @@ packages:
optional: true
tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz:
- resolution: {tarball: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz}
+ resolution: {integrity: sha512-tWyCXnx0WqCkVlo5s+4KMj7HC0/0YrCZY0PustUwX9F2lNwd8Kp07q/Q56uGvV9q80XaSDrhy0YqBmrX5TDNpQ==, tarball: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz}
version: 1.1.9
engines: {node: '>=14'}
hasBin: true
diff --git a/src/client.ts b/src/client.ts
index 990b9457..1f3d1812 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -511,9 +511,14 @@ export class Arcade {
getAPIList- = Pagination.AbstractPage
- >(
path: string,
Page: new (...args: any[]) => PageClass,
- opts?: RequestOptions,
+ opts?: PromiseOrValue,
): Pagination.PagePromise {
- return this.requestAPIList(Page, { method: 'get', path, ...opts });
+ return this.requestAPIList(
+ Page,
+ opts && 'then' in opts ?
+ opts.then((opts) => ({ method: 'get', path, ...opts }))
+ : { method: 'get', path, ...opts },
+ );
}
requestAPIList<
@@ -521,7 +526,7 @@ export class Arcade {
PageClass extends Pagination.AbstractPage
- = Pagination.AbstractPage
- ,
>(
Page: new (...args: ConstructorParameters) => PageClass,
- options: FinalRequestOptions,
+ options: PromiseOrValue,
): Pagination.PagePromise {
const request = this.makeRequest(options, null, undefined);
return new Pagination.PagePromise(this as any as Arcade, request, Page);
@@ -534,7 +539,7 @@ export class Arcade {
controller: AbortController,
): Promise {
const { signal, method, ...options } = init || {};
- const abort = controller.abort.bind(controller);
+ const abort = this._makeAbort(controller);
if (signal) signal.addEventListener('abort', abort, { once: true });
const timeout = setTimeout(abort, ms);
@@ -704,6 +709,12 @@ export class Arcade {
return headers.values;
}
+ private _makeAbort(controller: AbortController) {
+ // note: we can't just inline this method inside `fetchWithTimeout()` because then the closure
+ // would capture all request options, and cause a memory leak.
+ return () => controller.abort();
+ }
+
private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
bodyHeaders: HeadersLike;
body: BodyInit | undefined;
diff --git a/src/resources/tools/formatted.ts b/src/resources/tools/formatted.ts
index 6c35ef88..b6f04d44 100644
--- a/src/resources/tools/formatted.ts
+++ b/src/resources/tools/formatted.ts
@@ -28,16 +28,16 @@ export class Formatted extends APIResource {
name: string,
query: FormattedGetParams | null | undefined = {},
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.get(path`/v1/formatted_tools/${name}`, { query, ...options });
}
}
export type FormattedListResponsesOffsetPage = OffsetPage;
-export type FormattedListResponse = unknown;
+export type FormattedListResponse = { [key: string]: unknown };
-export type FormattedGetResponse = unknown;
+export type FormattedGetResponse = { [key: string]: unknown };
export interface FormattedListParams extends OffsetPageParams {
/**
diff --git a/src/version.ts b/src/version.ts
index 834ee244..72404008 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '2.1.1'; // x-release-please-version
+export const VERSION = '2.2.0'; // x-release-please-version