Skip to content

Commit 33a00f2

Browse files
stainless-app[bot]Stainless Bot
and
Stainless Bot
authored
release: 2.1.3 (#69)
Automated Release PR --- ## 2.1.3 (2025-01-10) Full Changelog: [v2.1.2...v2.1.3](v2.1.2...v2.1.3) ### Bug Fixes * **client:** normalize method ([#114](#114)) ([cffc41f](cffc41f)) * **client:** normalize method ([#73](#73)) ([d18d217](d18d217)) * **client:** normalize method ([#85](#85)) ([4a0a13a](4a0a13a)) ### Chores * **internal:** codegen related update ([#100](#100)) ([01c6b28](01c6b28)) * **internal:** codegen related update ([#101](#101)) ([241e0fd](241e0fd)) * **internal:** codegen related update ([#102](#102)) ([adbf0ac](adbf0ac)) * **internal:** codegen related update ([#103](#103)) ([a04e944](a04e944)) * **internal:** codegen related update ([#104](#104)) ([2d639f9](2d639f9)) * **internal:** codegen related update ([#105](#105)) ([0d61709](0d61709)) * **internal:** codegen related update ([#106](#106)) ([3d19415](3d19415)) * **internal:** codegen related update ([#107](#107)) ([f21383a](f21383a)) * **internal:** codegen related update ([#108](#108)) ([47b9c65](47b9c65)) * **internal:** codegen related update ([#109](#109)) ([63a2c0d](63a2c0d)) * **internal:** codegen related update ([#110](#110)) ([d17c241](d17c241)) * **internal:** codegen related update ([#111](#111)) ([85ae78d](85ae78d)) * **internal:** codegen related update ([#112](#112)) ([ef21c4a](ef21c4a)) * **internal:** codegen related update ([#113](#113)) ([bb69228](bb69228)) * **internal:** codegen related update ([#50](#50)) ([bb9da1d](bb9da1d)) * **internal:** codegen related update ([#72](#72)) ([415c0c3](415c0c3)) * **internal:** codegen related update ([#74](#74)) ([4e54df4](4e54df4)) * **internal:** codegen related update ([#75](#75)) ([d344d5e](d344d5e)) * **internal:** codegen related update ([#76](#76)) ([2233aa2](2233aa2)) * **internal:** codegen related update ([#77](#77)) ([16b27b4](16b27b4)) * **internal:** codegen related update ([#78](#78)) ([af2d145](af2d145)) * **internal:** codegen related update ([#79](#79)) ([b7e4a89](b7e4a89)) * **internal:** codegen related update ([#80](#80)) ([85a35bf](85a35bf)) * **internal:** codegen related update ([#81](#81)) ([2b037d2](2b037d2)) * **internal:** codegen related update ([#83](#83)) ([b1feede](b1feede)) * **internal:** codegen related update ([#84](#84)) ([eaf66e0](eaf66e0)) * **internal:** codegen related update ([#86](#86)) ([f9b16d1](f9b16d1)) * **internal:** codegen related update ([#87](#87)) ([62821e0](62821e0)) * **internal:** codegen related update ([#88](#88)) ([9ca705d](9ca705d)) * **internal:** codegen related update ([#89](#89)) ([2c9ed02](2c9ed02)) * **internal:** codegen related update ([#90](#90)) ([e6e5e10](e6e5e10)) * **internal:** codegen related update ([#92](#92)) ([603179e](603179e)) * **internal:** codegen related update ([#93](#93)) ([8e16851](8e16851)) * **internal:** codegen related update ([#94](#94)) ([763fff0](763fff0)) * **internal:** codegen related update ([#95](#95)) ([3e6a5b4](3e6a5b4)) * **internal:** codegen related update ([#96](#96)) ([925575c](925575c)) * **internal:** codegen related update ([#97](#97)) ([66c0b51](66c0b51)) * **internal:** codegen related update ([#98](#98)) ([1533ff8](1533ff8)) * **internal:** codegen related update ([#99](#99)) ([668a9d1](668a9d1)) * **internal:** version bump ([#56](#56)) ([afafa41](afafa41)) * **internal:** version bump ([#60](#60)) ([1734b28](1734b28)) * **internal:** version bump ([#70](#70)) ([40771ce](40771ce)) ### Documentation * minor formatting changes ([#115](#115)) ([6a71bb3](6a71bb3)) * minor formatting changes ([#82](#82)) ([414b9b0](414b9b0)) * minor formatting changes ([#91](#91)) ([baa864c](baa864c)) --- 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:[email protected]) for help or questions --------- Co-authored-by: Stainless Bot <[email protected]> Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 61fdba6 commit 33a00f2

File tree

8 files changed

+103
-13
lines changed

8 files changed

+103
-13
lines changed

.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.1.2"
2+
".": "2.1.3"
33
}

CHANGELOG.md

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

3+
## 2.1.3 (2025-01-10)
4+
5+
Full Changelog: [v2.1.2...v2.1.3](https://github.com/browserbase/sdk-node/compare/v2.1.2...v2.1.3)
6+
7+
### Bug Fixes
8+
9+
* **client:** normalize method ([#114](https://github.com/browserbase/sdk-node/issues/114)) ([cffc41f](https://github.com/browserbase/sdk-node/commit/cffc41f7baae3bc4fa18eaaa345daaf97077f69b))
10+
* **client:** normalize method ([#73](https://github.com/browserbase/sdk-node/issues/73)) ([d18d217](https://github.com/browserbase/sdk-node/commit/d18d217242c61280c58c2ea63868a5e854d87c54))
11+
* **client:** normalize method ([#85](https://github.com/browserbase/sdk-node/issues/85)) ([4a0a13a](https://github.com/browserbase/sdk-node/commit/4a0a13a486b1b19d86ef8fea3977a6f18e266401))
12+
13+
14+
### Chores
15+
16+
* **internal:** codegen related update ([#100](https://github.com/browserbase/sdk-node/issues/100)) ([01c6b28](https://github.com/browserbase/sdk-node/commit/01c6b28a6c345865d0789523bcccae1bd4990eb8))
17+
* **internal:** codegen related update ([#101](https://github.com/browserbase/sdk-node/issues/101)) ([241e0fd](https://github.com/browserbase/sdk-node/commit/241e0fdd3fb85cc60d206ff40220741b636eaf29))
18+
* **internal:** codegen related update ([#102](https://github.com/browserbase/sdk-node/issues/102)) ([adbf0ac](https://github.com/browserbase/sdk-node/commit/adbf0acd4341416a540d4c81f0536f964e33db6b))
19+
* **internal:** codegen related update ([#103](https://github.com/browserbase/sdk-node/issues/103)) ([a04e944](https://github.com/browserbase/sdk-node/commit/a04e9444a5cc4940418e82b81a0dd6bc68614497))
20+
* **internal:** codegen related update ([#104](https://github.com/browserbase/sdk-node/issues/104)) ([2d639f9](https://github.com/browserbase/sdk-node/commit/2d639f936d5b4f8dad5d1a300701ac27f4efe702))
21+
* **internal:** codegen related update ([#105](https://github.com/browserbase/sdk-node/issues/105)) ([0d61709](https://github.com/browserbase/sdk-node/commit/0d61709a981e4d56e6b5b4693dcc4a87fa87a4c6))
22+
* **internal:** codegen related update ([#106](https://github.com/browserbase/sdk-node/issues/106)) ([3d19415](https://github.com/browserbase/sdk-node/commit/3d194156db3f8a1c98c933367a1d7aa48ad41e5d))
23+
* **internal:** codegen related update ([#107](https://github.com/browserbase/sdk-node/issues/107)) ([f21383a](https://github.com/browserbase/sdk-node/commit/f21383a99ce073953deac289f9d94e4d59308e6f))
24+
* **internal:** codegen related update ([#108](https://github.com/browserbase/sdk-node/issues/108)) ([47b9c65](https://github.com/browserbase/sdk-node/commit/47b9c65e487011900f1996e4f35ceb867a5f5045))
25+
* **internal:** codegen related update ([#109](https://github.com/browserbase/sdk-node/issues/109)) ([63a2c0d](https://github.com/browserbase/sdk-node/commit/63a2c0df0a552721d77b59e8f1ac1a0540cab7d3))
26+
* **internal:** codegen related update ([#110](https://github.com/browserbase/sdk-node/issues/110)) ([d17c241](https://github.com/browserbase/sdk-node/commit/d17c241b712cc5325ed8de918906890ecd1ab856))
27+
* **internal:** codegen related update ([#111](https://github.com/browserbase/sdk-node/issues/111)) ([85ae78d](https://github.com/browserbase/sdk-node/commit/85ae78d8ebd917b7a37a871c803122786889761e))
28+
* **internal:** codegen related update ([#112](https://github.com/browserbase/sdk-node/issues/112)) ([ef21c4a](https://github.com/browserbase/sdk-node/commit/ef21c4a382a4b4485c68504ca7db396ee221df1a))
29+
* **internal:** codegen related update ([#113](https://github.com/browserbase/sdk-node/issues/113)) ([bb69228](https://github.com/browserbase/sdk-node/commit/bb6922817abf6f6167f411e13961d346435549b4))
30+
* **internal:** codegen related update ([#50](https://github.com/browserbase/sdk-node/issues/50)) ([bb9da1d](https://github.com/browserbase/sdk-node/commit/bb9da1dcc8336d0e33fc8dd40519ea8db1738223))
31+
* **internal:** codegen related update ([#72](https://github.com/browserbase/sdk-node/issues/72)) ([415c0c3](https://github.com/browserbase/sdk-node/commit/415c0c3ba38437c2b4235fdb689f096cc062345e))
32+
* **internal:** codegen related update ([#74](https://github.com/browserbase/sdk-node/issues/74)) ([4e54df4](https://github.com/browserbase/sdk-node/commit/4e54df4bf0147ca39f66a39cd213336db457a415))
33+
* **internal:** codegen related update ([#75](https://github.com/browserbase/sdk-node/issues/75)) ([d344d5e](https://github.com/browserbase/sdk-node/commit/d344d5e923d0aa58ea8c7a1de5d16e49e24b8a26))
34+
* **internal:** codegen related update ([#76](https://github.com/browserbase/sdk-node/issues/76)) ([2233aa2](https://github.com/browserbase/sdk-node/commit/2233aa277ba33ede0ef04c2df2ae89b204f2251e))
35+
* **internal:** codegen related update ([#77](https://github.com/browserbase/sdk-node/issues/77)) ([16b27b4](https://github.com/browserbase/sdk-node/commit/16b27b41e10e2ca536488ee5b642609a18f54ba3))
36+
* **internal:** codegen related update ([#78](https://github.com/browserbase/sdk-node/issues/78)) ([af2d145](https://github.com/browserbase/sdk-node/commit/af2d14584d893bc5fadb35fea91522fb384f093d))
37+
* **internal:** codegen related update ([#79](https://github.com/browserbase/sdk-node/issues/79)) ([b7e4a89](https://github.com/browserbase/sdk-node/commit/b7e4a89a5ac5cc81c1a1e4d3383fe3618336e169))
38+
* **internal:** codegen related update ([#80](https://github.com/browserbase/sdk-node/issues/80)) ([85a35bf](https://github.com/browserbase/sdk-node/commit/85a35bfd6b35fd8dec0e0337c3a3d7ba5c2de2dc))
39+
* **internal:** codegen related update ([#81](https://github.com/browserbase/sdk-node/issues/81)) ([2b037d2](https://github.com/browserbase/sdk-node/commit/2b037d292891181f8e8184318c0e9e66ef3205ab))
40+
* **internal:** codegen related update ([#83](https://github.com/browserbase/sdk-node/issues/83)) ([b1feede](https://github.com/browserbase/sdk-node/commit/b1feedee3363c361a9494344db4f70bdfb7bfc45))
41+
* **internal:** codegen related update ([#84](https://github.com/browserbase/sdk-node/issues/84)) ([eaf66e0](https://github.com/browserbase/sdk-node/commit/eaf66e050f77f83b8c49ff48929298c185ccd2da))
42+
* **internal:** codegen related update ([#86](https://github.com/browserbase/sdk-node/issues/86)) ([f9b16d1](https://github.com/browserbase/sdk-node/commit/f9b16d1ebfcf83a6bfabd962629dad5b842a6d75))
43+
* **internal:** codegen related update ([#87](https://github.com/browserbase/sdk-node/issues/87)) ([62821e0](https://github.com/browserbase/sdk-node/commit/62821e0562b2911918e7b4bd2a6829e56cda77fd))
44+
* **internal:** codegen related update ([#88](https://github.com/browserbase/sdk-node/issues/88)) ([9ca705d](https://github.com/browserbase/sdk-node/commit/9ca705d9eb8f30d3c2f3b2fb949784ada1bd5432))
45+
* **internal:** codegen related update ([#89](https://github.com/browserbase/sdk-node/issues/89)) ([2c9ed02](https://github.com/browserbase/sdk-node/commit/2c9ed025f4f456ade76bff1f9431ad8ccb8ba643))
46+
* **internal:** codegen related update ([#90](https://github.com/browserbase/sdk-node/issues/90)) ([e6e5e10](https://github.com/browserbase/sdk-node/commit/e6e5e1022c331a8a9f8c347dff329831a108316f))
47+
* **internal:** codegen related update ([#92](https://github.com/browserbase/sdk-node/issues/92)) ([603179e](https://github.com/browserbase/sdk-node/commit/603179e15ff192b48a849a891c37d33daa44a978))
48+
* **internal:** codegen related update ([#93](https://github.com/browserbase/sdk-node/issues/93)) ([8e16851](https://github.com/browserbase/sdk-node/commit/8e1685118774d324812441d22dda22e5490fbdf9))
49+
* **internal:** codegen related update ([#94](https://github.com/browserbase/sdk-node/issues/94)) ([763fff0](https://github.com/browserbase/sdk-node/commit/763fff0013483ef8f0dd451a67396043b0a9c5e7))
50+
* **internal:** codegen related update ([#95](https://github.com/browserbase/sdk-node/issues/95)) ([3e6a5b4](https://github.com/browserbase/sdk-node/commit/3e6a5b430b60ba3e4f70ca84f77286f6d30a455a))
51+
* **internal:** codegen related update ([#96](https://github.com/browserbase/sdk-node/issues/96)) ([925575c](https://github.com/browserbase/sdk-node/commit/925575c15dcee8bcb8e84182e858bc188ed64163))
52+
* **internal:** codegen related update ([#97](https://github.com/browserbase/sdk-node/issues/97)) ([66c0b51](https://github.com/browserbase/sdk-node/commit/66c0b517f16827b4787c8770f2dca5a81c514873))
53+
* **internal:** codegen related update ([#98](https://github.com/browserbase/sdk-node/issues/98)) ([1533ff8](https://github.com/browserbase/sdk-node/commit/1533ff8b958470fc99c6c15a7c04c918f428916e))
54+
* **internal:** codegen related update ([#99](https://github.com/browserbase/sdk-node/issues/99)) ([668a9d1](https://github.com/browserbase/sdk-node/commit/668a9d105602b36c3cb6295cb6491fd9ffe20c80))
55+
* **internal:** version bump ([#56](https://github.com/browserbase/sdk-node/issues/56)) ([afafa41](https://github.com/browserbase/sdk-node/commit/afafa41deebd9c03518a8a57c4492d612f3f73ee))
56+
* **internal:** version bump ([#60](https://github.com/browserbase/sdk-node/issues/60)) ([1734b28](https://github.com/browserbase/sdk-node/commit/1734b28c1d1f2e13bf368feb7f910d060aa646fd))
57+
* **internal:** version bump ([#70](https://github.com/browserbase/sdk-node/issues/70)) ([40771ce](https://github.com/browserbase/sdk-node/commit/40771ceb4bbf4cee6fc98b8fef4f39cd096fdecd))
58+
59+
60+
### Documentation
61+
62+
* minor formatting changes ([#115](https://github.com/browserbase/sdk-node/issues/115)) ([6a71bb3](https://github.com/browserbase/sdk-node/commit/6a71bb30e5206d2d9c77e605a712185eecee7f34))
63+
* minor formatting changes ([#82](https://github.com/browserbase/sdk-node/issues/82)) ([414b9b0](https://github.com/browserbase/sdk-node/commit/414b9b0efb0e3b3e1db5a2bd9250fbce85569f2c))
64+
* minor formatting changes ([#91](https://github.com/browserbase/sdk-node/issues/91)) ([baa864c](https://github.com/browserbase/sdk-node/commit/baa864cb2b3c8da5fffe2f3634bb293f4f0afbac))
65+
366
## 2.1.2 (2024-12-29)
467

568
Full Changelog: [v2.1.1...v2.1.2](https://github.com/browserbase/sdk-node/compare/v2.1.1...v2.1.2)

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Setting up the environment
22

3-
This repository uses [`yarn@v1`](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable).
3+
This repository uses [`yarn@v1`](https://classic.yarnpkg.com/lang/en/docs/install).
44
Other package managers may work but are not officially supported for development.
55

66
To set up the repository, run:
@@ -29,10 +29,10 @@ All files in the `examples/` directory are not modified by the generator and can
2929
3030
```
3131

32-
```
33-
chmod +x examples/<your-example>.ts
32+
```sh
33+
$ chmod +x examples/<your-example>.ts
3434
# run the example against your api
35-
yarn tsn -T examples/<your-example>.ts
35+
$ yarn tsn -T examples/<your-example>.ts
3636
```
3737

3838
## Using the repository from source

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.1.2",
3+
"version": "2.1.3",
44
"description": "The official Node.js library for the Browserbase API",
55
"author": "Browserbase <[email protected]>",
66
"types": "dist/index.d.ts",

src/core.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export abstract class APIClient {
163163
maxRetries = 2,
164164
timeout = 60000, // 1 minute
165165
httpAgent,
166-
fetch: overridenFetch,
166+
fetch: overriddenFetch,
167167
}: {
168168
baseURL: string;
169169
maxRetries?: number | undefined;
@@ -176,7 +176,7 @@ export abstract class APIClient {
176176
this.timeout = validatePositiveInteger('timeout', timeout);
177177
this.httpAgent = httpAgent;
178178

179-
this.fetch = overridenFetch ?? fetch;
179+
this.fetch = overriddenFetch ?? fetch;
180180
}
181181

182182
protected authHeaders(opts: FinalRequestOptions): Headers {
@@ -522,9 +522,19 @@ export abstract class APIClient {
522522

523523
const timeout = setTimeout(() => controller.abort(), ms);
524524

525+
const fetchOptions = {
526+
signal: controller.signal as any,
527+
...options,
528+
};
529+
if (fetchOptions.method) {
530+
// Custom methods like 'patch' need to be uppercased
531+
// See https://github.com/nodejs/undici/issues/2294
532+
fetchOptions.method = fetchOptions.method.toUpperCase();
533+
}
534+
525535
return (
526536
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
527-
this.fetch.call(undefined, url, { signal: controller.signal as any, ...options }).finally(() => {
537+
this.fetch.call(undefined, url, fetchOptions).finally(() => {
528538
clearTimeout(timeout);
529539
})
530540
);

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '2.1.2'; // x-release-please-version
1+
export const VERSION = '2.1.3'; // x-release-please-version

tests/index.test.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,23 @@ describe('instantiate client', () => {
122122
expect(spy).toHaveBeenCalledTimes(1);
123123
});
124124

125+
test('normalized method', async () => {
126+
let capturedRequest: RequestInit | undefined;
127+
const testFetch = async (url: RequestInfo, init: RequestInit = {}): Promise<Response> => {
128+
capturedRequest = init;
129+
return new Response(JSON.stringify({}), { headers: { 'Content-Type': 'application/json' } });
130+
};
131+
132+
const client = new Browserbase({
133+
baseURL: 'http://localhost:5000/',
134+
apiKey: 'My API Key',
135+
fetch: testFetch,
136+
});
137+
138+
await client.patch('/foo');
139+
expect(capturedRequest?.method).toEqual('PATCH');
140+
});
141+
125142
describe('baseUrl', () => {
126143
test('trailing slash', () => {
127144
const client = new Browserbase({ baseURL: 'http://localhost:5000/custom/path/', apiKey: 'My API Key' });
@@ -177,7 +194,7 @@ describe('instantiate client', () => {
177194
expect(client.apiKey).toBe('My API Key');
178195
});
179196

180-
test('with overriden environment variable arguments', () => {
197+
test('with overridden environment variable arguments', () => {
181198
// set options via env var
182199
process.env['BROWSERBASE_API_KEY'] = 'another My API Key';
183200
const client = new Browserbase({ apiKey: 'My API Key' });

0 commit comments

Comments
 (0)