diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a549f59d..78baf5bf 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.4.0" + ".": "2.5.0" } diff --git a/.stats.yml b/.stats.yml index 662fd770..072ee700 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,4 @@ configured_endpoints: 18 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-06206dff3ffaf539b0ed8aa5bac368cb366b631f85d7a4ba5f07aca91c172550.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-ad8e080c2347b3f28d64f49cf02c2ab4a69b7bf289fd7eb018c955d8915bb990.yml +openapi_spec_hash: b3aea10135a89597634d62f1ef418839 +config_hash: 74882e23a455dece33e43a27e67f0fbb diff --git a/CHANGELOG.md b/CHANGELOG.md index 54e3393b..26e67930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## 2.5.0 (2025-03-28) + +Full Changelog: [v2.4.0...v2.5.0](https://github.com/browserbase/sdk-node/compare/v2.4.0...v2.5.0) + +### Features + +* **api:** api update ([#151](https://github.com/browserbase/sdk-node/issues/151)) ([9433265](https://github.com/browserbase/sdk-node/commit/9433265b54e3b560152be7642a5a314c82d8ad08)) +* **api:** api update ([#153](https://github.com/browserbase/sdk-node/issues/153)) ([53c928c](https://github.com/browserbase/sdk-node/commit/53c928cbc008d2b8b33d405ecd853a46e960ffd5)) + + +### Bug Fixes + +* avoid type error in certain environments ([#154](https://github.com/browserbase/sdk-node/issues/154)) ([0288fa5](https://github.com/browserbase/sdk-node/commit/0288fa562ed1397cfba2cc7c77ae060e3e747382)) +* **internal:** work around https://github.com/vercel/next.js/issues/76881 ([#155](https://github.com/browserbase/sdk-node/issues/155)) ([f2b25bc](https://github.com/browserbase/sdk-node/commit/f2b25bc31f4dd4d5a1978065478cca1dfd75526d)) + + +### Chores + +* **exports:** cleaner resource index imports ([#149](https://github.com/browserbase/sdk-node/issues/149)) ([ef04d35](https://github.com/browserbase/sdk-node/commit/ef04d358436d2883af62c88281dad0a379900512)) +* **exports:** stop using path fallbacks ([#150](https://github.com/browserbase/sdk-node/issues/150)) ([32c5ee7](https://github.com/browserbase/sdk-node/commit/32c5ee7d6de48ac826b608e4e582e37fa92a5188)) +* **internal:** version bump ([#147](https://github.com/browserbase/sdk-node/issues/147)) ([ea90300](https://github.com/browserbase/sdk-node/commit/ea9030070914ad0d790dd89a81a266cc54434161)) + ## 2.4.0 (2025-03-14) Full Changelog: [v2.3.0...v2.4.0](https://github.com/browserbase/sdk-node/compare/v2.3.0...v2.4.0) diff --git a/package-lock.json b/package-lock.json index 50340a5a..bc040c78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@browserbasehq/sdk", - "version": "2.4.0", + "version": "2.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@browserbasehq/sdk", - "version": "2.4.0", + "version": "2.5.0", "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", diff --git a/package.json b/package.json index f34db52a..83453d5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@browserbasehq/sdk", - "version": "2.4.0", + "version": "2.5.0", "description": "The official Node.js library for the Browserbase API", "author": "Browserbase ", "types": "dist/index.d.ts", @@ -113,17 +113,17 @@ "default": "./dist/index.mjs" }, "./*.mjs": { - "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], - "default": ["./dist/*.mjs", "./dist/*/index.mjs"] + "types": "./dist/*.d.ts", + "default": "./dist/*.mjs" }, "./*.js": { - "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], - "default": ["./dist/*.js", "./dist/*/index.js"] + "types": "./dist/*.d.ts", + "default": "./dist/*.js" }, "./*": { - "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], - "require": ["./dist/*.js", "./dist/*/index.js"], - "default": ["./dist/*.mjs", "./dist/*/index.mjs"] + "types": "./dist/*.d.ts", + "require": "./dist/*.js", + "default": "./dist/*.mjs" } } } diff --git a/src/_shims/index-deno.ts b/src/_shims/index-deno.ts index a13f39ea..83668b61 100644 --- a/src/_shims/index-deno.ts +++ b/src/_shims/index-deno.ts @@ -108,3 +108,5 @@ export declare class FsReadStream extends Readable { const _ReadableStream = ReadableStream; type _ReadableStream = ReadableStream; export { _ReadableStream as ReadableStream }; + +export const init = () => {}; diff --git a/src/_shims/index.d.ts b/src/_shims/index.d.ts index c29daacd..63cd4332 100644 --- a/src/_shims/index.d.ts +++ b/src/_shims/index.d.ts @@ -79,3 +79,5 @@ export function fileFromPath(path: string, options?: FileFromPathOptions): Promi export function fileFromPath(path: string, filename?: string, options?: FileFromPathOptions): Promise; export function isFsReadStream(value: any): value is FsReadStream; + +export const init: () => void; diff --git a/src/_shims/index.js b/src/_shims/index.js index 6fb425d7..fe57b795 100644 --- a/src/_shims/index.js +++ b/src/_shims/index.js @@ -3,7 +3,9 @@ */ const shims = require('./registry'); const auto = require('@browserbasehq/sdk/_shims/auto/runtime'); -if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true }); +exports.init = () => { + if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true }); +}; for (const property of Object.keys(shims)) { Object.defineProperty(exports, property, { get() { @@ -11,3 +13,5 @@ for (const property of Object.keys(shims)) { }, }); } + +exports.init(); diff --git a/src/_shims/index.mjs b/src/_shims/index.mjs index dd204385..3e9d7901 100644 --- a/src/_shims/index.mjs +++ b/src/_shims/index.mjs @@ -3,5 +3,9 @@ */ import * as shims from './registry.mjs'; import * as auto from '@browserbasehq/sdk/_shims/auto/runtime'; -if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true }); +export const init = () => { + if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true }); +}; export * from './registry.mjs'; + +init(); diff --git a/src/core.ts b/src/core.ts index 44c74114..df4306a6 100644 --- a/src/core.ts +++ b/src/core.ts @@ -16,7 +16,12 @@ import { type RequestInit, type Response, type HeadersInit, + init, } from './_shims/index'; + +// try running side effects outside of _shims/index to workaround https://github.com/vercel/next.js/issues/76881 +init(); + export { type Response }; import { BlobLike, isBlobLike, isMultipartBody } from './uploads'; export { @@ -395,7 +400,7 @@ export abstract class APIClient { !headers ? {} : Symbol.iterator in headers ? Object.fromEntries(Array.from(headers as Iterable).map((header) => [...header])) - : { ...headers } + : { ...(headers as any as Record) } ); } diff --git a/src/resources.ts b/src/resources.ts new file mode 100644 index 00000000..b283d578 --- /dev/null +++ b/src/resources.ts @@ -0,0 +1 @@ +export * from './resources/index'; diff --git a/src/resources/projects.ts b/src/resources/projects.ts index 0bc82f68..236872f6 100644 --- a/src/resources/projects.ts +++ b/src/resources/projects.ts @@ -29,6 +29,11 @@ export class Projects extends APIResource { export interface Project { id: string; + /** + * The maximum number of sessions that this project can run concurrently. + */ + concurrency: number; + createdAt: string; defaultTimeout: number; diff --git a/src/version.ts b/src/version.ts index bfc3fb3a..38ceab27 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '2.4.0'; // x-release-please-version +export const VERSION = '2.5.0'; // x-release-please-version