File tree Expand file tree Collapse file tree 6 files changed +9
-4
lines changed Expand file tree Collapse file tree 6 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 4
4
"private" : true ,
5
5
"description" : " Example scripts for Stagehand" ,
6
6
"main" : " ./" ,
7
+ "type" : " module" ,
7
8
"scripts" : {
8
9
"build" : " pnpm --filter @browserbasehq/stagehand run build" ,
9
10
"start" : " pnpm run build && sh -c 'if [ -n \" $1\" ]; then tsx \" $1.ts\" ; else tsx example.ts; fi' --"
Original file line number Diff line number Diff line change 1
- import V3 from "../lib/v3/v3.js " ;
1
+ import { V3 } from "../lib/v3/v3" ;
2
2
import puppeteer from "puppeteer-core" ;
3
3
4
4
const v3 = new V3 ( {
@@ -28,3 +28,6 @@ const observeResult = {
28
28
29
29
await new Promise ( ( resolve ) => setTimeout ( resolve , 200 ) ) ;
30
30
await v3 . act ( observeResult , page ) ;
31
+
32
+ await v3 . close ( ) ;
33
+ await puppeteerBrowser . close ( ) ;
Original file line number Diff line number Diff line change 2
2
"name" : " @browserbasehq/stagehand-lib" ,
3
3
"version" : " 2.4.1" ,
4
4
"private" : true ,
5
+ "type" : " module" ,
5
6
"description" : " Core Stagehand library sources" ,
6
7
"main" : " ../dist/index.js" ,
7
8
"module" : " ../dist/index.js" ,
Original file line number Diff line number Diff line change 1
1
import { test , expect } from "@playwright/test" ;
2
- import V3 from "../../v3/v3.js " ;
2
+ import { V3 } from "../../v3/v3" ;
3
3
4
4
test . describe ( "V3 default page tracking" , ( ) => {
5
5
let v3 : V3 ;
Original file line number Diff line number Diff line change 1
1
import { test , expect } from "@playwright/test" ;
2
- import V3 from "../../v3/v3.js " ;
2
+ import { V3 } from "../../v3/v3" ;
3
3
import puppeteer from "puppeteer-core" ;
4
4
import { chromium } from "playwright" ;
5
5
import { ObserveResult } from "@/types/stagehand" ;
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ function defaultLogger(
68
68
* - Bridges external page objects (Playwright/Puppeteer) into internal frameIds for handlers.
69
69
* - Provides a stable API surface for downstream code regardless of runtime environment.
70
70
*/
71
- export default class V3 {
71
+ export class V3 {
72
72
private readonly opts : V3Options ;
73
73
private state : InitState = { kind : "UNINITIALIZED" } ;
74
74
private actHandler : ActHandler | null = null ;
You can’t perform that action at this time.
0 commit comments