Skip to content

Releases: zploskey/bs-puppeteer

v0.13.0

24 Mar 08:30
Compare
Choose a tag to compare

Upgraded and tested on Puppeteer 2.0+.

This release now runs on Bucklescript 7 (#123, @scottoasis)

Dropped support for Node 8.

Bug Fixes

  • Changed jsonValue return type to be Js.Json.t (#124, @leeor)
  • replaced method_ with requestMethod (#125, @leeor)

v0.12.0

14 Oct 04:18
5045b8e
Compare
Choose a tag to compare

Add support for changes introduced in Puppeteer 1.9.

  • Support goto and waitForNavigation on frames
  • Add Browser.target()
  • Add Response.frame()

See the main commits in #97.

v0.11.0

16 Sep 02:42
Compare
Choose a tag to compare

Update to support Puppeteer 1.8 features, fix a number of bugs, and refactor API to be more in line with the direction of the ecosystem by being compatible with fast pipe.

Breaking changes

This release brings some major refactoring to convert all functions to the t-first (object-first) convention. All functions are now compatible with fast pipe syntax (-> in Reason, |. in BuckleScript).

  • Convert to object-first convention for use with fast pipe (#77)
  • Remove deprecated Launcher module (cbf2e30)
  • Alter JSHandle.t and ElementHandle.t to track the type of what they contain (#91)
  • Reconcile the types of the two queryObjects functions (25cda07)
  • Launch option ignoreDefaultArgs now takes the variant Puppeteer.IgnoreDefaultArgs.t containing a bool or an array of args (cadd87b)

Upgrade instructions:

Change usage of the |> operator to -> (or |. in BS) when applied to bs-puppeteer functions. Check that use of bs-puppeteer function not using a pipe operator are supplying an instance of the type as their first argument. Functions which take 1 or no arguments won't require any changes.

If you used queryObjects, either of the handle types, or launched with ignoreDefaultArgs you may need to adjust your usage to fix a compile error.

Bug fixes

  • Frame.executionContext should return a promise (#87)
  • fix: remove t-last wrapper for setBypassCSP (a340d23)
  • Fix some issues with Request.continue overrides (5310e36, d422900)
    • NOTE: The API of Request.continue's overrides argument was refactored. While this is technically breaking, the overrides were not previously usable.
  • fix: Response.remoteAddress needs to be a Js.t (2c10aa1)
    • Previously this was typed incorrectly.
  • Fix evaluateHandle return types to make callbacks return handles (370ca6e)

New features

Bindings to new features introduced upstream.

  • Add referer to Navigation.makeOptions() + options type (#81)
  • Add BrowserContext permission overrides (#82)
  • Expose multiple execution contexts in Frame (#87)
  • Add geolocation feature (Page.setGeolocation) (25003f4)
  • Add new getters for Response data
    • Add Response.statusText() (448c1b1)
    • Add Response.remoteAddress() (55f4a56)

v0.10.0

13 Aug 12:57
Compare
Choose a tag to compare

Updates with new features and changes from Puppeteer 1.7.

  • Add waitForRequest and waitForResponse functions (#67)
  • Add BrowserContext.pages method (#69)
  • Add "preferCSSPageSize" to Page.pdfOptions (#70)
  • Fix Page.viewport and Page.emulate (#71)
    • Make all fields in viewport optional except for width and height.
    • Construct the viewport using bs.deriving abstract.
    • Remove unnecessary unit argument to Page.viewport().
    • Rename Page.emulateOption to emulateOptions.
  • Add defaultViewport options and handle null viewports (#73)
    • Note: Page.viewport() now may return null
    • Make Viewport a top level module
  • Add options arg to Puppeteer.defaultArgs (0fb495d)

v0.9.0

18 Jul 03:20
Compare
Choose a tag to compare

Bug fixes and new features from Puppeteer 1.6.

New Features

  • Add ElementHandle.isIntersectingViewport() (fa075d6)
  • Add reportAnonymousScripts option for JS coverage (cd67702)
  • Add blockedbyclient and blockedbyresponse error codes to Request.abort() (e43b8b5)

Bug Fixes / Improvements

  • Make waitForNavigation returned response optional (5a62dad)
  • Use bs.string for Screenshot.options _type field (2e7c567)
  • Use Node.Buffer.t instead of Typed_array (5c7ae0d)

v0.8.0

13 Jun 22:46
Compare
Choose a tag to compare

Support for Puppeteer 1.5. User-facing API changes are listed below. A couple of very minor breaking changes for consistency and correctness are marked as breaking.

New Features

  • Rename Target.pageType to targetType (#61)
  • Add Target type background_page (a4c5280)
  • Add slowMo to connectOptions (b9977cb)
  • Add missing ignoreDefaultArgs launch option (8374023)
  • Add Browser.process() (db8431c)
  • Add Browser.targets() (64f8105)
  • Add Page.isClosed() (6705ec9)
  • Add Page.setViewport() (7cc7478)
  • Add ExecutionContext.frame() (fdaee4a)
  • Make JSHandle.asElement() return an option breaking (c6a63ad)
  • Add Request.isNavigationRequest() (new in Puppeteer 1.5) (deb635e)
  • Add Target.opener() (new in Puppeteer 1.5) (a949007)
  • Support BrowserContext (new in Puppeteer 1.5) (18e2a94)
  • Add Worker module (Web Workers, new in Puppeteer 1.5) (4160b9b)

Bug Fixes

  • Fix Mouse.move options parameter (9b7c55c)
  • Tracing.start's options and path aren't optional (88f6f4a)
  • Move hover function to FrameBase (You can hover in a frame too) (01b5f51)
  • Fixes for Page.cookie type breaking (6ea5ddf)
  • Don't override addScriptTag in Frame (Fixed this external) (b263d86)
  • Move Page.click to FrameBase.click (Frames can be clicked too) (3433ed8)
  • Move Page.content() to FrameBase.content() (Frames have content too) (6f1b218)
  • deviceScaleFactor should be a float breaking (3b109ac)
  • Frames can also focus (5d728a4)
  • pdfOptions##scale should be a float breaking (4990439)
  • Move Page.select() to FrameBase (Can now select in a Frame) (6852beb)
  • Move Page.tap() to FrameBase (Can now tap in a frame) (ee135af)
  • Move Page.type_() and typeOptions to FrameBase (Can now type into Frames) (840364d)
  • Move Page.url() to FrameBase (Frames have urls too) (751bfc8)