Skip to content

Commit 1724e73

Browse files
committed
maint(bundle): switch package manager from yarn to pnpm
1 parent 7edd0f9 commit 1724e73

11 files changed

Lines changed: 12216 additions & 10014 deletions

File tree

.github/workflows/coredev-robot-tests.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
comment-id: ${{ github.event.comment.id }}
2828
reactions: '+1'
2929
token: ${{ secrets.GITHUB_TOKEN }}
30-
30+
3131
- name: Info
3232
run: |
3333
echo "Workflow triggered with comment '/run-coredev-robottests' "
@@ -52,14 +52,17 @@ jobs:
5252
path: tests
5353

5454
# ── 2. Node.js setup ──────────────────────────────────────────────────────
55+
- name: Install pnpm
56+
uses: pnpm/action-setup@v4
57+
5558
- name: Set up Node.js
5659
uses: actions/setup-node@v4
5760
with:
5861
node-version: "22"
59-
cache: yarn
62+
cache: pnpm
6063

61-
- name: Install yarn dependencies
62-
run: yarn install
64+
- name: Install pnpm dependencies
65+
run: pnpm install
6366

6467
# ── 3. Python / make install ─────────────────────────────────────────────
6568
- name: Set up Python 3.12
@@ -89,7 +92,7 @@ jobs:
8992

9093
# ── 2b. Build mockup bundle into tests/src/plone.staticresources ─────────
9194
- name: Build mockup for tests (webpack)
92-
run: yarn build:webpack:tests
95+
run: pnpm build:webpack:tests
9396

9497
# ── 4. Install Playwright / rfbrowser ────────────────────────────────────
9598
- name: install rfbrowser
@@ -110,7 +113,7 @@ jobs:
110113
with open('mxcheckouts.ini', 'w') as f:
111114
cfg.write(f)
112115
"
113-
116+
114117
- name: Run Coredev robot tests
115118
working-directory: tests
116119
run: ROBOTSUITE_PREFIX=ONLYROBOT TEST_ARGS="--all -t ONLYROBOT" make test

.github/workflows/docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16+
- uses: pnpm/action-setup@v4
1617
- uses: actions/setup-node@v4
1718
with:
1819
node-version: "22"
19-
cache: "yarn"
20+
cache: pnpm
2021
- name: Build docs
2122
run: |
2223
make docs

.github/workflows/test.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ on:
44
push:
55
branches:
66
- master
7-
- 5.0.x
87
pull_request:
98
branches:
109
- master
11-
- 5.0.x
1210

1311
jobs:
1412
build:
@@ -18,10 +16,11 @@ jobs:
1816
NODE_OPTIONS: "--max_old_space_size=8192"
1917
steps:
2018
- uses: actions/checkout@v4
19+
- uses: pnpm/action-setup@v4
2120
- uses: actions/setup-node@v4
2221
with:
2322
node-version: "22"
24-
cache: 'yarn'
25-
- run: yarn install
23+
cache: pnpm
24+
- run: pnpm install
2625
- run: make eslint
27-
- run: yarn test
26+
- run: pnpm test

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefully-hoist=true
2+
public-hoist-pattern[]=*

Makefile

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,36 @@
1818
-include .env
1919
export
2020

21-
YARN ?= npx yarn
21+
PNPM = pnpm
2222

2323

24-
yarn.lock install:
25-
$(YARN) install
24+
pnpm-lock.yaml install:
25+
npm i -g corepack@latest && corepack enable
26+
$(PNPM) install
2627

2728

2829
.PHONY:
2930
watch-plone:
30-
$(YARN) run watch:webpack:plone
31+
$(PNPM) run watch:webpack:plone
3132

3233

3334
.PHONY:
3435
bundle-plone:
35-
$(YARN) run build:webpack:plone
36+
$(PNPM) run build:webpack:plone
3637

3738

3839
.PHONY: bundle
3940
bundle: install
40-
$(YARN) run build:webpack
41+
$(PNPM) run build:webpack
4142

