From 742b33ef3d721600e6473639ea8baa01d1deb529 Mon Sep 17 00:00:00 2001 From: Arjo Bruijnes Date: Wed, 20 Aug 2025 17:11:42 +0200 Subject: [PATCH 1/5] Add missing dependencies for release tooling --- packages/release-tools/package.json | 2 ++ pnpm-lock.yaml | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/release-tools/package.json b/packages/release-tools/package.json index b4a6b731..17997174 100644 --- a/packages/release-tools/package.json +++ b/packages/release-tools/package.json @@ -12,7 +12,9 @@ }, "devDependencies": { "@types/node": "^16.11.19", + "@types/node-fetch": "2.6.1", "@typescript-eslint/eslint-plugin": "^5.40.1", + "@typescript-eslint/parser": "^5.62.0", "eslint": "^8.25.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a6ed36bb..9c10bf49 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -118,7 +118,7 @@ importers: version: 8.10.0(eslint@7.32.0) eslint-plugin-jest: specifier: ^27.1.3 - version: 27.9.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(jest@29.7.0)(typescript@5.8.3) + version: 27.9.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(jest@29.7.0(@types/node@16.18.126)(ts-node@10.9.2(@types/node@16.18.126)(typescript@5.8.3)))(typescript@5.8.3) eslint-plugin-prettier: specifier: ^3.3.1 version: 3.4.1(eslint-config-prettier@8.10.0(eslint@7.32.0))(eslint@7.32.0)(prettier@2.8.8) @@ -427,9 +427,15 @@ importers: '@types/node': specifier: ^16.11.19 version: 16.18.126 + '@types/node-fetch': + specifier: 2.6.1 + version: 2.6.1 '@typescript-eslint/eslint-plugin': specifier: ^5.40.1 version: 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/parser': + specifier: ^5.62.0 + version: 5.62.0(eslint@8.57.1)(typescript@4.9.5) eslint: specifier: ^8.25.0 version: 8.57.1 @@ -1986,9 +1992,6 @@ packages: '@types/node@16.18.126': resolution: {integrity: sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==} - '@types/node@18.11.2': - resolution: {integrity: sha512-BWN3M23gLO2jVG8g/XHIRFWiiV4/GckeFIqbU/C4V3xpoBBWSMk4OZomouN0wCkfQFPqgZikyLr7DOYDysIkkw==} - '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -4725,12 +4728,14 @@ packages: metro-react-native-babel-preset@0.74.1: resolution: {integrity: sha512-DjsG9nqm5C7cjB2SlgbcNJOn9y5MBUd3bRlCfnoj8CxAeGTGkS+yXd183lHR3C1bhmQNjuUE0abzzpE1CFh6JQ==} + deprecated: Use @react-native/babel-preset instead peerDependencies: '@babel/core': '*' metro-react-native-babel-preset@0.76.9: resolution: {integrity: sha512-eCBtW/UkJPDr6HlMgFEGF+964DZsUEF9RGeJdZLKWE7d/0nY3ABZ9ZAGxzu9efQ35EWRox5bDMXUGaOwUe5ikQ==} engines: {node: '>=16'} + deprecated: Use @react-native/babel-preset instead peerDependencies: '@babel/core': '*' @@ -9090,8 +9095,6 @@ snapshots: '@types/node@16.18.126': {} - '@types/node@18.11.2': {} - '@types/normalize-package-data@2.4.4': {} '@types/pixelmatch@5.2.6': @@ -9146,7 +9149,7 @@ snapshots: '@types/vinyl@2.0.12': dependencies: '@types/expect': 1.20.4 - '@types/node': 18.11.2 + '@types/node': 16.18.126 '@types/xml2js@0.4.14': dependencies: @@ -10760,7 +10763,7 @@ snapshots: - supports-color - typescript - eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(jest@29.7.0)(typescript@5.8.3): + eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(jest@29.7.0(@types/node@16.18.126)(ts-node@10.9.2(@types/node@16.18.126)(typescript@5.8.3)))(typescript@5.8.3): dependencies: '@typescript-eslint/utils': 5.62.0(eslint@7.32.0)(typescript@5.8.3) eslint: 7.32.0 From 0119ff91f48788cf603288183140ec0bee026ab5 Mon Sep 17 00:00:00 2001 From: Arjo Bruijnes Date: Thu, 21 Aug 2025 09:17:23 +0200 Subject: [PATCH 2/5] Remove redundant cache step --- .github/workflows/TestPWTCommands.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/TestPWTCommands.yml b/.github/workflows/TestPWTCommands.yml index a4b2b868..8c147498 100644 --- a/.github/workflows/TestPWTCommands.yml +++ b/.github/workflows/TestPWTCommands.yml @@ -34,14 +34,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: "Defining cache" - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 - env: - cache-name: cache-node-modules - with: - path: ~/.pnpm-store - key: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - - name: Setup pnpm uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0 if: matrix.node == 16 From ce0d6d8356ff6c74efe9135aa4d824bb92a1825e Mon Sep 17 00:00:00 2001 From: Arjo Bruijnes Date: Thu, 21 Aug 2025 12:06:42 +0200 Subject: [PATCH 3/5] Move path filter to workflow level --- .github/workflows/TestPWTCommands.yml | 34 ++++++++++++--------------- .github/workflows/UnitTests.yml | 28 +++++----------------- 2 files changed, 21 insertions(+), 41 deletions(-) diff --git a/.github/workflows/TestPWTCommands.yml b/.github/workflows/TestPWTCommands.yml index 8c147498..eef54449 100644 --- a/.github/workflows/TestPWTCommands.yml +++ b/.github/workflows/TestPWTCommands.yml @@ -2,9 +2,21 @@ name: Script tests on: push: - branches: [master] + branches: + - master + paths: + - 'pnpm-lock.yaml' + - 'packages/generator-widget/**' + - 'packages/pluggable-widgets-tools/**' + - 'packages/command-tests/**' pull_request: - branches: [master] + branches: + - master + paths: + - 'pnpm-lock.yaml' + - 'packages/generator-widget/**' + - 'packages/pluggable-widgets-tools/**' + - 'packages/command-tests/**' jobs: test: @@ -20,20 +32,6 @@ jobs: with: submodules: false - - name: "Checking changed files" - id: filter - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - if: github.event_name == 'pull_request' - with: - filters: | - packages: - - 'packages/generator-widget/*' - - 'packages/pluggable-widgets-tools/*' - tests: - - 'packages/command-tests/*' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Setup pnpm uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0 if: matrix.node == 16 @@ -52,14 +50,12 @@ jobs: cache: 'pnpm' - name: "Installing dependencies" - if: steps.filter.outputs.packages == 'true' || steps.filter.outputs.tests == 'true' run: pnpm install - name: Increase number of watchers - if: (steps.filter.outputs.packages == 'true' || steps.filter.outputs.tests == 'true') && startsWith(matrix.os, 'ubuntu') + if: startsWith(matrix.os, 'ubuntu') run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p - name: "Testing PWT commands" working-directory: ./packages/command-tests - if: steps.filter.outputs.packages == 'true' || steps.filter.outputs.tests == 'true' run: pnpm test diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index c478ad06..944f5db2 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -3,8 +3,14 @@ name: Run unit tests on: push: branches: [master] + paths: + - 'pnpm-lock.yaml' + - 'packages/**' pull_request: branches: [master] + paths: + - 'pnpm-lock.yaml' + - 'packages/**' jobs: test: @@ -17,25 +23,6 @@ jobs: with: submodules: false - - name: "Checking changed files" - id: filter - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - if: github.event_name == 'pull_request' - with: - filters: | - packages: - - 'packages/**/*' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: "Defining cache" - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 - env: - cache-name: cache-node-modules - with: - path: ~/.pnpm-store - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - - name: Setup pnpm uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0 with: @@ -48,14 +35,11 @@ jobs: cache: 'pnpm' - name: "Installing dependencies" - if: steps.filter.outputs.packages == 'true' run: pnpm install - name: "Running unit tests" - if: steps.filter.outputs.packages == 'true' run: pnpm -r test - name: "Linting generator-widget" working-directory: ./packages/generator-widget - if: steps.filter.outputs.packages == 'true' run: pnpm run lint From e4c10044e7706f2cbd23c00ac1c9a00fd36d4405 Mon Sep 17 00:00:00 2001 From: Arjo Bruijnes Date: Thu, 21 Aug 2025 12:21:12 +0200 Subject: [PATCH 4/5] Lint any package with a lint script --- .github/workflows/UnitTests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 944f5db2..be3994cc 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -40,6 +40,6 @@ jobs: - name: "Running unit tests" run: pnpm -r test - - name: "Linting generator-widget" + - name: "Linting packages" working-directory: ./packages/generator-widget - run: pnpm run lint + run: pnpm -r lint From d0d33fdf07ce389758b3fd5666821ae6100f35a1 Mon Sep 17 00:00:00 2001 From: Arjo Bruijnes Date: Thu, 21 Aug 2025 12:22:40 +0200 Subject: [PATCH 5/5] Avoid running command tests with other unit tests --- .github/workflows/TestPWTCommands.yml | 2 +- packages/command-tests/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TestPWTCommands.yml b/.github/workflows/TestPWTCommands.yml index eef54449..4e01e749 100644 --- a/.github/workflows/TestPWTCommands.yml +++ b/.github/workflows/TestPWTCommands.yml @@ -58,4 +58,4 @@ jobs: - name: "Testing PWT commands" working-directory: ./packages/command-tests - run: pnpm test + run: pnpm start diff --git a/packages/command-tests/package.json b/packages/command-tests/package.json index deea8073..ecdedb4e 100644 --- a/packages/command-tests/package.json +++ b/packages/command-tests/package.json @@ -5,7 +5,7 @@ "private": true, "main": "commands.js", "scripts": { - "test": "node commands.js" + "start": "node commands.js" }, "devDependencies": { "@prettier/plugin-xml": "^2.2.0",