diff --git a/.github/workflows/code-coverage.yaml b/.github/workflows/code-coverage.yaml index ccf05ad..85b2f63 100644 --- a/.github/workflows/code-coverage.yaml +++ b/.github/workflows/code-coverage.yaml @@ -21,24 +21,31 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v6 + - name: Use Node.js uses: actions/setup-node@v4 with: node-version: 24 + cache: 'pnpm' + + - name: Enable Corepack + run: corepack enable - name: Install Dependencies - run: npm install pnpm -g && pnpm install + run: pnpm install - - name: Build + - name: Build run: pnpm build - - name: Testing + - name: Testing run: pnpm test:ci - + - name: Code Coverage uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} slug: Hyphen/nodejs-toggle-sdk files: ./coverage/lcov.info - diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d9860b9..c96c1f0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,7 +6,7 @@ on: types: [released] permissions: - contents: read + contents: read env: HYPHEN_PUBLIC_API_KEY: ${{ secrets.HYPHEN_PUBLIC_API_KEY }} @@ -19,18 +19,26 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v6 + - name: Use Node.js uses: actions/setup-node@v4 with: node-version: 24 + cache: 'pnpm' + + - name: Enable Corepack + run: corepack enable - name: Install Dependencies - run: npm install pnpm -g && pnpm install + run: pnpm install - - name: Build + - name: Build run: pnpm build - - name: Testing + - name: Testing run: pnpm test:ci - name: Publish @@ -39,4 +47,3 @@ jobs: npm publish --ignore-scripts --access public env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 199059e..66d1d72 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -21,21 +21,28 @@ jobs: strategy: matrix: - node-version: ['22', '24'] + node-version: ['22', '24', '26'] steps: - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v6 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + cache: 'pnpm' + + - name: Enable Corepack + run: corepack enable - name: Install Dependencies - run: npm install pnpm -g && pnpm install + run: pnpm install - - name: Build + - name: Build run: pnpm build - - name: Testing + - name: Testing run: pnpm test:ci - diff --git a/package.json b/package.json index cef6e3d..fd18078 100644 --- a/package.json +++ b/package.json @@ -54,5 +54,6 @@ ], "dependencies": { "hookified": "^2.1.1" - } + }, + "packageManager": "pnpm@11.8.0+sha512.c1f5e7c4cb241c8f174b743851d82f42b802324afc8b0f116b96adb15aa06664948dde36960a3ba1079ba5b4b29dd0140135b94b5b5f5263592249d68e555f26" } diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index f2ca300..0a47867 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,5 @@ +allowBuilds: + '@swc/core': true + esbuild: true + unrs-resolver: true minimumReleaseAge: 2880 -onlyBuiltDependencies: - - '@swc/core' - - esbuild - - unrs-resolver