Skip to content

Commit 1a67c67

Browse files
committed
fixed
1 parent dae7cdb commit 1a67c67

File tree

6 files changed

+9
-4
lines changed

6 files changed

+9
-4
lines changed

examples/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"description": "Example scripts for Stagehand",
66
"main": "./",
7+
"type": "module",
78
"scripts": {
89
"build": "pnpm --filter @browserbasehq/stagehand run build",
910
"start": "pnpm run build && sh -c 'if [ -n \"$1\" ]; then tsx \"$1.ts\"; else tsx example.ts; fi' --"

examples/v3_example.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import V3 from "../lib/v3/v3.js";
1+
import { V3 } from "../lib/v3/v3";
22
import puppeteer from "puppeteer-core";
33

44
const v3 = new V3({
@@ -28,3 +28,6 @@ const observeResult = {
2828

2929
await new Promise((resolve) => setTimeout(resolve, 200));
3030
await v3.act(observeResult, page);
31+
32+
await v3.close();
33+
await puppeteerBrowser.close();

lib/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@browserbasehq/stagehand-lib",
33
"version": "2.4.1",
44
"private": true,
5+
"type": "module",
56
"description": "Core Stagehand library sources",
67
"main": "../dist/index.js",
78
"module": "../dist/index.js",

lib/v3/tests/default-page-tracking.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { test, expect } from "@playwright/test";
2-
import V3 from "../../v3/v3.js";
2+
import { V3 } from "../../v3/v3";
33

44
test.describe("V3 default page tracking", () => {
55
let v3: V3;

lib/v3/tests/shadow-iframe.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { test, expect } from "@playwright/test";
2-
import V3 from "../../v3/v3.js";
2+
import { V3 } from "../../v3/v3";
33
import puppeteer from "puppeteer-core";
44
import { chromium } from "playwright";
55
import { ObserveResult } from "@/types/stagehand";

lib/v3/v3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function defaultLogger(
6868
* - Bridges external page objects (Playwright/Puppeteer) into internal frameIds for handlers.
6969
* - Provides a stable API surface for downstream code regardless of runtime environment.
7070
*/
71-
export default class V3 {
71+
export class V3 {
7272
private readonly opts: V3Options;
7373
private state: InitState = { kind: "UNINITIALIZED" };
7474
private actHandler: ActHandler | null = null;

0 commit comments

Comments
 (0)