4243
.PHONY: docs
4344
docs: install
44-
$(YARN) build:webpack:docs
45-
$(YARN) build:docs
45+
$(PNPM) build:webpack:docs
46+
$(PNPM) build:docs
4647

4748
# Unlink any linked dependencies before building a bundle.
4849
bundle-pre:
49-
-$(YARN) unlink @patternslib/dev
50-
-$(YARN) unlink @patternslib/pat-code-editor
51-
-$(YARN) unlink @patternslib/patternslib
52-
$(YARN) install --force
50+
-$(PNPM) unlink @patternslib/dev
51+
-$(PNPM) unlink @patternslib/pat-code-editor
52+
-$(PNPM) unlink @patternslib/patternslib
53+
$(PNPM) install --force

jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ const config = require("@patternslib/dev/jest.config.js");
44
// config.setupFilesAfterEnv.push("./node_modules/@testing-library/jest-dom/extend-expect");
55
config.setupFilesAfterEnv.push(path.resolve(__dirname, "./src/setup-tests.js"));
66
config.transformIgnorePatterns = [
7-
"/node_modules/(?!@patternslib/)(?!@plone/)(?!preact/)(?!screenfull/)(?!sinon/)(?!bootstrap/)(?!datatable/)(?!svelte/)(?!esm-env/).+\\.[t|j]sx?$",
7+
"/node_modules/(?!.pnpm/)(?!@patternslib/)(?!@plone/)(?!preact/)(?!screenfull/)(?!sinon/)(?!bootstrap/)(?!datatable/)(?!svelte/)(?!esm-env/).+\\.[t|j]sx?$",
8+
"/node_modules/.pnpm/(?!@patternslib)(?!@plone)(?!preact)(?!screenfull)(?!sinon)(?!bootstrap)(?!datatable)(?!svelte)(?!esm-env)",
89
];
910

1011
// add svelte-jester

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"name": "@plone/mockup",
33
"version": "5.5.1",
4+
"packageManager": "pnpm@10.32.1",
45
"description": "A collection of client side patterns for faster and easier web development",
56
"license": "BSD-3-Clause",
67
"main": "./src/patterns.js",
78
"dependenciesComments": {
89
"backbone": "Dependency moved to devDependencies since it requests oudated versions Underscore. Not fixing this dependencies in other bundles would make use paginator those outdated dependencies and result in a broken structure pattern.",
9-
"backbone.paginator": "Dependency moved to devDependencies since it requests oudated versions Underscore. Not fixing this dependencies in other bundles would make use paginator those outdated dependencies and result in a broken structure pattern."
10+
"backbone.paginator": "Dependency moved to devDependencies since it requests oudated versions Underscore. Not fixing this dependencies in other bundles would make use paginator those outdated dependencies and result in a broken structure pattern.",
11+
"select2": "Use the commit hash for checkout since pnpm has problems with the annotated commit #3.5.4"
1012
},
1113
"dependencies": {
1214
"@11ty/eleventy-upgrade-help": "3.0.2",
@@ -38,7 +40,7 @@
3840
"jquery-form": "4.3.0",
3941
"jquery.browser": "0.1.0",
4042
"js-cookie": "^3.0.5",
41-
"select2": "git+https://github.com/ivaynberg/select2.git#3.5.4",
43+
"select2": "git+https://github.com/ivaynberg/select2.git#95a977f674b6938af55ec5f28b7772df93786c5c",
4244
"sortablejs": "^1.15.6",
4345
"tinymce": "8.3.2",
4446
"tinymce-i18n": "26.2.16",
@@ -120,5 +122,9 @@
120122
"publishConfig": {
121123
"access": "public"
122124
},
123-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
125+
"pnpm": {
126+
"overrides": {
127+
"slick-carousel": "git+https://github.com/kenwheeler/slick.git#d0716f19aa730006ee80ab026625fb1107816a97"
128+
}
129+
}
124130
}

0 commit comments

Comments
 (0)