Skip to content

chore(deps): update dependency husky to v9 #10427

chore(deps): update dependency husky to v9

chore(deps): update dependency husky to v9 #10427

Workflow file for this run

name: ci
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
required: true
default: 'beta'
type: choice
options: [beta, graduate]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
if: github.event_name == 'workflow_dispatch' || (!contains(github.event.head_commit.message, 'ci(release)'))
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.discover.outputs.matrix }}
has_tests: ${{ steps.discover.outputs.has_tests }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch origin master:master || true
- uses: actions/setup-node@v4
with:
node-version: 20.19.0
- run: corepack enable
- uses: actions/cache@v5
id: deps-cache
with:
path: |
node_modules
.yarn
~/.cache/Cypress
~/.cache/puppeteer
key: deps-${{ runner.os }}-node20-${{ hashFiles('yarn.lock') }}
restore-keys: deps-${{ runner.os }}-node20-
- uses: actions/cache@v5
if: steps.deps-cache.outputs.cache-hit != 'true'
with:
path: ~/.cache
key: yarn-dl-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
restore-keys: yarn-dl-${{ runner.os }}-
- run: yarn --immutable
# Ensure Puppeteer Chrome binary is downloaded (needed for Karma tests in integration jobs)
# Puppeteer downloads Chrome on first use, so we trigger it here to include it in cache
- run: |
for app in examples/custom-webpack/*/; do
if [ -f "$app/package.json" ] && grep -q "puppeteer" "$app/package.json"; then
(cd "$app" && node -e "try { require('puppeteer').executablePath(); } catch(e) {}" || true)
fi
done
- run: yarn build:packages
- id: discover
run: |
MATRIX=$(node scripts/discover-tests.js)
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
TEST_COUNT=$(echo "$MATRIX" | jq '.include | length')
if [ "$TEST_COUNT" -gt 0 ]; then
echo "has_tests=true" >> $GITHUB_OUTPUT
else
echo "has_tests=false" >> $GITHUB_OUTPUT
fi
echo "Test count: $TEST_COUNT"
- uses: actions/upload-artifact@v4
with:
name: dist
path: packages/*/dist
integration:
needs: build
if: needs.build.outputs.has_tests == 'true'
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.19.0
- run: corepack enable
- uses: actions/cache/restore@v5
with:
path: |
node_modules
.yarn
~/.cache/Cypress
~/.cache/puppeteer
key: deps-${{ runner.os }}-node20-${{ hashFiles('yarn.lock') }}
fail-on-cache-miss: true
- uses: actions/download-artifact@v4
with:
name: dist
path: packages
- run: sudo apt-get update && sudo apt-get install -y xvfb
- name: ${{ matrix.purpose }}
run: |
Xvfb :99 &
export DISPLAY=:99
cd ${{ matrix.app }}
${{ matrix.command }}
publish:
needs: integration
if: |
always() &&
(needs.integration.result == 'success' || needs.integration.result == 'skipped') &&
(github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PERSONAL_TOKEN }}
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20.19.0
registry-url: 'https://registry.npmjs.org'
- run: corepack enable
- uses: actions/cache/restore@v5
with:
path: |
node_modules
.yarn
~/.cache/Cypress
~/.cache/puppeteer
key: deps-${{ runner.os }}-node20-${{ hashFiles('yarn.lock') }}
fail-on-cache-miss: true
- uses: actions/download-artifact@v4
with:
name: dist
path: packages
# Update npm for trusted publishing (OIDC) support
# npm 11.5.1+ required for full trusted publishing features
# Node 20.19.0 bundles npm 10.8.2, which is sufficient for basic provenance
# but insufficient for trusted publishing (OIDC) which lerna-lite uses
- run: npm install -g npm@latest
- name: Publish
run: |
git config --global user.name ${{ secrets.GIT_USER }}
git config --global user.email ${{ secrets.GIT_EMAIL }}
if [ "${{ github.event.inputs.release_type }}" == "graduate" ]; then
npm run graduate -- --yes
else
bash scripts/default-registry.sh
fi