Skip to content

don't log deprecation warning if onlyVisible is undefined #740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

seanmcguire12
Copy link
Member

why

  • currently we are logging a deprecation warning for onlyVisible, even if the user does not define it
  • this is annoying

what changed

  • removed the default value for onlyVisible in StagehandPage.ts so that it remains undefined if the user does not define it

test plan

  • regression evals

Copy link

changeset-bot bot commented May 8, 2025

🦋 Changeset detected

Latest commit: b4dabec

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@seanmcguire12 seanmcguire12 marked this pull request as ready for review May 8, 2025 22:08
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Removed the default value for onlyVisible parameter in observe() method to prevent unnecessary deprecation warnings when the parameter is not explicitly defined by users.

  • Modified lib/StagehandPage.ts to remove default false value for onlyVisible parameter
  • Updated logging logic to only include onlyVisible field when explicitly defined
  • Maintains backward compatibility while reducing noise in logs

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@seanmcguire12 seanmcguire12 merged commit 28840a7 into main May 8, 2025
13 checks passed
@github-actions github-actions bot mentioned this pull request May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants