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/**" - "!**/out/**"
- "!**/dist/**" - "!**/dist/**"
- "!**/node_modules/**" - "!**/node_modules/**"
- "!**/package-lock.json"
- "!**/yarn.lock"
- "!**/pnpm-lock.yaml" - "!**/pnpm-lock.yaml"
- "!**/*.generated.ts" - "!**/*.generated.ts"
- "!**/*.generated.java" - "!**/*.generated.java"
+7 -3
View File
@@ -1,13 +1,17 @@
.git .git
.github .github
.yarn
assets assets
deploy deploy
docs docs
scratch scratch
tools node_modules
.pnpm-store
pnpm-debug.log
tools/*
!tools/release/
tools/release/*
!tools/release/package.json
frontend/.yarn
frontend/.angular frontend/.angular
frontend/dist frontend/dist
frontend/node_modules frontend/node_modules
@@ -54,16 +54,13 @@ runs:
with: with:
tool: just tool: just
- name: Set Up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Set Up Node.js - name: Set Up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with: with:
node-version: '24' node-version-file: .nvmrc
- name: Enable Corepack
shell: bash
run: |
corepack enable
corepack yarn --version
- name: Install Release Tooling Dependencies - name: Install Release Tooling Dependencies
shell: bash shell: bash
+8 -25
View File
@@ -19,9 +19,9 @@ updates:
patterns: patterns:
- "*" - "*"
# Frontend – npm (Angular) # JavaScript – pnpm workspace (frontend + release tooling)
- package-ecosystem: "npm" - package-ecosystem: "npm"
directory: "/frontend" directory: "/"
schedule: schedule:
interval: "weekly" interval: "weekly"
day: "friday" day: "friday"
@@ -36,34 +36,17 @@ updates:
commit-message: commit-message:
prefix: "chore(deps)" prefix: "chore(deps)"
groups: groups:
npm-dependencies: release-tooling:
patterns:
- "semantic-release"
- "@semantic-release/*"
- "conventional-changelog*"
frontend:
patterns: patterns:
- "*" - "*"
ignore: ignore:
- dependency-name: "typescript" - 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 # GitHub Actions
- package-ecosystem: "github-actions" - package-ecosystem: "github-actions"
directory: "/" directory: "/"
+8 -11
View File
@@ -28,29 +28,26 @@ jobs:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Set Up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Set Up Node.js - name: Set Up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with: with:
node-version: '24' node-version-file: .nvmrc
- name: Enable Corepack
run: |
corepack enable
corepack yarn --version
- name: Install Frontend Dependencies - name: Install Frontend Dependencies
working-directory: ./frontend run: pnpm install --frozen-lockfile
run: corepack yarn install --immutable
- name: Typecheck Frontend - name: Typecheck Frontend
working-directory: ./frontend working-directory: ./frontend
run: corepack yarn typecheck run: pnpm run typecheck
- name: Run Frontend Build - name: Run Frontend Build
working-directory: ./frontend working-directory: ./frontend
run: | run: |
set +e 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]} BUILD_EXIT_CODE=${PIPESTATUS[0]}
set -e set -e
@@ -77,7 +74,7 @@ jobs:
working-directory: ./frontend working-directory: ./frontend
run: | run: |
# Lint output is written to JSON for threshold evaluation. # 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 - name: Count Lint Warnings
working-directory: ./frontend working-directory: ./frontend
+4 -6
View File
@@ -49,15 +49,13 @@ jobs:
with: with:
tool: just tool: just
- name: Set Up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Set Up Node.js - name: Set Up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with: with:
node-version: '24' node-version-file: .nvmrc
- name: Enable Corepack
run: |
corepack enable
corepack yarn --version
- name: Install Release Tooling Dependencies - name: Install Release Tooling Dependencies
run: just release install run: just release install
+4 -6
View File
@@ -54,15 +54,13 @@ jobs:
with: with:
tool: just tool: just
- name: Set Up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Set Up Node.js - name: Set Up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with: with:
node-version: '24' node-version-file: .nvmrc
- name: Enable Corepack
run: |
corepack enable
corepack yarn --version
- name: Install Release Tooling Dependencies - name: Install Release Tooling Dependencies
run: just release install run: just release install
+4 -6
View File
@@ -125,15 +125,13 @@ jobs:
with: with:
tool: just tool: just
- name: Set Up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Set Up Node.js - name: Set Up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with: with:
node-version: '24' node-version-file: .nvmrc
- name: Enable Corepack
run: |
corepack enable
corepack yarn --version
- name: Install Frontend Dependencies - name: Install Frontend Dependencies
run: just ui install-ci run: just ui install-ci
+3 -5
View File
@@ -48,13 +48,11 @@ frontend/test-results/
frontend/output/ frontend/output/
frontend/playwright-report/ frontend/playwright-report/
frontend/.playwright-browsers/ frontend/.playwright-browsers/
frontend/node_modules/ node_modules/
backend/src/main/resources/application-local.yaml backend/src/main/resources/application-local.yaml
/shared/ /shared/
/scratch /scratch
/.yarn/ /pnpm-debug.log
/frontend/.yarn/ /.pnpm-store/
/tools/release/node_modules
/tools/release/.yarn/
.worktrees/ .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 | | Tool | Version | Download |
| ----------------------- | ------- | -------------------------------------------- | | ----------------------- | ------- | -------------------------------------------- |
| Java | 25+ | [Adoptium](https://adoptium.net/) | | 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/) | | MariaDB | 10.6+ | [mariadb.org](https://mariadb.org/download/) |
| Git | latest | [git-scm.com](https://git-scm.com/) | | 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 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 WORKDIR /workspace
COPY frontend/package.json frontend/yarn.lock ./
RUN corepack enable RUN npm install -g pnpm@11.3.0
RUN --mount=type=cache,target=/workspace/.yarn/cache \
corepack yarn install --immutable
COPY frontend/ ./ COPY pnpm-lock.yaml pnpm-workspace.yaml ./
RUN --mount=type=cache,target=/workspace/.yarn/cache \ RUN --mount=type=cache,target=/pnpm/store \
--mount=type=cache,target=/workspace/frontend/.angular/cache \ pnpm config set store-dir /pnpm/store && \
CI=1 NG_CLI_ANALYTICS=false corepack yarn build:prod 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 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. # Show the resolved tool versions that the local commands expect to find.
doctor: doctor:
@echo "just: $$(just --version)" @echo "just: $(just --version)"
@echo "java: $$(java -version 2>&1 | head -n 1)" @echo "java: $(java -version 2>&1 | head -n 1)"
@echo "node: $$(node --version)" @echo "node: $(node --version)"
@echo "yarn: $$(corepack yarn --version)" @echo "pnpm: $(pnpm --version)"
@echo "docker: $$(docker --version)" @echo "docker: $(docker --version)"
+10 -8
View File
@@ -37,19 +37,20 @@ services:
image: node:24-alpine image: node:24-alpine
command: |- command: |-
sh -c "\ sh -c "\
apk update && apk add --no-cache bash just;\ cd /workspace &&\
cd /angular-app &&\ npm install -g pnpm@11.3.0 &&\
corepack enable &&\ pnpm config set store-dir /workspace/node_modules/.pnpm-store &&\
corepack yarn install --immutable &&\ pnpm install --frozen-lockfile &&\
corepack yarn ng serve --host 0.0.0.0 --watch --configuration development" pnpm -C frontend exec ng serve --host 0.0.0.0 --watch --configuration development"
environment: environment:
- NODE_ENV=development - NODE_ENV=development
stdin_open: true stdin_open: true
tty: true tty: true
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- './frontend:/angular-app' - '.:/workspace'
- node_modules:/angular-app/node_modules - frontend_workspace_node_modules:/workspace/node_modules
- frontend_node_modules:/workspace/frontend/node_modules
ports: ports:
- "${FRONTEND_PORT:-4200}:4200" - "${FRONTEND_PORT:-4200}:4200"
backend_db: backend_db:
@@ -70,7 +71,8 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
volumes: volumes:
node_modules: frontend_workspace_node_modules:
frontend_node_modules:
backend_db: backend_db:
backend_build: backend_build:
backend_gradle_cache: backend_gradle_cache:
+1 -1
View File
@@ -9,7 +9,7 @@
# Node # Node
/node_modules /node_modules
npm-debug.log npm-debug.log
yarn-error.log pnpm-debug.log
# IDEs and editors # IDEs and editors
.idea/ .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"] 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. # Show the frontend recipes available in this directory.
help: help:
@@ -8,87 +8,87 @@ help:
# Install or update frontend dependencies for local development. # Install or update frontend dependencies for local development.
install: install:
{{ yarn }} install {{ pnpm }} install
# Install the frontend dependencies exactly as CI does. # Install the frontend dependencies exactly as CI does.
install-ci: install-ci:
{{ yarn }} install --immutable {{ pnpm }} install --frozen-lockfile
# Run the Angular development server. # Run the Angular development server.
dev: dev:
{{ yarn }} dev {{ pnpm }} run dev
# Run the Angular development server with the default `start` script. # Run the Angular development server with the default `start` script.
start: start:
{{ yarn }} start {{ pnpm }} run start
# Build the production frontend bundle. # Build the production frontend bundle.
build: 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. # Build the frontend continuously in development mode.
watch: watch:
{{ yarn }} watch {{ pnpm }} run watch
# Run the frontend test suite. # Run the frontend test suite.
test: test:
{{ yarn }} test {{ pnpm }} run test
# Run the frontend tests with a coverage report. # Run the frontend tests with a coverage report.
coverage: coverage:
{{ yarn }} coverage {{ pnpm }} run coverage
# Summarize the latest frontend coverage report by global and feature buckets. # Summarize the latest frontend coverage report by global and feature buckets.
coverage-summary: coverage-summary:
{{ yarn }} coverage:summary {{ pnpm }} run coverage:summary
# Install the Chromium browser used by the frontend Playwright suite. # Install the Chromium browser used by the frontend Playwright suite.
e2e-install: e2e-install:
{{ yarn }} e2e:install {{ pnpm }} run e2e:install
# Run the frontend Playwright suite. # Run the frontend Playwright suite.
e2e: e2e:
{{ yarn }} e2e {{ pnpm }} run e2e
# Run a single frontend Playwright spec file. # Run a single frontend Playwright spec file.
e2e-file spec: e2e-file spec:
{{ yarn }} e2e {{ spec }} {{ pnpm }} run e2e {{ spec }}
# List the tests contained in a single frontend Playwright spec file. # List the tests contained in a single frontend Playwright spec file.
e2e-list spec: 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. # Start the Angular dev server for Playwright against a fixed host and port.
e2e-dev host='127.0.0.1' port='4301': 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. # Run the frontend linter.
lint: lint:
{{ yarn }} lint:eslint {{ pnpm }} run lint:eslint
# Run the frontend stylesheet linter. # Run the frontend stylesheet linter.
stylelint: stylelint:
{{ yarn }} lint:styles {{ pnpm }} run lint:styles
# Run the frontend stylesheet linter with autofix enabled. # Run the frontend stylesheet linter with autofix enabled.
stylelint-fix: stylelint-fix:
{{ yarn }} lint:styles:fix {{ pnpm }} run lint:styles:fix
# Run the frontend TypeScript typechecker without emitting build output. # Run the frontend TypeScript typechecker without emitting build output.
typecheck: typecheck:
{{ yarn }} typecheck {{ pnpm }} run typecheck
# Check the installed dependency tree. # Check the installed dependency tree.
deps: deps:
{{ yarn }} info -R --name-only {{ pnpm }} list --depth Infinity
# Run a local dependency audit without forcing a CI-specific severity threshold. # Run a local dependency audit without forcing a CI-specific severity threshold.
audit: audit:
{{ yarn }} npm audit {{ pnpm }} audit
# Run the stricter dependency audit used in CI. # Run the stricter dependency audit used in CI.
audit-ci: audit-ci:
{{ yarn }} npm audit --severity critical {{ pnpm }} audit --audit-level critical
# Run the standard local frontend verification pass. # Run the standard local frontend verification pass.
check: deps typecheck lint stylelint build test check: deps typecheck lint stylelint build test
+2 -11
View File
@@ -1,7 +1,6 @@
{ {
"name": "grimmory", "name": "grimmory",
"version": "0.0.0", "version": "0.0.0",
"packageManager": "yarn@4.10.3",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
@@ -15,10 +14,10 @@
"e2e": "playwright test", "e2e": "playwright test",
"e2e:install": "playwright install chromium", "e2e:install": "playwright install chromium",
"typecheck": "tsc --noEmit -p tsconfig.app.json", "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:eslint": "ng lint",
"lint:styles": "stylelint \"src/**/*.scss\" \"src/*.scss\"", "lint:styles": "stylelint \"src/**/*.scss\" \"src/*.scss\"",
"lint:styles:fix": "yarn lint:styles --fix" "lint:styles:fix": "pnpm run lint:styles --fix"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
@@ -85,13 +84,5 @@
"typescript-eslint": "^8.60.0", "typescript-eslint": "^8.60.0",
"vitest": "^4.1.7", "vitest": "^4.1.7",
"vitest-canvas-mock": "^1.1.4" "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 - Do not add browser specs that depend on broad route shims copied from other
scenarios. scenarios.
- Use the `frontend/Justfile` entrypoints for browser install, server startup, - 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 {ElementRef, Signal, computed, effect, signal} from '@angular/core';
import {injectVirtualizer} from '@tanstack/angular-virtual'; import {injectVirtualizer, observeElementRect, type Rect, type VirtualItem} from '@tanstack/angular-virtual';
import {observeElementRect, type Rect, type VirtualItem} from '@tanstack/virtual-core';
const DEFAULT_OVERSCAN_ROWS = 2; const DEFAULT_OVERSCAN_ROWS = 2;
const DEFAULT_ITEM_SIZE = 1; 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"] set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
# Use Corepack to ensure the pinned modern Yarn version is installed. pnpm := "pnpm"
yarn := "env YARN_ENABLE_GLOBAL_CACHE=0 YARN_CACHE_FOLDER=../../.yarn/cache corepack yarn"
# Show the release-tooling recipes available in this directory. # Show the release-tooling recipes available in this directory.
help: help:
@@ -9,16 +8,16 @@ help:
# Install the pinned semantic-release tooling used by local and CI release tasks. # Install the pinned semantic-release tooling used by local and CI release tasks.
install: install:
{{ yarn }} install --immutable {{ pnpm }} install --frozen-lockfile
# Preview the next semantic-release result for the current checkout. # Preview the next semantic-release result for the current checkout.
preview: preview:
{{ yarn }} release:dry-run {{ pnpm }} run release:dry-run
# Generate release notes for an explicit commit range. # Generate release notes for an explicit commit range.
range-notes: range-notes:
{{ yarn }} release:range-notes {{ pnpm }} run release:range-notes
# Run semantic-release for the current checkout. # Run semantic-release for the current checkout.
run: run:
{{ yarn }} release {{ pnpm }} run release
-1
View File
@@ -2,7 +2,6 @@
"name": "grimmory-release-tooling", "name": "grimmory-release-tooling",
"private": true, "private": true,
"description": "Release automation tooling for Grimmory", "description": "Release automation tooling for Grimmory",
"packageManager": "yarn@4.10.3",
"engines": { "engines": {
"node": ">=24" "node": ">=24"
}, },
File diff suppressed because it is too large Load Diff