Releases: rmehner/bits-to-dead-trees
v2.4.1
v2.4.0
v2.3.0
v2.2.2
v2.2.1
v2.2.0
v2.1.1
v2.1.0
v2.0.1
v2.0.0
Major Changes
-
b4ebed6: Allow more options for pdf, context and goto to be passed. Also working validations.
We allow way more options now to be given in the payload:
pdfOptions
are the options for thepdf
call in Playwright: https://playwright.dev/docs/api/class-page#page-pdf.gotoOptions
are the options for thegoto
method in Playwright: https://playwright.dev/docs/api/class-page#page-goto- if you don't pass anything, we default to a timeout of 60000 and wait for
networkidle
- if you don't pass anything, we default to a timeout of 60000 and wait for
browserContextOptions
are the options for the browser context in Playwright: https://playwright.dev/docs/api/class-browser#browser-new-context- if you don't pass anything, we default to set
ignoreHTTPSErrors
totrue
- if you don't pass anything, we default to set
We finally added tests too! ✌️
Breaking Changes
-
We don't allow
options
in the payload anymore. Those arepdfOptions
now. To adapt your code, renameoptions
topdfOptions
and you should be good to go.
This change was needed to allow more options for other methods we're using (liketimeout
forgoto
). -
We have stricter validation now and don't allow unknown keys in the option objects now. Previously we've ignored them, but we've now opted to bail out with an validation error so the user gets notified on typos and such.
-
484b197: Return an error if page could not be loaded
Previously we've ignored if the page could not be loaded and tried to create a PDF anyway. However, this lead to PDFs with random error messages on them, instead of a proper error in logging or similar.
To provide an better experience, we've opted to change this, so errors are caught earlier.