puppeteer-browser-ready 1.0.0 → 1.1.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.
package/README.md CHANGED
@@ -215,7 +215,7 @@ option to bump up the allowed test execution time.
215
215
  Example configuration in **package.json** to allow 5,000 ms:
216
216
  ```json
217
217
  "scripts": {
218
- "pretest": "run-scripts build",
218
+ "pretest": "run-scripts clean build",
219
219
  "test": "mocha spec/*.spec.js --timeout 5000"
220
220
  },
221
221
  ```
@@ -1,8 +1,9 @@
1
- //! puppeteer-browser-ready v1.0.0 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
1
+ //! puppeteer-browser-ready v1.1.0 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
2
2
 
3
3
  /// <reference types="cheerio" />
4
4
  import { Browser, HTTPResponse, Page } from 'puppeteer';
5
5
  import { Server } from 'http';
6
+ import { SuiteFunction } from 'mocha';
6
7
  import httpTerminator from 'http-terminator';
7
8
  export type StartWebServerSettings = {
8
9
  folder: string;
@@ -34,6 +35,9 @@ export type BrowserReadySettings = {
34
35
  verbose: boolean;
35
36
  };
36
37
  export type BrowserReadyOptions = Partial<BrowserReadySettings>;
38
+ declare global {
39
+ var describe: SuiteFunction;
40
+ }
37
41
  declare const browserReady: {
38
42
  log(...args: unknown[]): void;
39
43
  startWebServer(options?: StartWebServerOptions): Promise<Http>;
@@ -1,4 +1,4 @@
1
- //! puppeteer-browser-ready v1.0.0 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
1
+ //! puppeteer-browser-ready v1.1.0 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
2
2
 
3
3
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
4
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -15,7 +15,7 @@ import httpTerminator from 'http-terminator';
15
15
  // Package
16
16
  const browserReady = {
17
17
  log(...args) {
18
- const indent = typeof globalThis['describe'] === 'function' ? ' [' : '[';
18
+ const indent = typeof globalThis.describe === 'function' ? ' [' : '[';
19
19
  console.log(indent + new Date().toISOString() + ']', ...args);
20
20
  },
21
21
  startWebServer(options) {
@@ -1,4 +1,4 @@
1
- //! puppeteer-browser-ready v1.0.0 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
1
+ //! puppeteer-browser-ready v1.1.0 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
2
2
 
3
3
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
4
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -30,7 +30,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
30
30
  // Package
31
31
  const browserReady = {
32
32
  log(...args) {
33
- const indent = typeof globalThis['describe'] === 'function' ? ' [' : '[';
33
+ const indent = typeof globalThis.describe === 'function' ? ' [' : '[';
34
34
  console.log(indent + new Date().toISOString() + ']', ...args);
35
35
  },
36
36
  startWebServer(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "puppeteer-browser-ready",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Simple utility to go to a URL and wait for the HTTP response",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -65,8 +65,10 @@
65
65
  }
66
66
  },
67
67
  "runScriptsConfig": {
68
+ "clean": [
69
+ "rimraf build dist"
70
+ ],
68
71
  "build": [
69
- "rimraf build dist **/.DS_Store",
70
72
  "jshint . --exclude-path .gitignore",
71
73
  "eslint --max-warnings 0 . --ext .ts",
72
74
  "tsc",
@@ -77,11 +79,11 @@
77
79
  ]
78
80
  },
79
81
  "scripts": {
80
- "pretest": "run-scripts build",
82
+ "pretest": "run-scripts clean build",
81
83
  "test": "mocha spec/*.spec.js --timeout 5000 --retries 1"
82
84
  },
83
85
  "peerDependencies": {
84
- "puppeteer": "^5 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || ^13 || ^14 || ^15 || ^16 || ^17 || ^18 || ^19.7"
86
+ "puppeteer": "^10 || ^11 || ^12 || ^13 || ^14 || ^15 || ^16 || ^17 || ^18 || ^19.7 || ^20"
85
87
  },
86
88
  "dependencies": {
87
89
  "cheerio": "~1.0.0-rc.12",
@@ -91,22 +93,23 @@
91
93
  "devDependencies": {
92
94
  "@types/cheerio": "~0.22",
93
95
  "@types/express": "~4.17",
94
- "@types/node": "~18.14",
96
+ "@types/mocha": "~10.0",
97
+ "@types/node": "~18.16",
95
98
  "@types/ws": "~8.5",
96
- "@typescript-eslint/eslint-plugin": "~5.52",
97
- "@typescript-eslint/parser": "~5.52",
99
+ "@typescript-eslint/eslint-plugin": "~5.59",
100
+ "@typescript-eslint/parser": "~5.59",
98
101
  "add-dist-header": "~1.0",
99
102
  "assert-deep-strict-equal": "~1.0",
100
103
  "copy-file-util": "~1.0",
101
104
  "copy-folder-util": "~1.0",
102
- "eslint": "~8.34",
105
+ "eslint": "~8.39",
103
106
  "jshint": "~2.13",
104
107
  "mocha": "~10.2",
105
- "open": "~8.4",
106
- "puppeteer": "~19.7",
107
- "rimraf": "3",
108
- "run-scripts-util": "~0.1",
109
- "typescript": "~4.9",
108
+ "open": "~9.1",
109
+ "puppeteer": "~20.0",
110
+ "rimraf": "~5.0",
111
+ "run-scripts-util": "~1.1",
112
+ "typescript": "~5.0",
110
113
  "w3c-html-validator": "~1.3"
111
114
  }
112
115
  }