Skip to content

Commit 5d62178

Browse files
release: 2.8.0-alpha.1 (#177)
Automated Release PR --- ## 2.8.0-alpha.1 (2026-03-11) Full Changelog: [v2.7.0...v2.8.0-alpha.1](v2.7.0...v2.8.0-alpha.1) ### Features * [CORE-1804][apps/api] Add fetch API schema ([969d581](969d581)) * **api:** api update ([#19](#19)) ([8df9cc8](8df9cc8)) * **api:** update via SDK Studio ([#10](#10)) ([2c6c15d](2c6c15d)) * **api:** update via SDK Studio ([#11](#11)) ([9191ed6](9191ed6)) * **api:** update via SDK Studio ([#12](#12)) ([ebeaf82](ebeaf82)) * **api:** update via SDK Studio ([#13](#13)) ([c0ffdce](c0ffdce)) * **api:** update via SDK Studio ([#16](#16)) ([a96a86c](a96a86c)) * **api:** update via SDK Studio ([#17](#17)) ([52cf741](52cf741)) * **api:** update via SDK Studio ([#3](#3)) ([8a06f81](8a06f81)) * **api:** update via SDK Studio ([#4](#4)) ([cf6309b](cf6309b)) * **api:** update via SDK Studio ([#5](#5)) ([4275810](4275810)) * **api:** update via SDK Studio ([#6](#6)) ([299d77e](299d77e)) * **api:** update via SDK Studio ([#7](#7)) ([e1e4738](e1e4738)) * **api:** update via SDK Studio ([#8](#8)) ([2d845ff](2d845ff)) * **api:** update via SDK Studio ([#9](#9)) ([a17fadc](a17fadc)) ### Bug Fixes * **client:** preserve URL params already embedded in path ([81f76ab](81f76ab)) * use npm publish instead of yarn publish ([#173](#173)) ([05b3225](05b3225)) ### Chores * **ci:** skip uploading artifacts on stainless-internal branches ([0c1949d](0c1949d)) * go live ([#1](#1)) ([bc9e36e](bc9e36e)) * **internal:** codegen related update ([d8b846c](d8b846c)) * **internal:** move stringifyQuery implementation to internal function ([fb87469](fb87469)) * **release:** prepare alpha ([#36](#36)) ([c5e0f61](c5e0f61)) * **release:** v2.0.0 ([#39](#39)) ([2ecb572](2ecb572)) * **test:** do not count install time for mock server timeout ([1fd6556](1fd6556)) * update placeholder string ([fb97b1c](fb97b1c)) * update SDK settings ([#21](#21)) ([dd2956f](dd2956f)) --- This pull request is managed by Stainless's [GitHub App](https://github.com/apps/stainless-app). The [semver version number](https://semver.org/#semantic-versioning-specification-semver) is based on included [commit messages](https://www.conventionalcommits.org/en/v1.0.0/). Alternatively, you can manually set the version number in the title of this pull request. For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request. 🔗 Stainless [website](https://www.stainlessapi.com) 📚 Read the [docs](https://app.stainlessapi.com/docs) 🙋 [Reach out](mailto:support@stainlessapi.com) for help or questions --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 4303408 commit 5d62178

18 files changed

Lines changed: 235 additions & 41 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,18 @@ jobs:
5555
run: ./scripts/build
5656

5757
- name: Get GitHub OIDC Token
58-
if: github.repository == 'stainless-sdks/browserbase-node'
58+
if: |-
59+
github.repository == 'stainless-sdks/browserbase-node' &&
60+
!startsWith(github.ref, 'refs/heads/stl/')
5961
id: github-oidc
6062
uses: actions/github-script@v8
6163
with:
6264
script: core.setOutput('github_token', await core.getIDToken());
6365

6466
- name: Upload tarball
65-
if: github.repository == 'stainless-sdks/browserbase-node'
67+
if: |-
68+
github.repository == 'stainless-sdks/browserbase-node' &&
69+
!startsWith(github.ref, 'refs/heads/stl/')
6670
env:
6771
URL: https://pkg.stainless.com/s
6872
AUTH: ${{ steps.github-oidc.outputs.github_token }}

.release-please-manifest.json

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

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 19
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-215bc4361122162181eecce83c0dbdda7c45a21801e7addb75102e8011413069.yml
3-
openapi_spec_hash: c4fadc5bb6b84cd3988c8d864b67bf61
4-
config_hash: a106b247c7cdf02ac1033077402cfe2d
1+
configured_endpoints: 20
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-b20f9fea14d79990ab1af3d276f931e026cd955ac623ec6ace80b2af90de170f.yml
3+
openapi_spec_hash: 943ff4b3297014503fdc9854544cb9a4
4+
config_hash: 55c54fdafc9e80be584829b5724b00ab

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# Changelog
22

3+
## 2.8.0-alpha.1 (2026-03-11)
4+
5+
Full Changelog: [v2.7.0...v2.8.0-alpha.1](https://github.com/browserbase/sdk-node/compare/v2.7.0...v2.8.0-alpha.1)
6+
7+
### Features
8+
9+
* [CORE-1804][apps/api] Add fetch API schema ([969d581](https://github.com/browserbase/sdk-node/commit/969d58179bdbccc926871e9fdfec572a5aa73a97))
10+
* **api:** api update ([#19](https://github.com/browserbase/sdk-node/issues/19)) ([8df9cc8](https://github.com/browserbase/sdk-node/commit/8df9cc8c76e4a615ba63d4568086bd60e88a0dfb))
11+
* **api:** update via SDK Studio ([#10](https://github.com/browserbase/sdk-node/issues/10)) ([2c6c15d](https://github.com/browserbase/sdk-node/commit/2c6c15d148d1a5e74a48f92087580d8c590288af))
12+
* **api:** update via SDK Studio ([#11](https://github.com/browserbase/sdk-node/issues/11)) ([9191ed6](https://github.com/browserbase/sdk-node/commit/9191ed631256b52a39de1aafcf1d7deb2788efdb))
13+
* **api:** update via SDK Studio ([#12](https://github.com/browserbase/sdk-node/issues/12)) ([ebeaf82](https://github.com/browserbase/sdk-node/commit/ebeaf82736747398450d739e27d6874603c4f942))
14+
* **api:** update via SDK Studio ([#13](https://github.com/browserbase/sdk-node/issues/13)) ([c0ffdce](https://github.com/browserbase/sdk-node/commit/c0ffdce615059b9523817d22ef18e01e778f3454))
15+
* **api:** update via SDK Studio ([#16](https://github.com/browserbase/sdk-node/issues/16)) ([a96a86c](https://github.com/browserbase/sdk-node/commit/a96a86c2e7c5025cacd7edd89f88b914de3596e3))
16+
* **api:** update via SDK Studio ([#17](https://github.com/browserbase/sdk-node/issues/17)) ([52cf741](https://github.com/browserbase/sdk-node/commit/52cf741bc4c5712f2fe15ee6eaa48e4c3643ec58))
17+
* **api:** update via SDK Studio ([#3](https://github.com/browserbase/sdk-node/issues/3)) ([8a06f81](https://github.com/browserbase/sdk-node/commit/8a06f81c1cd5dc8a64b9fd10ed26f8547469fdeb))
18+
* **api:** update via SDK Studio ([#4](https://github.com/browserbase/sdk-node/issues/4)) ([cf6309b](https://github.com/browserbase/sdk-node/commit/cf6309bb5de1376139fb0ba6b8e45b5d0801bee5))
19+
* **api:** update via SDK Studio ([#5](https://github.com/browserbase/sdk-node/issues/5)) ([4275810](https://github.com/browserbase/sdk-node/commit/427581035437844d44333c0e3471db675dff89c7))
20+
* **api:** update via SDK Studio ([#6](https://github.com/browserbase/sdk-node/issues/6)) ([299d77e](https://github.com/browserbase/sdk-node/commit/299d77ebc0994b0ab39a9c908157d42d605e9765))
21+
* **api:** update via SDK Studio ([#7](https://github.com/browserbase/sdk-node/issues/7)) ([e1e4738](https://github.com/browserbase/sdk-node/commit/e1e47381dc142f94bd61e7f5819eafbf5b4797a7))
22+
* **api:** update via SDK Studio ([#8](https://github.com/browserbase/sdk-node/issues/8)) ([2d845ff](https://github.com/browserbase/sdk-node/commit/2d845ffc683ea988980e42ea2c03699034af6980))
23+
* **api:** update via SDK Studio ([#9](https://github.com/browserbase/sdk-node/issues/9)) ([a17fadc](https://github.com/browserbase/sdk-node/commit/a17fadcac323079f3e36e0c965f6d6c1be26f1d8))
24+
25+
26+
### Bug Fixes
27+
28+
* **client:** preserve URL params already embedded in path ([81f76ab](https://github.com/browserbase/sdk-node/commit/81f76aba8e0ac48fe758e9c567ba9e3fb174cfc5))
29+
* use npm publish instead of yarn publish ([#173](https://github.com/browserbase/sdk-node/issues/173)) ([05b3225](https://github.com/browserbase/sdk-node/commit/05b3225efe94473f2b49988dab63a9e67beb9802))
30+
31+
32+
### Chores
33+
34+
* **ci:** skip uploading artifacts on stainless-internal branches ([0c1949d](https://github.com/browserbase/sdk-node/commit/0c1949d9237aa69c6ca9adda699376672f398f24))
35+
* go live ([#1](https://github.com/browserbase/sdk-node/issues/1)) ([bc9e36e](https://github.com/browserbase/sdk-node/commit/bc9e36ec17be8df65bc4bd43bad6ad6617e4973c))
36+
* **internal:** codegen related update ([d8b846c](https://github.com/browserbase/sdk-node/commit/d8b846cae415cec3a826e26b1a8cae47cca9e943))
37+
* **internal:** move stringifyQuery implementation to internal function ([fb87469](https://github.com/browserbase/sdk-node/commit/fb8746921c5bad61c77f44b6e3fe8bf164c1e5b5))
38+
* **release:** prepare alpha ([#36](https://github.com/browserbase/sdk-node/issues/36)) ([c5e0f61](https://github.com/browserbase/sdk-node/commit/c5e0f61f324c607421449db10cf861a0a5100b4a))
39+
* **release:** v2.0.0 ([#39](https://github.com/browserbase/sdk-node/issues/39)) ([2ecb572](https://github.com/browserbase/sdk-node/commit/2ecb5720bc6102a3487ecd71f06fd3c548b5f760))
40+
* **test:** do not count install time for mock server timeout ([1fd6556](https://github.com/browserbase/sdk-node/commit/1fd655639e75cf32f66d361c5c287960f6fc3982))
41+
* update placeholder string ([fb97b1c](https://github.com/browserbase/sdk-node/commit/fb97b1c30905958b6a427a13e6922a4da30c2c15))
42+
* update SDK settings ([#21](https://github.com/browserbase/sdk-node/issues/21)) ([dd2956f](https://github.com/browserbase/sdk-node/commit/dd2956f0b22aac232b6ae3cdd572a4d6b688099d))
43+
344
## 2.7.0-alpha.3 (2026-02-26)
445

546
Full Changelog: [v2.7.0-alpha.2...v2.7.0-alpha.3](https://github.com/browserbase/sdk-node/compare/v2.7.0-alpha.2...v2.7.0-alpha.3)

api.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ Methods:
2525
- <code title="get /v1/extensions/{id}">client.extensions.<a href="./src/resources/extensions.ts">retrieve</a>(id) -> Extension</code>
2626
- <code title="delete /v1/extensions/{id}">client.extensions.<a href="./src/resources/extensions.ts">delete</a>(id) -> void</code>
2727

28+
# FetchAPI
29+
30+
Types:
31+
32+
- <code><a href="./src/resources/fetch-api.ts">FetchAPICreateResponse</a></code>
33+
34+
Methods:
35+
36+
- <code title="post /v1/fetch">client.fetchAPI.<a href="./src/resources/fetch-api.ts">create</a>({ ...params }) -> FetchAPICreateResponse</code>
37+
2838
# Projects
2939

3040
Types:

package-lock.json

Lines changed: 2 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": "@browserbasehq/sdk",
3-
"version": "2.7.0",
3+
"version": "2.8.0-alpha.1",
44
"description": "The official Node.js library for the Browserbase API",
55
"author": "Browserbase <support@browserbase.com>",
66
"types": "dist/index.d.ts",

scripts/mock

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"
2121

2222
# Run prism mock on the given spec
2323
if [ "$1" == "--daemon" ]; then
24+
# Pre-install the package so the download doesn't eat into the startup timeout
25+
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version
26+
2427
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
2528

26-
# Wait for server to come online
29+
# Wait for server to come online (max 30s)
2730
echo -n "Waiting for server"
31+
attempts=0
2832
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
33+
attempts=$((attempts + 1))
34+
if [ "$attempts" -ge 300 ]; then
35+
echo
36+
echo "Timed out waiting for Prism server to start"
37+
cat .prism.log
38+
exit 1
39+
fi
2940
echo -n "."
3041
sleep 0.1
3142
done

src/core.ts

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
APIConnectionTimeoutError,
77
APIUserAbortError,
88
} from './error';
9+
import { stringifyQuery } from './internal/utils/query';
910
import {
1011
kind as shimsKind,
1112
type Readable,
@@ -523,32 +524,20 @@ export abstract class APIClient {
523524
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
524525

525526
const defaultQuery = this.defaultQuery();
526-
if (!isEmptyObj(defaultQuery)) {
527-
query = { ...defaultQuery, ...query } as Req;
527+
const pathQuery = Object.fromEntries(url.searchParams);
528+
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
529+
query = { ...pathQuery, ...defaultQuery, ...query } as Req;
528530
}
529531

530532
if (typeof query === 'object' && query && !Array.isArray(query)) {
531-
url.search = this.stringifyQuery(query as Record<string, unknown>);
533+
url.search = this.stringifyQuery(query);
532534
}
533535

534536
return url.toString();
535537
}
536538

537-
protected stringifyQuery(query: Record<string, unknown>): string {
538-
return Object.entries(query)
539-
.filter(([_, value]) => typeof value !== 'undefined')
540-
.map(([key, value]) => {
541-
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
542-
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
543-
}
544-
if (value === null) {
545-
return `${encodeURIComponent(key)}=`;
546-
}
547-
throw new BrowserbaseError(
548-
`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
549-
);
550-
})
551-
.join('&');
539+
protected stringifyQuery(query: object | Record<string, unknown>): string {
540+
return stringifyQuery(query);
552541
}
553542

554543
async fetchWithTimeout(
@@ -630,9 +619,9 @@ export abstract class APIClient {
630619
}
631620
}
632621

633-
// If the API asks us to wait a certain amount of time (and it's a reasonable amount),
634-
// just do what it says, but otherwise calculate a default
635-
if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
622+
// If the API asks us to wait a certain amount of time, do what it says.
623+
// Otherwise calculate a default.
624+
if (timeoutMillis === undefined) {
636625
const maxRetries = options.maxRetries ?? this.maxRetries;
637626
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
638627
}

src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
Contexts,
1414
} from './resources/contexts';
1515
import { Extension, ExtensionCreateParams, Extensions } from './resources/extensions';
16+
import { FetchAPI, FetchAPICreateParams, FetchAPICreateResponse } from './resources/fetch-api';
1617
import { Project, ProjectListResponse, ProjectUsage, Projects } from './resources/projects';
1718
import {
1819
Session,
@@ -144,6 +145,7 @@ export class Browserbase extends Core.APIClient {
144145

145146
contexts: API.Contexts = new API.Contexts(this);
146147
extensions: API.Extensions = new API.Extensions(this);
148+
fetchAPI: API.FetchAPI = new API.FetchAPI(this);
147149
projects: API.Projects = new API.Projects(this);
148150
sessions: API.Sessions = new API.Sessions(this);
149151

@@ -192,6 +194,7 @@ export class Browserbase extends Core.APIClient {
192194

193195
Browserbase.Contexts = Contexts;
194196
Browserbase.Extensions = Extensions;
197+
Browserbase.FetchAPI = FetchAPI;
195198
Browserbase.Projects = Projects;
196199
Browserbase.Sessions = Sessions;
197200

@@ -212,6 +215,12 @@ export declare namespace Browserbase {
212215
type ExtensionCreateParams as ExtensionCreateParams,
213216
};
214217

218+
export {
219+
FetchAPI as FetchAPI,
220+
type FetchAPICreateResponse as FetchAPICreateResponse,
221+
type FetchAPICreateParams as FetchAPICreateParams,
222+
};
223+
215224
export {
216225
Projects as Projects,
217226
type Project as Project,

0 commit comments

Comments
 (0)