puppeteer-browser-ready 1.3.3 → 1.3.4

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.
package/README.md CHANGED
@@ -241,7 +241,7 @@ Example configuration in **package.json** to allow 5,000 ms:
241
241
  - 🪺 [recursive-exec](https://github.com/center-key/recursive-exec):  _Run a command on each file in a folder and its subfolders_
242
242
  - 🔍 [replacer-util](https://github.com/center-key/replacer-util):  _Find and replace strings or template outputs in text files_
243
243
  - 🔢 [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_
245
245
  - 🚦 [w3c-html-validator](https://github.com/center-key/w3c-html-validator):  _Check the markup validity of HTML files using the W3C validator_
246
246
 
247
247
  [MIT License](LICENSE.txt)
@@ -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
2
2
 
3
3
  import { Browser, HTTPResponse, Page } from 'puppeteer';
4
4
  import { HTMLElement } from 'node-html-parser';
@@ -43,6 +43,6 @@ declare const browserReady: {
43
43
  startWebServer(options?: StartWebServerOptions): Promise<Http>;
44
44
  shutdownWebServer(http: Http): Promise<void>;
45
45
  goto(url: string, options?: BrowserReadyOptions): (browser: Browser) => Promise<Web>;
46
- close(web: Web): Promise<Web>;
46
+ close(web: Web | null): Promise<Web | null>;
47
47
  };
48
48
  export { browserReady };
@@ -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
2
2
 
3
3
  import { parse } from 'node-html-parser';
4
4
  import express from 'express';
@@ -46,7 +46,7 @@ const browserReady = {
46
46
  const settings = { ...defaults, ...options };
47
47
  const log = (label, msg) => settings.verbose &&
48
48
  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()}`;
50
50
  const web = async (browser) => {
51
51
  log('Connected', browser.isConnected());
52
52
  try {
@@ -76,7 +76,7 @@ const browserReady = {
76
76
  return web;
77
77
  },
78
78
  async close(web) {
79
- if (web && web.browser)
79
+ if (web?.browser)
80
80
  await web.browser.close();
81
81
  return web;
82
82
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "puppeteer-browser-ready",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "Simple utility to go to a URL and wait for the HTTP response",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -41,32 +41,13 @@
41
41
  "mocha": true,
42
42
  "node": true
43
43
  },
44
- "eslintConfig": {
45
- "ignorePatterns": [
46
- "build",
47
- "dist",
48
- "node_modules"
49
- ],
50
- "root": true,
51
- "parser": "@typescript-eslint/parser",
52
- "plugins": [
53
- "@typescript-eslint"
54
- ],
55
- "extends": [
56
- "eslint:recommended",
57
- "plugin:@typescript-eslint/recommended"
58
- ],
59
- "rules": {
60
- "@typescript-eslint/no-non-null-assertion": "off"
61
- }
62
- },
63
44
  "runScriptsConfig": {
64
45
  "clean": [
65
46
  "rimraf build dist"
66
47
  ],
67
48
  "lint": [
68
49
  "jshint . --exclude-path .gitignore",
69
- "eslint --max-warnings 0 . --ext .ts"
50
+ "eslint --max-warnings 0"
70
51
  ],
71
52
  "build": [
72
53
  "tsc",
@@ -79,7 +60,7 @@
79
60
  "test": "mocha spec/*.spec.js --timeout 7000 --retries 1"
80
61
  },
81
62
  "peerDependencies": {
82
- "puppeteer": "^15 || ^16 || ^17 || ^18 || ^19.7 || ^20 || ^21 || ^22.8"
63
+ "puppeteer": "^15 || ^16 || ^17 || ^18 || ^19.7 || ^20 || ^21 || ^22.8 || ^23"
83
64
  },
84
65
  "dependencies": {
85
66
  "express": "~4.19",
@@ -87,24 +68,24 @@
87
68
  "node-html-parser": "~6.1"
88
69
  },
89
70
  "devDependencies": {
71
+ "@eslint/js": "~9.8",
90
72
  "@types/express": "~4.17",
91
73
  "@types/mocha": "~10.0",
92
- "@types/node": "~20.12",
74
+ "@types/node": "~22.1",
93
75
  "@types/ws": "~8.5",
94
- "@typescript-eslint/eslint-plugin": "~7.8",
95
- "@typescript-eslint/parser": "~7.8",
96
76
  "add-dist-header": "~1.4",
97
77
  "assert-deep-strict-equal": "~1.2",
98
78
  "copy-file-util": "~1.2",
99
79
  "copy-folder-util": "~1.1",
100
- "eslint": "8.57.0",
80
+ "eslint": "~9.8",
101
81
  "jshint": "~2.13",
102
- "mocha": "~10.4",
82
+ "mocha": "~10.7",
103
83
  "open": "~10.1",
104
- "puppeteer": "~22.8",
105
- "rimraf": "~5.0",
106
- "run-scripts-util": "~1.2",
107
- "typescript": "~5.4",
84
+ "puppeteer": "~23.0",
85
+ "rimraf": "~6.0",
86
+ "run-scripts-util": "~1.3",
87
+ "typescript": "~5.5",
88
+ "typescript-eslint": "~8.0",
108
89
  "w3c-html-validator": "~1.8"
109
90
  }
110
91
  }