chore(repo): migrate from yarn to pnpm (#1598)

This commit is contained in:
Alex
2026-06-05 08:32:57 +01:00
committed by GitHub
parent f6661fec0b
commit e83a143c36
28 changed files with 11649 additions and 14155 deletions
-2
View File
@@ -21,8 +21,6 @@ reviews:
- "!**/out/**"
- "!**/dist/**"
- "!**/node_modules/**"
- "!**/package-lock.json"
- "!**/yarn.lock"
- "!**/pnpm-lock.yaml"
- "!**/*.generated.ts"
- "!**/*.generated.java"
+7 -3
View File
@@ -1,13 +1,17 @@
.git
.github
.yarn
assets
deploy
docs
scratch
tools
node_modules
.pnpm-store
pnpm-debug.log
tools/*
!tools/release/
tools/release/*
!tools/release/package.json
frontend/.yarn
frontend/.angular
frontend/dist
frontend/node_modules
@@ -54,16 +54,13 @@ runs:
with:
tool: just
- name: Set Up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Set Up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: '24'
- name: Enable Corepack
shell: bash
run: |
corepack enable
corepack yarn --version
node-version-file: .nvmrc
- name: Install Release Tooling Dependencies
shell: bash
+8 -25
View File
@@ -19,9 +19,9 @@ updates:
patterns:
- "*"
# Frontend – npm (Angular)
# JavaScript – pnpm workspace (frontend + release tooling)
- package-ecosystem: "npm"
directory: "/frontend"
directory: "/"
schedule:
interval: "weekly"
day: "friday"
@@ -36,34 +36,17 @@ updates:
commit-message:
prefix: "chore(deps)"
groups:
npm-dependencies:
release-tooling:
patterns:
- "semantic-release"
- "@semantic-release/*"
- "conventional-changelog*"
frontend:
patterns:
- "*"
ignore:
- dependency-name: "typescript"
# Release tooling – npm (semantic-release)
- package-ecosystem: "npm"
directory: "/tools/release"
schedule:
interval: "weekly"
day: "friday"
time: "03:00"
timezone: "UTC"
cooldown:
default-days: 3
open-pull-requests-limit: 5
labels:
- "dependencies"
- "ci"
- "release"
commit-message:
prefix: "chore(deps)"
groups:
release-tooling:
patterns:
- "*"
# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
+8 -11
View File
@@ -28,29 +28,26 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Set Up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Set Up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: '24'
- name: Enable Corepack
run: |
corepack enable
corepack yarn --version
node-version-file: .nvmrc
- name: Install Frontend Dependencies
working-directory: ./frontend
run: corepack yarn install --immutable
run: pnpm install --frozen-lockfile
- name: Typecheck Frontend
working-directory: ./frontend
run: corepack yarn typecheck
run: pnpm run typecheck
- name: Run Frontend Build
working-directory: ./frontend
run: |
set +e
CI=1 NG_CLI_ANALYTICS=false corepack yarn build:prod 2>&1 | tee build-output.log
CI=1 NG_CLI_ANALYTICS=false pnpm run build:prod 2>&1 | tee build-output.log
BUILD_EXIT_CODE=${PIPESTATUS[0]}
set -e
@@ -77,7 +74,7 @@ jobs:
working-directory: ./frontend
run: |
# Lint output is written to JSON for threshold evaluation.
corepack yarn lint:eslint --format json --output-file lint-results.json || true
pnpm run lint:eslint --format json --output-file lint-results.json || true
- name: Count Lint Warnings
working-directory: ./frontend
+4 -6
View File
@@ -49,15 +49,13 @@ jobs:
with:
tool: just
- name: Set Up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Set Up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: '24'
- name: Enable Corepack
run: |
corepack enable
corepack yarn --version
node-version-file: .nvmrc
- name: Install Release Tooling Dependencies
run: just release install
+4 -6
View File
@@ -54,15 +54,13 @@ jobs:
with:
tool: just
- name: Set Up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Set Up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: '24'
- name: Enable Corepack
run: |
corepack enable
corepack yarn --version
node-version-file: .nvmrc
- name: Install Release Tooling Dependencies
run: just release install
+4 -6
View File
@@ -125,15 +125,13 @@ jobs:
with:
tool: just
- name: Set Up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Set Up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: '24'
- name: Enable Corepack
run: |
corepack enable
corepack yarn --version
node-version-file: .nvmrc
- name: Install Frontend Dependencies
run: just ui install-ci
+3 -5
View File
@@ -48,13 +48,11 @@ frontend/test-results/
frontend/output/
frontend/playwright-report/
frontend/.playwright-browsers/
frontend/node_modules/
node_modules/
backend/src/main/resources/application-local.yaml
/shared/
/scratch
/.yarn/
/frontend/.yarn/
/tools/release/node_modules
/tools/release/.yarn/
/pnpm-debug.log
/.pnpm-store/
.worktrees/
-5
View File
@@ -1,5 +0,0 @@
nodeLinker: node-modules
nmMode: hardlinks-local
enableGlobalCache: false
cacheFolder: .yarn/cache
npmMinimalAgeGate: 4320
+1 -1
View File
@@ -84,7 +84,7 @@ For full control over each component or IDE integration (debugging, hot-reload,
| Tool | Version | Download |
| ----------------------- | ------- | -------------------------------------------- |
| Java | 25+ | [Adoptium](https://adoptium.net/) |
| Node.js + Corepack/Yarn | 24+ | [nodejs.org](https://nodejs.org/) |
| Node.js + pnpm | 24+ | [nodejs.org](https://nodejs.org/) |
| MariaDB | 10.6+ | [mariadb.org](https://mariadb.org/download/) |
| Git | latest | [git-scm.com](https://git-scm.com/) |
+18 -10
View File
@@ -1,18 +1,26 @@
FROM --platform=$BUILDPLATFORM node:24-alpine AS frontend-build
WORKDIR /workspace/frontend
ENV PNPM_HOME="/pnpm"
ENV PATH="${PNPM_HOME}:${PATH}"
COPY .yarnrc.yml /workspace/.yarnrc.yml
COPY frontend/package.json frontend/yarn.lock ./
WORKDIR /workspace
RUN corepack enable
RUN --mount=type=cache,target=/workspace/.yarn/cache \
corepack yarn install --immutable
RUN npm install -g pnpm@11.3.0
COPY frontend/ ./
RUN --mount=type=cache,target=/workspace/.yarn/cache \
--mount=type=cache,target=/workspace/frontend/.angular/cache \
CI=1 NG_CLI_ANALYTICS=false corepack yarn build:prod
COPY pnpm-lock.yaml pnpm-workspace.yaml ./
RUN --mount=type=cache,target=/pnpm/store \
pnpm config set store-dir /pnpm/store && \
pnpm fetch
COPY package.json ./
COPY frontend/package.json ./frontend/
COPY tools/release/package.json ./tools/release/
RUN --mount=type=cache,target=/pnpm/store \
pnpm install --offline --frozen-lockfile
COPY frontend/ ./frontend/
RUN --mount=type=cache,target=/workspace/frontend/.angular/cache \
CI=1 NG_CLI_ANALYTICS=false pnpm -C frontend run build:prod
FROM --platform=$BUILDPLATFORM gradle:9.5.1-jdk25-alpine AS backend-build
+5 -5
View File
@@ -89,8 +89,8 @@ image-run tag=local_image_tag db_url=local_db_url db_user=local_db_user db_passw
# Show the resolved tool versions that the local commands expect to find.
doctor:
@echo "just: $$(just --version)"
@echo "java: $$(java -version 2>&1 | head -n 1)"
@echo "node: $$(node --version)"
@echo "yarn: $$(corepack yarn --version)"
@echo "docker: $$(docker --version)"
@echo "just: $(just --version)"
@echo "java: $(java -version 2>&1 | head -n 1)"
@echo "node: $(node --version)"
@echo "pnpm: $(pnpm --version)"
@echo "docker: $(docker --version)"
+10 -8
View File
@@ -37,19 +37,20 @@ services:
image: node:24-alpine
command: |-
sh -c "\
apk update && apk add --no-cache bash just;\
cd /angular-app &&\
corepack enable &&\
corepack yarn install --immutable &&\
corepack yarn ng serve --host 0.0.0.0 --watch --configuration development"
cd /workspace &&\
npm install -g pnpm@11.3.0 &&\
pnpm config set store-dir /workspace/node_modules/.pnpm-store &&\
pnpm install --frozen-lockfile &&\
pnpm -C frontend exec ng serve --host 0.0.0.0 --watch --configuration development"
environment:
- NODE_ENV=development
stdin_open: true
tty: true
restart: unless-stopped
volumes:
- './frontend:/angular-app'
- node_modules:/angular-app/node_modules
- '.:/workspace'
- frontend_workspace_node_modules:/workspace/node_modules
- frontend_node_modules:/workspace/frontend/node_modules
ports:
- "${FRONTEND_PORT:-4200}:4200"
backend_db:
@@ -70,7 +71,8 @@ services:
timeout: 5s
retries: 5
volumes:
node_modules:
frontend_workspace_node_modules:
frontend_node_modules:
backend_db:
backend_build:
backend_gradle_cache:
+1 -1
View File
@@ -9,7 +9,7 @@
# Node
/node_modules
npm-debug.log
yarn-error.log
pnpm-debug.log
# IDEs and editors
.idea/
-5
View File
@@ -1,5 +0,0 @@
nodeLinker: node-modules
nmMode: hardlinks-local
enableGlobalCache: false
cacheFolder: .yarn/cache
npmMinimalAgeGate: 4320
+22 -22
View File
@@ -1,6 +1,6 @@
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
yarn := "env YARN_ENABLE_GLOBAL_CACHE=0 YARN_CACHE_FOLDER=../.yarn/cache corepack yarn"
pnpm := "pnpm"
# Show the frontend recipes available in this directory.
help:
@@ -8,87 +8,87 @@ help:
# Install or update frontend dependencies for local development.
install:
{{ yarn }} install
{{ pnpm }} install
# Install the frontend dependencies exactly as CI does.
install-ci:
{{ yarn }} install --immutable
{{ pnpm }} install --frozen-lockfile
# Run the Angular development server.
dev:
{{ yarn }} dev
{{ pnpm }} run dev
# Run the Angular development server with the default `start` script.
start:
{{ yarn }} start
{{ pnpm }} run start
# Build the production frontend bundle.
build:
CI=1 NG_CLI_ANALYTICS=false {{ yarn }} build:prod
CI=1 NG_CLI_ANALYTICS=false {{ pnpm }} run build:prod
# Build the frontend continuously in development mode.
watch:
{{ yarn }} watch
{{ pnpm }} run watch
# Run the frontend test suite.
test:
{{ yarn }} test
{{ pnpm }} run test
# Run the frontend tests with a coverage report.
coverage:
{{ yarn }} coverage
{{ pnpm }} run coverage
# Summarize the latest frontend coverage report by global and feature buckets.
coverage-summary:
{{ yarn }} coverage:summary
{{ pnpm }} run coverage:summary
# Install the Chromium browser used by the frontend Playwright suite.
e2e-install:
{{ yarn }} e2e:install
{{ pnpm }} run e2e:install
# Run the frontend Playwright suite.
e2e:
{{ yarn }} e2e
{{ pnpm }} run e2e
# Run a single frontend Playwright spec file.
e2e-file spec:
{{ yarn }} e2e {{ spec }}
{{ pnpm }} run e2e {{ spec }}
# List the tests contained in a single frontend Playwright spec file.
e2e-list spec:
{{ yarn }} e2e {{ spec }} --list
{{ pnpm }} run e2e {{ spec }} --list
# Start the Angular dev server for Playwright against a fixed host and port.
e2e-dev host='127.0.0.1' port='4301':
{{ yarn }} ng serve --host {{ host }} --port {{ port }} --configuration development --watch=false
{{ pnpm }} exec ng serve --host {{ host }} --port {{ port }} --configuration development --watch=false
# Run the frontend linter.
lint:
{{ yarn }} lint:eslint
{{ pnpm }} run lint:eslint
# Run the frontend stylesheet linter.
stylelint:
{{ yarn }} lint:styles
{{ pnpm }} run lint:styles
# Run the frontend stylesheet linter with autofix enabled.
stylelint-fix:
{{ yarn }} lint:styles:fix
{{ pnpm }} run lint:styles:fix
# Run the frontend TypeScript typechecker without emitting build output.
typecheck:
{{ yarn }} typecheck
{{ pnpm }} run typecheck
# Check the installed dependency tree.
deps:
{{ yarn }} info -R --name-only
{{ pnpm }} list --depth Infinity
# Run a local dependency audit without forcing a CI-specific severity threshold.
audit:
{{ yarn }} npm audit
{{ pnpm }} audit
# Run the stricter dependency audit used in CI.
audit-ci:
{{ yarn }} npm audit --severity critical
{{ pnpm }} audit --audit-level critical
# Run the standard local frontend verification pass.
check: deps typecheck lint stylelint build test
+2 -11
View File
@@ -1,7 +1,6 @@
{
"name": "grimmory",
"version": "0.0.0",
"packageManager": "yarn@4.10.3",
"scripts": {
"ng": "ng",
"start": "ng serve",
@@ -15,10 +14,10 @@
"e2e": "playwright test",
"e2e:install": "playwright install chromium",
"typecheck": "tsc --noEmit -p tsconfig.app.json",
"lint": "yarn lint:eslint && yarn lint:styles",
"lint": "pnpm run lint:eslint && pnpm run lint:styles",
"lint:eslint": "ng lint",
"lint:styles": "stylelint \"src/**/*.scss\" \"src/*.scss\"",
"lint:styles:fix": "yarn lint:styles --fix"
"lint:styles:fix": "pnpm run lint:styles --fix"
},
"private": true,
"dependencies": {
@@ -85,13 +84,5 @@
"typescript-eslint": "^8.60.0",
"vitest": "^4.1.7",
"vitest-canvas-mock": "^1.1.4"
},
"overrides": {
"minimatch": "^10.2.1",
"ajv": "^8.18.0",
"eslint": {
"ajv": "^6.14.0"
},
"undici": "^7.24.1"
}
}
+1 -1
View File
@@ -34,4 +34,4 @@ PLAYWRIGHT_PORT=4301 just --justfile frontend/Justfile --working-directory front
- Do not add browser specs that depend on broad route shims copied from other
scenarios.
- Use the `frontend/Justfile` entrypoints for browser install, server startup,
and spec execution. Do not invoke Yarn directly from docs or ad hoc commands.
and spec execution. Do not invoke pnpm directly from docs or ad hoc commands.
@@ -1,6 +1,5 @@
import {ElementRef, Signal, computed, effect, signal} from '@angular/core';
import {injectVirtualizer} from '@tanstack/angular-virtual';
import {observeElementRect, type Rect, type VirtualItem} from '@tanstack/virtual-core';
import {injectVirtualizer, observeElementRect, type Rect, type VirtualItem} from '@tanstack/angular-virtual';
const DEFAULT_OVERSCAN_ROWS = 2;
const DEFAULT_ITEM_SIZE = 1;
-9914
View File
File diff suppressed because it is too large Load Diff
-14
View File
@@ -1,14 +0,0 @@
min_version = "2024.9.5"
[tools]
java = "temurin-25"
node = "24"
[settings]
experimental = true
[hooks]
postinstall = "npx corepack enable"
[env]
_.path = ["{{config_root}}/node_modules/.bin"]
+8
View File
@@ -0,0 +1,8 @@
{
"name": "grimmory-workspace",
"private": true,
"packageManager": "pnpm@11.3.0",
"engines": {
"node": ">=24"
}
}
+11519
View File
File diff suppressed because it is too large Load Diff
+14
View File
@@ -0,0 +1,14 @@
packages:
- frontend
- tools/release
minimumReleaseAge: 4320
blockExoticSubdeps: true
strictDepBuilds: true
nodeLinker: isolated
allowBuilds:
"@parcel/watcher": true
esbuild: true
lmdb: true
msgpackr-extract: true
+5 -6
View File
@@ -1,7 +1,6 @@
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
# Use Corepack to ensure the pinned modern Yarn version is installed.
yarn := "env YARN_ENABLE_GLOBAL_CACHE=0 YARN_CACHE_FOLDER=../../.yarn/cache corepack yarn"
pnpm := "pnpm"
# Show the release-tooling recipes available in this directory.
help:
@@ -9,16 +8,16 @@ help:
# Install the pinned semantic-release tooling used by local and CI release tasks.
install:
{{ yarn }} install --immutable
{{ pnpm }} install --frozen-lockfile
# Preview the next semantic-release result for the current checkout.
preview:
{{ yarn }} release:dry-run
{{ pnpm }} run release:dry-run
# Generate release notes for an explicit commit range.
range-notes:
{{ yarn }} release:range-notes
{{ pnpm }} run release:range-notes
# Run semantic-release for the current checkout.
run:
{{ yarn }} release
{{ pnpm }} run release
-1
View File
@@ -2,7 +2,6 @@
"name": "grimmory-release-tooling",
"private": true,
"description": "Release automation tooling for Grimmory",
"packageManager": "yarn@4.10.3",
"engines": {
"node": ">=24"
},
File diff suppressed because it is too large Load Diff