Skip to content

Commit e12a45c

Browse files
committed
Release v1.3.4
1 parent 7edbb9d commit e12a45c

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Example configuration in **package.json** to allow 5,000 ms:
241241
- 🪺 [recursive-exec](https://github.com/center-key/recursive-exec):  _Run a command on each file in a folder and its subfolders_
242242
- 🔍 [replacer-util](https://github.com/center-key/replacer-util):  _Find and replace strings or template outputs in text files_
243243
- 🔢 [rev-web-assets](https://github.com/center-key/rev-web-assets):  _Revision web asset filenames with cache busting content hash fingerprints_
244-
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into named groups of easy to manage commands_
244+
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into groups of easy to manage commands_
245245
- 🚦 [w3c-html-validator](https://github.com/center-key/w3c-html-validator):  _Check the markup validity of HTML files using the W3C validator_
246246
247247
[MIT License](LICENSE.txt)

dist/puppeteer-browser-ready.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! puppeteer-browser-ready v1.3.3 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
1+
//! puppeteer-browser-ready v1.3.4 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
22

33
import { Browser, HTTPResponse, Page } from 'puppeteer';
44
import { HTMLElement } from 'node-html-parser';
@@ -43,6 +43,6 @@ declare const browserReady: {
4343
startWebServer(options?: StartWebServerOptions): Promise<Http>;
4444
shutdownWebServer(http: Http): Promise<void>;
4545
goto(url: string, options?: BrowserReadyOptions): (browser: Browser) => Promise<Web>;
46-
close(web: Web): Promise<Web>;
46+
close(web: Web | null): Promise<Web | null>;
4747
};
4848
export { browserReady };

dist/puppeteer-browser-ready.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! puppeteer-browser-ready v1.3.3 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
1+
//! puppeteer-browser-ready v1.3.4 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
22

33
import { parse } from 'node-html-parser';
44
import express from 'express';
@@ -46,7 +46,7 @@ const browserReady = {
4646
const settings = { ...defaults, ...options };
4747
const log = (label, msg) => settings.verbose &&
4848
console.log(' ', Date.now() % 100000, label + ':', msg);
49-
const rootInfo = (root) => root.constructor.name + '/' + root.firstChild?.toString();
49+
const rootInfo = (root) => `${root.constructor.name}/${root.firstChild?.toString().trim()}`;
5050
const web = async (browser) => {
5151
log('Connected', browser.isConnected());
5252
try {
@@ -76,7 +76,7 @@ const browserReady = {
7676
return web;
7777
},
7878
async close(web) {
79-
if (web && web.browser)
79+
if (web?.browser)
8080
await web.browser.close();
8181
return web;
8282
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "puppeteer-browser-ready",
3-
"version": "1.3.3",
3+
"version": "1.3.4",
44
"description": "Simple utility to go to a URL and wait for the HTTP response",
55
"license": "MIT",
66
"type": "module",

0 commit comments

Comments
 (0)