Skip to content

Commit

Permalink
Release v1.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Aug 9, 2024
1 parent 7edbb9d commit e12a45c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Example configuration in **package.json** to allow 5,000 ms:
- 🪺 [recursive-exec](https://github.com/center-key/recursive-exec):  _Run a command on each file in a folder and its subfolders_
- 🔍 [replacer-util](https://github.com/center-key/replacer-util):  _Find and replace strings or template outputs in text files_
- 🔢 [rev-web-assets](https://github.com/center-key/rev-web-assets):  _Revision web asset filenames with cache busting content hash fingerprints_
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into named groups of easy to manage commands_
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into groups of easy to manage commands_
- 🚦 [w3c-html-validator](https://github.com/center-key/w3c-html-validator):  _Check the markup validity of HTML files using the W3C validator_
[MIT License](LICENSE.txt)
4 changes: 2 additions & 2 deletions dist/puppeteer-browser-ready.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! puppeteer-browser-ready v1.3.3 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
//! puppeteer-browser-ready v1.3.4 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License

import { Browser, HTTPResponse, Page } from 'puppeteer';
import { HTMLElement } from 'node-html-parser';
Expand Down Expand Up @@ -43,6 +43,6 @@ declare const browserReady: {
startWebServer(options?: StartWebServerOptions): Promise<Http>;
shutdownWebServer(http: Http): Promise<void>;
goto(url: string, options?: BrowserReadyOptions): (browser: Browser) => Promise<Web>;
close(web: Web): Promise<Web>;
close(web: Web | null): Promise<Web | null>;
};
export { browserReady };
6 changes: 3 additions & 3 deletions dist/puppeteer-browser-ready.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! puppeteer-browser-ready v1.3.3 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
//! puppeteer-browser-ready v1.3.4 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License

import { parse } from 'node-html-parser';
import express from 'express';
Expand Down Expand Up @@ -46,7 +46,7 @@ const browserReady = {
const settings = { ...defaults, ...options };
const log = (label, msg) => settings.verbose &&
console.log(' ', Date.now() % 100000, label + ':', msg);
const rootInfo = (root) => root.constructor.name + '/' + root.firstChild?.toString();
const rootInfo = (root) => `${root.constructor.name}/${root.firstChild?.toString().trim()}`;
const web = async (browser) => {
log('Connected', browser.isConnected());
try {
Expand Down Expand Up @@ -76,7 +76,7 @@ const browserReady = {
return web;
},
async close(web) {
if (web && web.browser)
if (web?.browser)
await web.browser.close();
return web;
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppeteer-browser-ready",
"version": "1.3.3",
"version": "1.3.4",
"description": "Simple utility to go to a URL and wait for the HTTP response",
"license": "MIT",
"type": "module",
Expand Down

0 comments on commit e12a45c

Please sign in to comment.