Skip to content

Commit 7e00308

Browse files
committed
chore: migrate from yarn to pnpm to improve performance
1 parent 0273995 commit 7e00308

36 files changed

+27711
-20974
lines changed

.github/workflows/dependencies-install/action.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@ author: 'Benjamin Pagelsdorf'
55
runs:
66
using: 'composite'
77
steps:
8+
- uses: pnpm/action-setup@v4
9+
with:
10+
version: 9.15.4
11+
run_install: false
12+
813
- uses: actions/setup-node@v4
914
with:
1015
node-version-file: '.nvmrc'
1116
registry-url: https://registry.npmjs.org
12-
scope: '@inovex.de' # important for yarn
17+
scope: '@inovex.de'
1318
always-auth: true
14-
- name: restore node_modules cache
15-
uses: actions/cache@v4
16-
id: node-cache
17-
with:
18-
path: '**/node_modules'
19-
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
19+
cache: 'pnpm'
20+
2021
- name: restore nx cache
2122
uses: actions/cache@v4
2223
with:
@@ -31,5 +32,5 @@ runs:
3132
path: '**/.nx-cache'
3233
key: nx_cache-${{ github.ref_name || github.ref }}-build_core-${{ github.run_id }}
3334
- name: Install Dependencies
34-
run: yarn install --frozen-lockfile
35+
run: pnpm install --frozen-lockfile
3536
shell: bash

.github/workflows/deploy-landingpage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: ./.github/workflows/dependencies-install
1616
- name: Build landingpage ⚒️
17-
run: yarn nx run landingpage:build
17+
run: pnpm nx run landingpage:build
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0

.github/workflows/deploy-prerelease.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
with:
4646
node-version-file: '.nvmrc'
4747
registry-url: https://registry.npmjs.org
48-
scope: '@inovex.de' # important for yarn
48+
scope: '@inovex.de'
4949
always-auth: true
5050
- uses: ./.github/workflows/dependencies-install
5151
- name: Setup Git
@@ -55,11 +55,11 @@ jobs:
5555
- name: Set npm loglevel
5656
run: npm config set loglevel warn
5757
- name: Build libs
58-
run: yarn run nx run-many -t build -p elements,elements-angular,elements-react,elements-vue
58+
run: pnpm nx run-many -t build -p elements,elements-angular,elements-react,elements-vue
5959
env:
6060
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
6161
- name: Version & Release
6262
shell: bash
63-
run: yarn nx run workspace:publish:prerelease
63+
run: pnpm nx run workspace:publish:prerelease
6464
env:
6565
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/deploy-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
node-version-file: '.nvmrc'
4545
registry-url: https://registry.npmjs.org
46-
scope: '@inovex.de' # important for yarn
46+
scope: '@inovex.de'
4747
always-auth: true
4848
- uses: ./.github/workflows/dependencies-install
4949
- name: Setup Git
@@ -53,12 +53,12 @@ jobs:
5353
- name: Set npm loglevel
5454
run: npm config set loglevel ${{ inputs.loglevel }}
5555
- name: Build libs
56-
run: yarn run nx run-many -t build -p elements,elements-angular,elements-react,elements-vue
56+
run: pnpm nx run-many -t build -p elements,elements-angular,elements-react,elements-vue
5757
env:
5858
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
5959
- name: Version and Release
6060
shell: bash
61-
run: yarn nx run workspace:publish:${{ inputs.configuration }}
61+
run: pnpm nx run workspace:publish:${{ inputs.configuration }}
6262
env:
6363
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6464
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/deploy-storybook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/checkout@v4
2525
- uses: ./.github/workflows/dependencies-install
2626
- name: Build Storybook
27-
run: yarn nx run storybook:build
27+
run: pnpm nx run storybook:build
2828
env:
2929
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
3030
- name: Upload Storybook artifact ⬆️

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: Store Playwright's Version
2525
run: |
26-
PLAYWRIGHT_VERSION=$(npx playwright -V | awk '{ print $2 }')
26+
PLAYWRIGHT_VERSION=$(pnpm exec playwright -V | awk '{ print $2 }')
2727
echo "Playwright's Version: $PLAYWRIGHT_VERSION"
2828
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
2929
- name: Cache Playwright Browsers for Playwright's Version
@@ -34,23 +34,23 @@ jobs:
3434
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }}
3535
- name: Setup Playwright
3636
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
37-
run: yarn playwright install --with-deps
37+
run: pnpm playwright install --with-deps
3838

3939
- name: Check format
40-
run: yarn format
40+
run: pnpm format
4141
- name: Check lint
42-
run: yarn lint:ci
42+
run: pnpm lint:ci
4343
env:
4444
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
4545
- name: Build all projects
46-
run: yarn build
46+
run: pnpm build
4747
env:
4848
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
4949
- name: Check if there are changes
5050
uses: NathanielHill/fail-if-changes@v1.1.1
5151
- name: Test all projects
5252
id: test_projects
53-
run: yarn test
53+
run: pnpm test
5454
env:
5555
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
5656
- name: Upload playwright trace

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,9 @@ tmp/
3838
.nx-cache
3939

4040
.nx/cache
41+
42+
# pnpm
43+
.pnpm-store/
44+
.pnpm-debug.log*
45+
46+

.npmrc

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# pnpm Configuration
2+
3+
# Use workspace protocol for local packages
4+
link-workspace-packages=true
5+
6+
# Stricter peer dependency handling (set to false for gradual migration)
7+
strict-peer-dependencies=false
8+
9+
# Auto install peer dependencies
10+
auto-install-peers=true
11+
12+
# Hoist patterns for compatibility with tools that expect flat node_modules
13+
# These patterns ensure certain packages are available at the root
14+
public-hoist-pattern[]=*eslint*
15+
public-hoist-pattern[]=*prettier*
16+
public-hoist-pattern[]=@angular*
17+
public-hoist-pattern[]=@nx*
18+
public-hoist-pattern[]=@storybook*
19+
public-hoist-pattern[]=@stencil*
20+
public-hoist-pattern[]=@material*
21+
public-hoist-pattern[]=typescript
22+
public-hoist-pattern[]=ts-node
23+
public-hoist-pattern[]=jest*
24+
public-hoist-pattern[]=vitest*
25+
26+
# Use isolated node linker for better isolation
27+
node-linker=isolated
28+
29+
# Enabled to support legacy tooling (like Sass @use across packages) that expects a flat node_modules structure.
30+
# Should definitely be changed in the future once all tooling supports pnpm's default structure.
31+
shamefully-hoist=true
32+
33+
# Engine strict (enforce node version)
34+
engine-strict=true
35+
36+
# Prefer workspace packages over registry packages
37+
prefer-workspace-packages=true
38+
39+
# Deduplicate peer dependencies
40+
dedupe-peer-dependents=true
41+
42+
# Lockfile settings
43+
lockfile=true

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ vendor/
1111
node_modules/
1212
**/.next/
1313
**/out/
14+
pnpm-lock.yaml
1415

1516
# Hand written files
1617
*.mdx
1718
readme.md
1819
CHANGELOG.md
20+
CONTEXT.md
1921

2022

2123
# Generated by stencil

.yarnrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)