From 4022fbe8fe5a74bb03cd1641e6daf5bdef0564bf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 19:42:03 +0000 Subject: [PATCH 1/2] Initial plan From df78dc83509085c8aa0c9a4231b6f4b7adb5bbcc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 19:46:11 +0000 Subject: [PATCH 2/2] fix: migrate CI/CD workflow from npm to pnpm to fix ENOLOCK security audit failure - Add pnpm/action-setup@v4 (version 9) to all three jobs - Switch cache from npm to pnpm in setup-node steps - Replace npm ci with pnpm install --frozen-lockfile - Replace npm audit with pnpm audit (reads pnpm-lock.yaml) - Replace npx depcheck with pnpm dlx depcheck - Replace npm run with pnpm run throughout - Replace npm publish with pnpm publish --no-git-checks Agent-Logs-Url: https://github.com/SuperDappAI/superdapp-js/sessions/23c32495-4336-4b8e-a923-6d0fa9e21667 Co-authored-by: vieiraricardo <7399872+vieiraricardo@users.noreply.github.com> --- .github/workflows/ci-cd.yml | 45 ++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 38eb74c..22d0455 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -19,23 +19,28 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: 'npm' + cache: 'pnpm' - name: Install dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Run linter - run: npm run lint + run: pnpm run lint - name: Run tests - run: npm test + run: pnpm test - name: Build project - run: npm run build + run: pnpm run build - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 @@ -46,11 +51,25 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Use Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: 20.x + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Run security audit - run: npm audit --audit-level moderate + run: pnpm audit --audit-level moderate - name: Check dependencies - run: npx depcheck --config=.depcheckrc + run: pnpm dlx depcheck --config=.depcheckrc publish: needs: [test, security] @@ -60,17 +79,23 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Use Node.js 20.x uses: actions/setup-node@v4 with: node-version: 20.x registry-url: 'https://registry.npmjs.org' + cache: 'pnpm' - name: Install dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Build project - run: npm run build + run: pnpm run build - name: Validate version run: | @@ -83,6 +108,6 @@ jobs: echo "Version validated!" - name: Publish to NPM - run: npm publish + run: pnpm publish --no-git-checks env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}