phantomas 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/browser.js +6 -1
  2. package/package.json +2 -2
package/lib/browser.js CHANGED
@@ -334,11 +334,16 @@ Browser.prototype.close = async () => {
334
334
  // https://github.com/puppeteer/puppeteer/blob/v1.11.0/docs/api.md#pagecloseoptions
335
335
  if (this.page && !this.page.isClosed())
336
336
  await this.page.close({ runBeforeUnload: true });
337
+ } catch (ex) /* istanbul ignore next */ {
338
+ debug("An exception was raised while closing the page: " + ex);
339
+ debug(ex);
340
+ }
337
341
 
342
+ try {
338
343
  // The page is closed, let's close the browser
339
344
  if (this.browser && this.browser.isConnected()) await this.browser.close();
340
345
  } catch (ex) /* istanbul ignore next */ {
341
- debug("An exception was raised in Browser.prototype.close(): " + ex);
346
+ debug("An exception was raised while closing the browser: " + ex);
342
347
  debug(ex);
343
348
  }
344
349
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phantomas",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "author": "macbre <maciej.brencz@gmail.com> (http://macbre.net)",
5
5
  "description": "Headless Chromium-based web performance metrics collector and monitoring tool",
6
6
  "main": "./lib/index.js",
@@ -33,7 +33,7 @@
33
33
  "decamelize": "^5.0.0",
34
34
  "fast-stats": "0.0.6",
35
35
  "js-yaml": "^4.0.0",
36
- "puppeteer": "^20.5.0"
36
+ "puppeteer": "^20.8.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@jest/globals": "^28.0.0",