Skip to content

Commit

Permalink
chore: update dependencies (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrandolf-2 authored Oct 18, 2022
1 parent fccac2e commit 961965e
Show file tree
Hide file tree
Showing 7 changed files with 559 additions and 691 deletions.
1,170 changes: 517 additions & 653 deletions package-lock.json

Large diffs are not rendered by default.

51 changes: 26 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"eslint": "([ \"$CI\" = true ] && eslint --ext js --ext ts --quiet -f codeframe . || eslint --ext js --ext ts .)",
"docs": "typedoc --readme none --gitRevision main --externalPattern --excludeExternals --excludeProtected --excludePrivate --plugin typedoc-plugin-markdown --out docs/api src/main.ts && npm run format",
"clean": "rimraf lib",
"build": "npm run clean && rollup --config rollup.config.ts --configPlugin typescript",
"build": "npm run clean && rollup --config rollup.config.cjs",
"build:testserver": "cd third_party/testserver && npm run build"
},
"files": [
Expand All @@ -39,37 +39,38 @@
"license": "Apache-2.0",
"type": "module",
"devDependencies": {
"@rollup/plugin-typescript": "8.3.2",
"@types/chai": "4.3.1",
"@types/mime": "^2.0.3",
"@types/mocha": "9.1.1",
"@types/node": "17.0.36",
"@types/ws": "^8.5.3",
"@types/yargs": "17.0.10",
"@typescript-eslint/eslint-plugin": "5.26.0",
"@typescript-eslint/parser": "5.27.0",
"c8": "7.11.3",
"@rollup/plugin-typescript": "9.0.1",
"@types/chai": "4.3.3",
"@types/mime": "3.0.1",
"@types/mocha": "10.0.0",
"@types/node": "18.11.0",
"@types/ws": "8.5.3",
"@types/yargs": "17.0.13",
"@typescript-eslint/eslint-plugin": "5.40.0",
"@typescript-eslint/parser": "5.40.0",
"c8": "7.12.0",
"chai": "4.3.6",
"cross-env": "7.0.3",
"eslint": "8.16.0",
"eslint": "8.25.0",
"eslint-config-google": "0.14.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-tsdoc": "0.2.16",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-tsdoc": "0.2.17",
"lighthouse": "9.5.0-dev.20220913",
"mime": "3.0.0",
"mocha": "10.0.0",
"prettier": "2.6.2",
"puppeteer": "18.1.0",
"mocha": "10.1.0",
"prettier": "2.7.1",
"puppeteer": "19.0.0",
"puppeteer-core": "19.0.0",
"rimraf": "3.0.2",
"rollup": "2.75.6",
"rollup-plugin-dts": "4.2.2",
"rollup": "3.2.2",
"rollup-plugin-dts": "5.0.0",
"snap-shot-it": "7.9.6",
"ts-node": "10.8.0",
"ts-node": "10.9.1",
"tslib": "2.4.0",
"typedoc": "0.22.15",
"typedoc-plugin-markdown": "3.12.1",
"typescript": "4.6.4"
"typedoc": "0.23.16",
"typedoc-plugin-markdown": "3.13.6",
"typescript": "4.8.4"
},
"peerDependencies": {
"puppeteer": ">=18.0.5"
Expand All @@ -80,8 +81,8 @@
}
},
"dependencies": {
"cli-table3": "0.6.2",
"cli-table3": "0.6.3",
"colorette": "2.0.19",
"yargs": "17.5.1"
"yargs": "17.6.0"
}
}
12 changes: 7 additions & 5 deletions rollup.config.ts → rollup.config.cjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import typescript from '@rollup/plugin-typescript';
import dts from 'rollup-plugin-dts';

const typescript = require('@rollup/plugin-typescript').default;
const dts = require('rollup-plugin-dts').default;
const pkg = require('./package.json');

export default [
module.exports = [
{
input: 'src/main.ts',
output: [
{
file: 'lib/main.js',
sourcemap: true,
format: 'es',
},
{
file: 'lib/cjs/main.cjs',
sourcemap: true,
format: 'cjs',
},
],
external: [...Object.keys(pkg.peerDependencies), /^lighthouse/],
plugins: [typescript()],
plugins: [typescript({ module: 'NodeNext' })],
},
{
input: 'src/main.ts',
Expand All @@ -40,6 +41,7 @@ export default [
output: {
file: 'lib/cli.js',
format: 'es',
sourcemap: true,
banner: '#!/usr/bin/env node',
},
external: [
Expand Down
4 changes: 2 additions & 2 deletions src/PuppeteerRunnerExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

import { Browser, ElementHandle, Frame, Page } from 'puppeteer';
import { Frame as InternalFrame } from 'puppeteer/lib/esm/puppeteer/common/Frame.js';
import { CDPPage as InternalPage } from 'puppeteer/lib/esm/puppeteer/common/Page.js';
import { Frame as InternalFrame } from 'puppeteer-core/internal/common/Frame.js';
import { CDPPage as InternalPage } from 'puppeteer-core/internal/common/Page.js';
import { RunnerExtension } from './RunnerExtension.js';
import {
AssertedEventType,
Expand Down
5 changes: 3 additions & 2 deletions test/lighthouse/lighthouse-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import snapshot from 'snap-shot-it';
import { execFile } from 'child_process';
import { promisify } from 'util';
import puppeteer from 'puppeteer';
import FlowResult from 'lighthouse/types/lhr/flow';
import FlowResult from 'lighthouse/types/lhr/flow.js';
import Result from 'lighthouse/types/lhr/lhr.js';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down Expand Up @@ -179,7 +180,7 @@ describe('Lighthouse user flow', function () {
['navigation', 'timespan', 'navigation', 'timespan']
);

for (const { lhr } of flowResult.steps) {
for (const { lhr } of flowResult.steps as Array<{ lhr: Result }>) {
assert.equal(lhr.configSettings.formFactor, 'desktop');
assert.ok(lhr.configSettings.screenEmulation.disabled);

Expand Down
4 changes: 2 additions & 2 deletions test/runner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,11 @@ describe('Runner', () => {
);
await runner.run();
assert.strictEqual(
await page.evaluate(() => window.visualViewport.width),
await page.evaluate(() => window.visualViewport?.width),
800
);
assert.strictEqual(
await page.evaluate(() => window.visualViewport.height),
await page.evaluate(() => window.visualViewport?.height),
600
);
});
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"module": "ESNext",
"moduleResolution": "NodeNext",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
Expand Down

0 comments on commit 961965e

Please sign in to comment.