diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a655b07..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: 'node' - -node_js: - - 14 - -cache: - npm: false - -jobs: - fast_finish: true - -install: - - npm install - -script: - - npm run test - - diff --git a/package-lock.json b/package-lock.json index 160316d..59bfd9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,7 @@ "standard-version": "^9.0.0", "ts-node": "^9.0.0", "typedoc": "^0.19.0", - "typescript": "^4.0.2" + "typescript": "^5.4.5" }, "engines": { "node": ">=16" @@ -601,20 +601,6 @@ } } }, - "node_modules/@commitlint/load/node_modules/typescript": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", - "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", - "dev": true, - "optional": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=12.20" - } - }, "node_modules/@commitlint/resolve-extends": { "version": "17.4.4", "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.4.4.tgz", @@ -9174,20 +9160,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/puppeteer/node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "optional": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -10901,16 +10873,16 @@ } }, "node_modules/typescript": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.8.tgz", - "integrity": "sha512-oz1765PN+imfz1MlZzSZPtC/tqcwsCyIYA8L47EkRnRW97ztRk83SzMiWLrnChC0vqoYxSU1fcFUDA5gV/ZiPg==", - "dev": true, + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uglify-js": { @@ -11819,13 +11791,6 @@ "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" } - }, - "typescript": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", - "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", - "dev": true, - "optional": true } } }, @@ -18263,13 +18228,6 @@ "requires": { "argparse": "^2.0.1" } - }, - "typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "optional": true, - "peer": true } } }, @@ -19563,10 +19521,10 @@ "dev": true }, "typescript": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.8.tgz", - "integrity": "sha512-oz1765PN+imfz1MlZzSZPtC/tqcwsCyIYA8L47EkRnRW97ztRk83SzMiWLrnChC0vqoYxSU1fcFUDA5gV/ZiPg==", - "dev": true + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "devOptional": true }, "uglify-js": { "version": "3.17.4", diff --git a/package.json b/package.json index cab4f11..def4829 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "standard-version": "^9.0.0", "ts-node": "^9.0.0", "typedoc": "^0.19.0", - "typescript": "^4.0.2" + "typescript": "^5.4.5" }, "files": [ "build/main", @@ -174,4 +174,4 @@ "**/*.spec.js" ] } -} \ No newline at end of file +} diff --git a/src/example/index.ts b/src/example/index.ts index 2826cc6..55f51ad 100644 --- a/src/example/index.ts +++ b/src/example/index.ts @@ -5,6 +5,13 @@ import puppeteer from 'puppeteer'; import { PuppeteerScreenRecorder } from '../lib/PuppeteerScreenRecorder'; +/** @ignore */ +function sleep(time: number) { + return new Promise((resolve) => { + setTimeout(resolve, time); + }); +} + /** @ignore */ async function testStartMethod(format: string, isStream: boolean) { const browser = await puppeteer.launch({ @@ -23,7 +30,7 @@ async function testStartMethod(format: string, isStream: boolean) { await recorder.start(format); } await page.goto('https://developer.mozilla.org/en-US/docs/Web/CSS/animation'); - await page.waitFor(10 * 1000); + await sleep(10 * 1000); await recorder.stop(); await browser.close(); }