mirror of
https://github.com/documenso/documenso.git
synced 2026-07-14 23:07:13 +10:00
build: migrate from npm to pnpm with workspace catalogs
- Switch package manager to pnpm 10 via corepack - Add pnpm-workspace.yaml with 54+ shared dependency catalogs - Convert all workspace packages to catalog: and workspace:* protocols - Upgrade Turborepo from 1.x to 2.8.12 (pipeline -> tasks) - Upgrade apps/openpage-api from Next 15 to Next 16 - Update Docker, CI workflows, and GitHub Actions for pnpm - Convert patch file to pnpm native format - Replace deprecated next lint with standalone eslint - Update all documentation references from npm to pnpm - Fix stale dependabot config and documentation paths
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: 'Setup node and cache node_modules'
|
||||
name: 'Setup node and install dependencies with pnpm'
|
||||
inputs:
|
||||
node_version:
|
||||
required: false
|
||||
@@ -7,33 +7,19 @@ inputs:
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Set up Node ${{ inputs.node_version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node_version }}
|
||||
|
||||
- name: Cache npm
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: npm-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: npm-
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v3
|
||||
id: cache-node-modules
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
packages/*/node_modules
|
||||
apps/*/node_modules
|
||||
key: modules-${{ hashFiles('package-lock.json') }}
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci --no-audit
|
||||
npm run prisma:generate
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm run prisma:generate
|
||||
env:
|
||||
HUSKY: '0'
|
||||
|
||||
@@ -10,10 +10,10 @@ runs:
|
||||
path: |
|
||||
~/.cache/ms-playwright
|
||||
${{ github.workspace }}/node_modules/playwright
|
||||
key: playwright-${{ hashFiles('**/package-lock.json') }}
|
||||
key: playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: playwright-
|
||||
|
||||
- name: Install playwright
|
||||
if: steps.cache-playwright.outputs.cache-hit != 'true'
|
||||
run: npx playwright install --with-deps
|
||||
run: pnpm exec playwright install --with-deps
|
||||
shell: bash
|
||||
|
||||
@@ -12,11 +12,10 @@ updates:
|
||||
open-pull-requests-limit: 0
|
||||
|
||||
- package-ecosystem: 'npm'
|
||||
directory: '/apps/web'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: 'weekly'
|
||||
target-branch: 'main'
|
||||
labels:
|
||||
- 'npm dependencies'
|
||||
- 'frontend'
|
||||
- 'dependencies'
|
||||
open-pull-requests-limit: 0
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
run: cp .env.example .env
|
||||
|
||||
- name: Build app
|
||||
run: npm run build
|
||||
run: pnpm run build
|
||||
|
||||
build_docker:
|
||||
name: Build Docker Image
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
- uses: ./.github/actions/node-install
|
||||
|
||||
- name: Build app
|
||||
run: npm run build
|
||||
run: pnpm run build
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
|
||||
@@ -23,21 +23,21 @@ jobs:
|
||||
- uses: ./.github/actions/node-install
|
||||
|
||||
- name: Start Services
|
||||
run: npm run dx:up
|
||||
run: pnpm run dx:up
|
||||
|
||||
- uses: ./.github/actions/playwright-install
|
||||
|
||||
- name: Create the database
|
||||
run: npm run prisma:migrate-dev
|
||||
run: pnpm run prisma:migrate-dev
|
||||
|
||||
- name: Seed the database
|
||||
run: npm run prisma:seed
|
||||
run: pnpm run prisma:seed
|
||||
|
||||
- name: Install playwright browsers
|
||||
run: npx playwright install --with-deps
|
||||
run: pnpm exec playwright install --with-deps
|
||||
|
||||
- name: Run Playwright tests
|
||||
run: npm run ci
|
||||
run: pnpm run ci
|
||||
env:
|
||||
# Needed since we use next start which will set the NODE_ENV to production
|
||||
NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH: './example/cert.p12'
|
||||
|
||||
@@ -20,8 +20,6 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: npm
|
||||
|
||||
- name: Install Octokit
|
||||
run: npm install @octokit/rest@18
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: npm
|
||||
|
||||
- name: Install Octokit
|
||||
run: npm install @octokit/rest@18
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
- name: Compile translations
|
||||
id: compile_translations
|
||||
run: npm run translate:compile -- -- --strict
|
||||
run: pnpm run translate:compile -- -- --strict
|
||||
continue-on-error: true
|
||||
|
||||
- name: Pull translations from Crowdin
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
- uses: ./.github/actions/node-install
|
||||
|
||||
- name: Extract translations
|
||||
run: npm run translate:extract
|
||||
run: pnpm run translate:extract
|
||||
|
||||
- name: Commit changes and push to reserved branch
|
||||
env:
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
|
||||
- name: Compile translations
|
||||
id: compile_translations
|
||||
run: npm run translate:compile -- -- --strict
|
||||
run: pnpm run translate:compile -- -- --strict
|
||||
continue-on-error: true
|
||||
|
||||
- name: Upload missing translations
|
||||
|
||||
Reference in New Issue
Block a user