From cad8139a05d3037f47adeb380219989e8dc51a39 Mon Sep 17 00:00:00 2001 From: Randolf J Date: Fri, 1 Jul 2022 13:45:59 +0200 Subject: [PATCH] chore: improve CI --- .github/workflows/ci.yml | 299 ++++++-------------- .husky/pre-push | 2 +- README.md | 62 ---- package-lock.json | 598 ++++++++++++++++++++++++++++++++++----- package.json | 43 +-- 5 files changed, 640 insertions(+), 364 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 542730768c6a0..f7dba19150912 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,33 @@ concurrency: cancel-in-progress: true jobs: + inspect-code: + name: Inspect code + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 2 + - name: Set up Node.js + uses: actions/setup-node@v3.3.0 + with: + node-version: 18 + - name: Setup cache for Chromium binary + uses: actions/cache@v3 + with: + path: .local-chromium + key: ${{ runner.os }}-chromium-${{ hashFiles('src/revisions.ts') }} + - name: Install dependencies + run: npm ci + - name: Check code + run: npm run check + - name: Lint code + run: npm run lint + - name: Lint commits + run: npm run commitlint + if: github.event_name != 'pull_request' + check-docs: name: Check documentation runs-on: ubuntu-latest @@ -28,7 +55,7 @@ jobs: uses: actions/setup-node@v3.3.0 with: cache: npm - - name: Cache Chromium binary directory + - name: Setup cache for Chromium binary uses: actions/cache@v3 with: path: .local-chromium @@ -77,236 +104,74 @@ jobs: user_name: release-please[bot] user_email: 55107282+release-please[bot]@users.noreply.github.com - linux: - # https://github.com/actions/virtual-environments#available-environments - runs-on: ubuntu-latest + tests: + name: ${{ matrix.spec.name }} tests (${{ matrix.spec.node }}) + runs-on: ${{ matrix.spec.machine }} + continue-on-error: true strategy: matrix: - # Include all major maintenance + active LTS + current Node.js versions. - # https://github.com/nodejs/Release#release-schedule - node: [14, 16, 18] + spec: + - name: Linux + machine: ubuntu-latest + node: 14 + - name: Linux + machine: ubuntu-latest + node: 16 + - name: Linux + machine: ubuntu-latest + node: 18 + - name: macOS + machine: macos-latest + node: 14 + - name: Windows + machine: windows-latest + node: 14 steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 2 - - - name: Set up Node.js - uses: actions/setup-node@v3.3.0 - with: - node-version: ${{ matrix.node }} - - - name: Install dependencies - run: | - sudo apt-get install xvfb - # Ensure both a Chromium and a Firefox binary are available. - PUPPETEER_PRODUCT=firefox npm install - npm install - ls .local-chromium .local-firefox - - - name: Build - run: | - npm run build - - - name: Run code checks - run: | - npm run test:pinned-deps - npm run lint - npm run test:protocol-revision - npm run test:types - - - name: Run commit lint - run: | - npm run commitlint - if: github.event_name != 'pull_request' - - - name: Run unit tests with coverage - uses: nick-invision/retry@v2 - env: - CHROMIUM: true - with: - max_attempts: 3 - command: xvfb-run --auto-servernum npm run test:unit:coverage - timeout_minutes: 10 - - - name: Run unit tests on Firefox - uses: nick-invision/retry@v2 - env: - FIREFOX: true - MOZ_WEBRENDER: 0 - with: - max_attempts: 3 - timeout_minutes: 10 - command: xvfb-run --auto-servernum npm run test:unit:firefox - - - name: Test bundling and installation - env: - CHROMIUM: true - run: | - # Note: this modifies package.json to test puppeteer-core. - npm run test:install - # Undo those changes. - git checkout --force - - macos: - # https://github.com/actions/virtual-environments#available-environments - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Set up Node.js - uses: actions/setup-node@v3.3.0 - with: - # Test only the oldest maintenance LTS Node.js version. - # https://github.com/nodejs/Release#release-schedule - node-version: 14 - - - name: Install dependencies - run: | - # Test platform-specific browser binary fetching for both - # Chromium and Firefox. - PUPPETEER_PRODUCT=firefox npm install - npm install - ls .local-chromium .local-firefox - - - name: Build - run: | - npm run build - - - name: Run unit tests - env: - CHROMIUM: true - run: | - npm run test:unit - - - name: Run unit tests on Firefox - uses: nick-invision/retry@v2 + - name: Setup cache for Chromium binary + uses: actions/cache@v3 with: - max_attempts: 3 - timeout_minutes: 10 - command: npm run test:unit:firefox - - windows: - # https://github.com/actions/virtual-environments#available-environments - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v3 + path: .local-chromium + key: ${{ runner.os }}-chromium-${{ hashFiles('src/revisions.ts') }} + - name: Setup cache for Firefox binary + uses: actions/cache@v3 with: - fetch-depth: 2 - + path: .local-firefox + key: ${{ runner.os }}-firefox-${{ hashFiles('src/revisions.ts') }} - name: Set up Node.js uses: actions/setup-node@v3.3.0 with: - # Test only the oldest maintenance LTS Node.js version. - # https://github.com/nodejs/Release#release-schedule - node-version: 14 - - - name: Install dependencies - run: | - # Test platform-specific browser binary fetching for both - # Chromium and Firefox. - $env:PUPPETEER_PRODUCT='firefox' - npm install - Remove-Item Env:\PUPPETEER_PRODUCT - npm install - Get-ChildItem -Path .local-chromium,.local-firefox - - - name: Build - run: | - npm run build - - - name: Run unit tests - env: - CHROMIUM: true - run: | - npm run test:unit - - - name: Run unit tests on Firefox - uses: nick-invision/retry@v2 - continue-on-error: true + node-version: ${{ matrix.spec.node }} + - name: Install dependencies with Chromium + run: npm install + - name: Install Firefox env: - FIREFOX: true - MOZ_WEBRENDER: 0 - with: - max_attempts: 3 - timeout_minutes: 10 - command: npm run test:unit:firefox - - linux-headful: - # https://github.com/actions/virtual-environments#available-environments - runs-on: ubuntu-latest - strategy: - matrix: - # Include a current Node.js version. - # https://github.com/nodejs/Release#release-schedule - node: [18] - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Set up Node.js - uses: actions/setup-node@v3.3.0 - with: - node-version: ${{ matrix.node }} - - name: Install dependencies - run: | - sudo apt-get install xvfb - # Ensure both a Chromium and a Firefox binary are available. - PUPPETEER_PRODUCT=firefox npm install - npm install - ls .local-chromium .local-firefox - + PUPPETEER_PRODUCT: firefox + run: npm install + - name: Install linux dependencies. + if: ${{ matrix.spec.name == 'Linux' }} + run: sudo apt-get install xvfb - name: Build run: | npm run build - - name: Run unit tests in headful mode - uses: nick-invision/retry@v2 - env: - CHROMIUM: true - HEADLESS: false - with: - max_attempts: 1 - command: xvfb-run --auto-servernum npm run test:unit - timeout_minutes: 10 - - linux-chrome-headless: - runs-on: ${{ matrix.os }} - strategy: - matrix: - # https://github.com/actions/virtual-environments#available-environments - os: [ubuntu-latest] - # https://github.com/nodejs/Release#release-schedule - node: [18] - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - name: Set up Node.js - uses: actions/setup-node@v3.3.0 - with: - node-version: ${{ matrix.node }} - - name: Install dependencies - run: | - sudo apt-get install xvfb - # Ensure both a Chromium and a Firefox binary are available. - PUPPETEER_PRODUCT=firefox npm install - npm install - ls .local-chromium .local-firefox - - name: Build + npm run build:test + - name: Test types + run: npm run test:types + - name: Run all tests (only on Linux) + id: full-test + if: ${{ matrix.spec.name == 'Linux' }} + run: xvfb-run --auto-servernum npm test + - name: Test Chrome + id: test-chrome + if: ${{ steps.full-test.conclusion == 'skipped' }} + run: npm run test:chrome + - name: Test Firefox + if: ${{ steps.test-chrome.conclusion != 'skipped' }} + run: npm run test:firefox + - name: Test bundling and installation run: | - npm run build - - name: Run unit tests - uses: nick-invision/retry@v2 - env: - CHROMIUM: true - with: - max_attempts: 1 - command: xvfb-run --auto-servernum npm run test:unit:chrome-headless - timeout_minutes: 10 + # Note: this modifies package.json to test puppeteer-core, so we test this last. + npm run test:install diff --git a/.husky/pre-push b/.husky/pre-push index e44dd02ad3729..f228939276cc4 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npm run build:tsc && npm run lint:eslint && npm run doc && npm run lint:prettier && npm run test:pinned-deps +npm run lint && npm run check diff --git a/README.md b/README.md index 786d4b56379f4..57694b4db25cb 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,7 @@ sidebar_position: 1 -<<<<<<< HEAD ###### [API](https://pptr.dev/api) | [FAQ](https://pptr.dev/faq) | [Contributing](https://pptr.dev/contributing) | [Troubleshooting](https://pptr.dev/troubleshooting) -======= -###### [API](https://puppeteer.github.io/puppeteer/api) | [FAQ](https://puppeteer.github.io/puppeteer/faq) | [Contributing](https://puppeteer.github.io/puppeteer/contributing) | [Troubleshooting](https://puppeteer.github.io/puppeteer/troubleshooting) ->>>>>>> a6789de1 (feat: add documentation) > Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/). Puppeteer runs [headless](https://developers.google.com/web/updates/2017/04/headless-chrome) by default, but can be configured to run full (non-headless) Chrome or Chromium. @@ -59,24 +55,14 @@ If Puppeteer doesn't find them in the environment during the installation step, - `PUPPETEER_TMP_DIR` - defines the directory to be used by Puppeteer for creating temporary files. Defaults to [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir). - `PUPPETEER_DOWNLOAD_HOST` - overwrite URL prefix that is used to download Chromium. Note: this includes protocol and might even include path prefix. Defaults to `https://storage.googleapis.com`. - `PUPPETEER_DOWNLOAD_PATH` - overwrite the path for the downloads folder. Defaults to `/.local-chromium`, where `` is Puppeteer's package root. -<<<<<<< HEAD - `PUPPETEER_CHROMIUM_REVISION` - specify a certain version of Chromium you'd like Puppeteer to use. See [`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) on how executable path is inferred. - `PUPPETEER_EXECUTABLE_PATH` - specify an executable path to be used in [`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch). - `PUPPETEER_PRODUCT` - specify which browser you'd like Puppeteer to use. Must be one of `chrome` or `firefox`. This can also be used during installation to fetch the recommended browser binary. Setting `product` programmatically in [`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) supersedes this environment variable. The product is exposed in [`puppeteer.product`](https://pptr.dev/api/puppeteer.product) -======= -- `PUPPETEER_CHROMIUM_REVISION` - specify a certain version of Chromium you'd like Puppeteer to use. See [`puppeteer.launch`](https://puppeteer.github.io/puppeteer/api/puppeteer.puppeteernode.launch) on how executable path is inferred. -- `PUPPETEER_EXECUTABLE_PATH` - specify an executable path to be used in [`puppeteer.launch`](https://puppeteer.github.io/puppeteer/api/puppeteer.puppeteernode.launch). -- `PUPPETEER_PRODUCT` - specify which browser you'd like Puppeteer to use. Must be one of `chrome` or `firefox`. This can also be used during installation to fetch the recommended browser binary. Setting `product` programmatically in [`puppeteer.launch`](https://puppeteer.github.io/puppeteer/api/puppeteer.puppeteernode.launch) supersedes this environment variable. The product is exposed in [`puppeteer.product`](https://puppeteer.github.io/puppeteer/api/puppeteer.product) ->>>>>>> a6789de1 (feat: add documentation) - `PUPPETEER_EXPERIMENTAL_CHROMIUM_MAC_ARM` — specify Puppeteer download Chromium for Apple M1. On Apple M1 devices Puppeteer by default downloads the version for Intel's processor which runs via Rosetta. It works without any problems, however, with this option, you should get more efficient resource usage (CPU and RAM) that could lead to a faster execution time. :::danger -<<<<<<< HEAD Puppeteer is only [guaranteed to work](https://pptr.dev/faq#q-why-doesnt-puppeteer-vxxx-work-with-chromium-vyyy) with the bundled Chromium, use at your own risk. -======= -Puppeteer is only [guaranteed to work](https://puppeteer.github.io/puppeteer/faq#q-why-doesnt-puppeteer-vxxx-work-with-chromium-vyyy) with the bundled Chromium, use at your own risk. ->>>>>>> a6789de1 (feat: add documentation) ::: @@ -114,30 +100,18 @@ However, you should use `puppeteer-core` if: When using `puppeteer-core`, remember to change the _include_ line: -<<<<<<< HEAD ```ts const puppeteer = require('puppeteer-core'); ``` You will then need to call [`puppeteer.connect`](https://pptr.dev/api/puppeteer.puppeteer.connect) or [`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) with an explicit `executablePath` or `channel` option. -======= -```js -const puppeteer = require('puppeteer-core'); -``` - -You will then need to call [`puppeteer.connect`](https://puppeteer.github.io/puppeteer/api/puppeteer.puppeteer.connect) or [`puppeteer.launch`](https://puppeteer.github.io/puppeteer/api/puppeteer.puppeteernode.launch) with an explicit `executablePath` or `channel` option. ->>>>>>> a6789de1 (feat: add documentation) ### Usage Puppeteer follows the latest [maintenance LTS](https://github.com/nodejs/Release#release-schedule) version of Node. Puppeteer will be familiar to people using other browser testing frameworks. You create an instance -<<<<<<< HEAD of `Browser`, open pages, and then manipulate them with [Puppeteer's API](https://pptr.dev/api). -======= -of `Browser`, open pages, and then manipulate them with [Puppeteer's API](https://puppeteer.github.io/puppeteer/api). ->>>>>>> a6789de1 (feat: add documentation) **Example** - navigating to https://example.com and saving a screenshot as _example.png_: @@ -162,11 +136,7 @@ Execute script on the command line node example.js ``` -<<<<<<< HEAD Puppeteer sets an initial page size to 800×600px, which defines the screenshot size. The page size can be customized with [`Page.setViewport()`](https://pptr.dev/api/puppeteer.page.setviewport). -======= -Puppeteer sets an initial page size to 800×600px, which defines the screenshot size. The page size can be customized with [`Page.setViewport()`](https://puppeteer.github.io/puppeteer/api/puppeteer.page.setviewport). ->>>>>>> a6789de1 (feat: add documentation) **Example** - create a PDF. @@ -193,11 +163,7 @@ Execute script on the command line node hn.js ``` -<<<<<<< HEAD See [`Page.pdf`](https://pptr.dev/api/puppeteer.page.pdf) for more information about creating pdfs. -======= -See [`Page.pdf`](https://puppeteer.github.io/puppeteer/api/puppeteer.page.pdf) for more information about creating pdfs. ->>>>>>> a6789de1 (feat: add documentation) **Example** - evaluate script in the context of the page @@ -232,11 +198,7 @@ Execute script on the command line node get-dimensions.js ``` -<<<<<<< HEAD See [`Page.evaluate`](https://pptr.dev/api/puppeteer.page.evaluate) and related methods like [`Page.evaluateOnNewDocument`](https://pptr.dev/api/puppeteer.page.evaluateOnNewDocument) and [`Page.exposeFunction`](https://pptr.dev/api/puppeteer.page.exposeFunction). -======= -See [`Page.evaluate`](https://puppeteer.github.io/puppeteer/api/puppeteer.page.evaluate) and related methods like [`Page.evaluateOnNewDocument`](https://puppeteer.github.io/puppeteer/api/puppeteer.page.evaluateOnNewDocument) and [`Page.exposeFunction`](https://puppeteer.github.io/puppeteer/api/puppeteer.page.exposeFunction). ->>>>>>> a6789de1 (feat: add documentation) @@ -252,11 +214,7 @@ Extensions in Chrome / Chromium currently only work in non-headless mode and exp The following is code for getting a handle to the [background page](https://developer.chrome.com/extensions/background_pages) of an extension whose source is located in `./my-extension`: -<<<<<<< HEAD ```ts -======= -```js ->>>>>>> a6789de1 (feat: add documentation) const puppeteer = require('puppeteer'); (async () => { @@ -295,11 +253,7 @@ It is not yet possible to test extension popups or content scripts. **1. Uses Headless mode** -<<<<<<< HEAD Puppeteer launches Chromium in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). To launch a full version of Chromium, set the [`headless` option](https://pptr.dev/api/puppeteer.browserlaunchargumentoptions.headless) when launching a browser: -======= -Puppeteer launches Chromium in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). To launch a full version of Chromium, set the [`headless` option](https://puppeteer.github.io/puppeteer/api/puppeteer.browserlaunchargumentoptions.headless) when launching a browser: ->>>>>>> a6789de1 (feat: add documentation) ```ts const browser = await puppeteer.launch({headless: false}); // default is true @@ -315,11 +269,7 @@ pass in the executable's path when creating a `Browser` instance: const browser = await puppeteer.launch({executablePath: '/path/to/Chrome'}); ``` -<<<<<<< HEAD You can also use Puppeteer with Firefox Nightly (experimental support). See [`Puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) for more information. -======= -You can also use Puppeteer with Firefox Nightly (experimental support). See [`Puppeteer.launch`](https://puppeteer.github.io/puppeteer/api/puppeteer.puppeteernode.launch) for more information. ->>>>>>> a6789de1 (feat: add documentation) See [`this article`](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) for a description of the differences between Chromium and Chrome. [`This article`](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/chromium_browser_vs_google_chrome.md) describes some differences for Linux users. @@ -331,11 +281,7 @@ Puppeteer creates its own browser user profile which it **cleans up on every run ## Resources -<<<<<<< HEAD - [API Documentation](https://pptr.dev/api) -======= -- [API Documentation](https://puppeteer.github.io/puppeteer/api) ->>>>>>> a6789de1 (feat: add documentation) - [Examples](https://github.com/puppeteer/puppeteer/tree/main/examples) - [Community list of Puppeteer resources](https://github.com/transitive-bullshit/awesome-puppeteer) @@ -446,16 +392,8 @@ Puppeteer creates its own browser user profile which it **cleans up on every run ## Contributing -<<<<<<< HEAD Check out our [contributing guide](https://pptr.dev/contributing) to get an overview of Puppeteer development. ## FAQ Our [FAQ](https://pptr.dev/faq) has migrated to [our site](https://pptr.dev/faq). -======= -Check out our [contributing guide](https://puppeteer.github.io/puppeteer/contributing) to get an overview of Puppeteer development. - -## FAQ - -Our [FAQ](https://puppeteer.github.io/puppeteer/faq) has migrated to [our site](https://puppeteer.github.io/puppeteer/faq). ->>>>>>> a6789de1 (feat: add documentation) diff --git a/package-lock.json b/package-lock.json index e7e3c6f3be068..0c5d1af693be1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,14 +26,9 @@ "devDependencies": { "@commitlint/cli": "17.0.1", "@commitlint/config-conventional": "17.0.2", -<<<<<<< HEAD "@microsoft/api-documenter": "7.18.0", "@microsoft/api-extractor": "7.24.2", "@microsoft/api-extractor-model": "7.21.0", -======= - "@microsoft/api-documenter": "7.17.16", - "@microsoft/api-extractor": "7.24.2", ->>>>>>> a6789de1 (feat: add documentation) "@types/debug": "4.1.7", "@types/diff": "5.0.2", "@types/mime": "2.0.3", @@ -44,11 +39,7 @@ "@types/progress": "2.0.5", "@types/proxy-from-env": "1.0.1", "@types/rimraf": "3.0.2", -<<<<<<< HEAD "@types/semver": "7.3.10", -======= - "@types/semver": "^7.3.10", ->>>>>>> a6789de1 (feat: add documentation) "@types/sinon": "10.0.11", "@types/tar-fs": "2.0.1", "@types/unbzip2-stream": "1.4.0", @@ -75,6 +66,7 @@ "minimist": "1.2.6", "mocha": "10.0.0", "ncp": "2.0.0", + "npm-run-all": "4.1.5", "pixelmatch": "5.3.0", "pngjs": "6.0.0", "prettier": "2.6.2", @@ -582,7 +574,6 @@ } }, "node_modules/@microsoft/api-documenter": { -<<<<<<< HEAD "version": "7.18.0", "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.18.0.tgz", "integrity": "sha512-O2IlE1G6xpa5xoTw1fDflSJBrTT5zMkZj9nMNFXhIYpU5YgpCet+ugnC/cGTjH+0W2lu69asBWJZiMUZ7F1a4w==", @@ -592,17 +583,6 @@ "@microsoft/tsdoc": "0.14.1", "@rushstack/node-core-library": "3.49.0", "@rushstack/ts-command-line": "4.12.1", -======= - "version": "7.17.16", - "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.17.16.tgz", - "integrity": "sha512-7LwVCaaUowtTWnmoG3+vrNNjuDDV81xGut1oWkEjmDbNd7hPxti791Pc0f4x7lki7VQYYxzQUD2NyNJbZid0EQ==", - "dev": true, - "dependencies": { - "@microsoft/api-extractor-model": "7.17.3", - "@microsoft/tsdoc": "0.14.1", - "@rushstack/node-core-library": "3.45.5", - "@rushstack/ts-command-line": "4.11.0", ->>>>>>> a6789de1 (feat: add documentation) "colors": "~1.2.1", "js-yaml": "~3.13.1", "resolve": "~1.17.0" @@ -611,7 +591,6 @@ "api-documenter": "bin/api-documenter" } }, -<<<<<<< HEAD "node_modules/@microsoft/api-documenter/node_modules/@rushstack/node-core-library": { "version": "3.49.0", "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.49.0.tgz", @@ -677,17 +656,6 @@ "dev": true, "engines": { "node": ">= 4.0.0" -======= - "node_modules/@microsoft/api-documenter/node_modules/@microsoft/api-extractor-model": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.17.3.tgz", - "integrity": "sha512-ETslFxVEZTEK6mrOARxM34Ll2W/5H2aTk9Pe9dxsMCnthE8O/CaStV4WZAGsvvZKyjelSWgPVYGowxGVnwOMlQ==", - "dev": true, - "dependencies": { - "@microsoft/tsdoc": "0.14.1", - "@microsoft/tsdoc-config": "~0.16.1", - "@rushstack/node-core-library": "3.45.5" ->>>>>>> a6789de1 (feat: add documentation) } }, "node_modules/@microsoft/api-extractor": { @@ -713,7 +681,6 @@ "api-extractor": "bin/api-extractor" } }, -<<<<<<< HEAD "node_modules/@microsoft/api-extractor-model": { "version": "7.21.0", "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.21.0.tgz", @@ -780,8 +747,6 @@ "node": ">= 4.0.0" } }, -======= ->>>>>>> a6789de1 (feat: add documentation) "node_modules/@microsoft/api-extractor/node_modules/@microsoft/api-extractor-model": { "version": "7.17.3", "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.17.3.tgz", @@ -5194,6 +5159,12 @@ "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==", "dev": true }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -5316,6 +5287,34 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -5446,6 +5445,15 @@ "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", "dev": true }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/meow": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", @@ -5761,6 +5769,12 @@ "ncp": "bin/ncp" } }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "node_modules/nise": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", @@ -5845,6 +5859,213 @@ "node": ">=8" } }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm-run-all/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/npm-run-all/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/npm-run-all/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/npm-run-all/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/npm-run-all/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/npm-run-all/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/npm-run-all/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/npm-run-all/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -6127,6 +6348,27 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/pixelmatch": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-5.3.0.tgz", @@ -6865,6 +7107,12 @@ "node": ">=8" } }, + "node_modules/shell-quote": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", + "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", + "dev": true + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -7066,6 +7314,23 @@ "node": ">=8" } }, + "node_modules/string.prototype.padend": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz", + "integrity": "sha512-jNIIeokznm8SD/TZISQsZKYu7RJyheFNt84DUPrh482GC8RVp2MKqm2O5oBRdGxbDQoXrhhWtPIWQOiy20svUg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/string.prototype.repeat": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-0.2.0.tgz", @@ -8369,7 +8634,6 @@ } }, "@microsoft/api-documenter": { -<<<<<<< HEAD "version": "7.18.0", "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.18.0.tgz", "integrity": "sha512-O2IlE1G6xpa5xoTw1fDflSJBrTT5zMkZj9nMNFXhIYpU5YgpCet+ugnC/cGTjH+0W2lu69asBWJZiMUZ7F1a4w==", @@ -8379,23 +8643,11 @@ "@microsoft/tsdoc": "0.14.1", "@rushstack/node-core-library": "3.49.0", "@rushstack/ts-command-line": "4.12.1", -======= - "version": "7.17.16", - "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.17.16.tgz", - "integrity": "sha512-7LwVCaaUowtTWnmoG3+vrNNjuDDV81xGut1oWkEjmDbNd7hPxti791Pc0f4x7lki7VQYYxzQUD2NyNJbZid0EQ==", - "dev": true, - "requires": { - "@microsoft/api-extractor-model": "7.17.3", - "@microsoft/tsdoc": "0.14.1", - "@rushstack/node-core-library": "3.45.5", - "@rushstack/ts-command-line": "4.11.0", ->>>>>>> a6789de1 (feat: add documentation) "colors": "~1.2.1", "js-yaml": "~3.13.1", "resolve": "~1.17.0" }, "dependencies": { -<<<<<<< HEAD "@rushstack/node-core-library": { "version": "3.49.0", "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.49.0.tgz", @@ -8456,18 +8708,6 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true -======= - "@microsoft/api-extractor-model": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.17.3.tgz", - "integrity": "sha512-ETslFxVEZTEK6mrOARxM34Ll2W/5H2aTk9Pe9dxsMCnthE8O/CaStV4WZAGsvvZKyjelSWgPVYGowxGVnwOMlQ==", - "dev": true, - "requires": { - "@microsoft/tsdoc": "0.14.1", - "@microsoft/tsdoc-config": "~0.16.1", - "@rushstack/node-core-library": "3.45.5" - } ->>>>>>> a6789de1 (feat: add documentation) } } }, @@ -8510,7 +8750,6 @@ } } }, -<<<<<<< HEAD "@microsoft/api-extractor-model": { "version": "7.21.0", "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.21.0.tgz", @@ -8573,8 +8812,6 @@ } } }, -======= ->>>>>>> a6789de1 (feat: add documentation) "@microsoft/tsdoc": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.1.tgz", @@ -11838,6 +12075,12 @@ "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==", "dev": true }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -11937,6 +12180,30 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + } + } + }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -12036,6 +12303,12 @@ "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", "dev": true }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true + }, "meow": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", @@ -12275,6 +12548,12 @@ "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==", "dev": true }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "nise": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", @@ -12341,6 +12620,168 @@ "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", "dev": true }, + "npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -12541,6 +12982,18 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, + "pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true + }, "pixelmatch": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-5.3.0.tgz", @@ -13070,6 +13523,12 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "shell-quote": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", + "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", + "dev": true + }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -13230,6 +13689,17 @@ "strip-ansi": "^6.0.1" } }, + "string.prototype.padend": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz", + "integrity": "sha512-jNIIeokznm8SD/TZISQsZKYu7RJyheFNt84DUPrh482GC8RVp2MKqm2O5oBRdGxbDQoXrhhWtPIWQOiy20svUg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, "string.prototype.repeat": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-0.2.0.tgz", diff --git a/package.json b/package.json index 5e6aed8074a19..36263a8013b9c 100644 --- a/package.json +++ b/package.json @@ -27,35 +27,37 @@ "node": ">=14.1.0" }, "scripts": { - "test": "npm run lint --silent && npm run test:unit:coverage", - "test:unit": "npm run build:test && mocha", - "test:unit:firefox": "cross-env PUPPETEER_PRODUCT=firefox npm run test:unit", - "test:unit:coverage": "c8 --check-coverage --lines 94 npm run test:unit", - "test:unit:chrome-headless": "cross-env HEADLESS=chrome npm run test:unit", - "test:protocol-revision": "ts-node -s scripts/ensure-correct-devtools-protocol-package", - "test:pinned-deps": "ts-node -s scripts/ensure-pinned-deps", - "test:install": "scripts/test-install.sh", - "test:debug": "npm run build:test && mocha --inspect-brk", + "test": "c8 --check-coverage --lines 94 run-s test:chrome test:chrome:* test:firefox", "test:types": "tsc -b test-d", + "test:install": "scripts/test-install.sh", + "test:firefox": "cross-env PUPPETEER_PRODUCT=firefox MOZ_WEBRENDER=0 mocha", + "test:chrome": "mocha", + "test:chrome:headless": "cross-env HEADLESS=chrome mocha", + "test:chrome:headful": "cross-env HEADLESS=false mocha", "prepublishOnly": "npm run build", - "prepare": "node typescript-if-required.js && ([[ $HUSKY = 0 ]] || husky install)", - "lint": "npm run build && npm run lint:eslint && npm run lint:prettier", + "prepare": "node typescript-if-required.js && husky install", + "lint": "run-s lint:prettier lint:eslint", "lint:prettier": "prettier --check .", "lint:eslint": "([ \"$CI\" = true ] && eslint --ext js --ext ts --quiet -f codeframe . || eslint --ext js --ext ts .)", - "lint:eslint:fix": "eslint --ext js --ext ts --fix .", "install": "node install.js", "generate:types": "node utils/export_all.js && api-extractor run --local --verbose", - "generate:esm-package-json": "echo '{\"type\": \"module\"}' > lib/esm/package.json", "generate:markdown": "ts-node -O '{\"module\":\"commonjs\"}' utils/generate_docs.ts && prettier --ignore-path none --write docs", - "docs": "npm run build && npm run generate:markdown", - "format": "prettier --write .", + "generate:esm-package-json": "echo '{\"type\": \"module\"}' > lib/esm/package.json", + "format": "run-s format:*", + "format:prettier": "prettier --write .", + "format:eslint": "eslint --ext js --ext ts --fix ..", + "docs": "run-s build generate:markdown", + "debug": "npm run build:test && mocha --inspect-brk", "commitlint": "commitlint --from=HEAD~1", - "clean:lib": "rimraf lib", - "build": "npm run build:tsc && npm run generate:types && npm run generate:esm-package-json", - "build:test": "tsc -b test", - "build:tsc": "npm run clean:lib && tsc --version && (npm run build:tsc:cjs && npm run build:tsc:esm)", + "clean": "rimraf lib", + "check": "run-p check:*", + "check:protocol-revision": "ts-node -s scripts/ensure-correct-devtools-protocol-package", + "check:pinned-deps": "ts-node -s scripts/ensure-pinned-deps", + "build": "run-s build:tsc generate:types generate:esm-package-json", + "build:tsc": "tsc --version && run-p build:tsc:*", "build:tsc:esm": "tsc -b src/tsconfig.esm.json", - "build:tsc:cjs": "tsc -b src/tsconfig.cjs.json" + "build:tsc:cjs": "tsc -b src/tsconfig.cjs.json", + "build:test": "tsc -b test" }, "files": [ "lib", @@ -121,6 +123,7 @@ "minimist": "1.2.6", "mocha": "10.0.0", "ncp": "2.0.0", + "npm-run-all": "4.1.5", "pixelmatch": "5.3.0", "pngjs": "6.0.0", "prettier": "2.6.2",