From 67d6e8902125dbf28c08233e0e73c5a9ade36a7f Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:01:27 +0100 Subject: [PATCH] chore: small fixes (#11797) --- .github/workflows/ci.yml | 4 ++-- packages/browsers/package.json | 2 +- packages/ng-schematics/package.json | 2 +- packages/puppeteer-core/package.json | 2 +- packages/puppeteer/package.json | 2 +- packages/testserver/package.json | 2 +- test/installation/package.json | 2 +- test/package.json | 2 +- tools/{clean.js => clean.mjs} | 10 ++++++++-- tools/docgen/package.json | 2 +- tools/doctest/package.json | 2 +- tools/mocha-runner/package.json | 2 +- 12 files changed, 20 insertions(+), 14 deletions(-) rename tools/{clean.js => clean.mjs} (50%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8038d90f4ce..c4d4ce76973 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -357,7 +357,7 @@ jobs: path: puppeteer-test-installation-latest.tgz installation-test: - name: ${{ matrix.pkg_manager }} installation on ${{ matrix.os }} (${{ matrix.node }}) + name: ${{ matrix.pkg_manager }} installation on ${{ matrix.os }} needs: installation-test-build if: ${{ !startsWith(github.ref_name, 'release-please') }} runs-on: ${{ matrix.os }} @@ -387,7 +387,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 with: - node-version-file: ${{ needs.installation-test-build.node-version }} + node-version: ${{ needs.installation-test-build.outputs.node-version }} - name: Install dependencies run: ${{ matrix.pkg_manager }} install - name: Test diff --git a/packages/browsers/package.json b/packages/browsers/package.json index 45de79abb81..7527292da48 100644 --- a/packages/browsers/package.json +++ b/packages/browsers/package.json @@ -6,7 +6,7 @@ "build:docs": "wireit", "build": "wireit", "build:test": "wireit", - "clean": "../../tools/clean.js", + "clean": "../../tools/clean.mjs", "test": "wireit" }, "type": "commonjs", diff --git a/packages/ng-schematics/package.json b/packages/ng-schematics/package.json index 29db1dcdc9a..9b4fd84582c 100644 --- a/packages/ng-schematics/package.json +++ b/packages/ng-schematics/package.json @@ -4,7 +4,7 @@ "description": "Puppeteer Angular schematics", "scripts": { "build": "wireit", - "clean": "../../tools/clean.js", + "clean": "../../tools/clean.mjs", "dev:test": "npm run test --watch", "dev": "npm run build --watch", "unit": "wireit" diff --git a/packages/puppeteer-core/package.json b/packages/puppeteer-core/package.json index 2f1943bd2f9..3470a6f6fce 100644 --- a/packages/puppeteer-core/package.json +++ b/packages/puppeteer-core/package.json @@ -37,7 +37,7 @@ "build:docs": "wireit", "build": "wireit", "check": "tsx tools/ensure-correct-devtools-protocol-package", - "clean": "../../tools/clean.js", + "clean": "../../tools/clean.mjs", "prepack": "wireit", "unit": "wireit" }, diff --git a/packages/puppeteer/package.json b/packages/puppeteer/package.json index 0419e4b4599..16a9600355f 100644 --- a/packages/puppeteer/package.json +++ b/packages/puppeteer/package.json @@ -37,7 +37,7 @@ "scripts": { "build:docs": "wireit", "build": "wireit", - "clean": "../../tools/clean.js", + "clean": "../../tools/clean.mjs", "postinstall": "node install.mjs", "prepack": "wireit" }, diff --git a/packages/testserver/package.json b/packages/testserver/package.json index 3a9ecf9c653..a3a7ac71481 100644 --- a/packages/testserver/package.json +++ b/packages/testserver/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "scripts": { "build": "wireit", - "clean": "../../tools/clean.js" + "clean": "../../tools/clean.mjs" }, "wireit": { "build": { diff --git a/test/installation/package.json b/test/installation/package.json index f5e804d99c1..51aea65579c 100644 --- a/test/installation/package.json +++ b/test/installation/package.json @@ -5,7 +5,7 @@ "private": true, "scripts": { "build": "wireit", - "clean": "../../tools/clean.js", + "clean": "../../tools/clean.mjs", "test": "mocha" }, "wireit": { diff --git a/test/package.json b/test/package.json index 6470297572e..4096f661ad9 100644 --- a/test/package.json +++ b/test/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "build": "wireit", - "clean": "../tools/clean.js" + "clean": "../tools/clean.mjs" }, "wireit": { "build": { diff --git a/tools/clean.js b/tools/clean.mjs similarity index 50% rename from tools/clean.js rename to tools/clean.mjs index 049fdc0434b..aa4ba516b15 100755 --- a/tools/clean.js +++ b/tools/clean.mjs @@ -1,7 +1,13 @@ #!/usr/bin/env node -const {exec} = require('child_process'); -const {readdirSync} = require('fs'); +/** + * @license + * Copyright 2022 Google Inc. + * SPDX-License-Identifier: Apache-2.0 + */ + +import {exec} from 'child_process'; +import {readdirSync} from 'fs'; exec( `git clean -Xf ${readdirSync(process.cwd()) diff --git a/tools/docgen/package.json b/tools/docgen/package.json index f1ca4ea127a..5a10aa30793 100644 --- a/tools/docgen/package.json +++ b/tools/docgen/package.json @@ -8,7 +8,7 @@ "license": "Apache-2.0", "scripts": { "build": "wireit", - "clean": "../clean.js" + "clean": "../clean.mjs" }, "wireit": { "build": { diff --git a/tools/doctest/package.json b/tools/doctest/package.json index 8c7e9544d01..7ee5632f120 100644 --- a/tools/doctest/package.json +++ b/tools/doctest/package.json @@ -8,7 +8,7 @@ "license": "Apache-2.0", "scripts": { "build": "wireit", - "clean": "../clean.js" + "clean": "../clean.mjs" }, "wireit": { "build": { diff --git a/tools/mocha-runner/package.json b/tools/mocha-runner/package.json index 26612e504a9..a817020d5ea 100644 --- a/tools/mocha-runner/package.json +++ b/tools/mocha-runner/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "wireit", "test": "wireit", - "clean": "../clean.js" + "clean": "../clean.mjs" }, "wireit": { "build": {