Skip to content

Commit bb7f5e9

Browse files
Pnpm migration (#193)
1 parent 1aa2b5f commit bb7f5e9

File tree

9 files changed

+7499
-5954
lines changed

9 files changed

+7499
-5954
lines changed

.circleci/config.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,15 @@ commands:
1616
description: "Bootstrap the repository"
1717
steps:
1818
- install_ssh_keys_command
19+
- run:
20+
name: Disable Corepack
21+
command: sudo corepack disable
22+
- run:
23+
name: Install pnpm
24+
command: sudo npm i -g pnpm@^10
1925
- run:
2026
name: Install dependencies
21-
command: yarn install
27+
command: pnpm install
2228

2329
install_ssh_keys_command:
2430
description: "Install SSH keys"
@@ -83,7 +89,7 @@ jobs:
8389
CKE5_SLACK_NOTIFY_HIDE_AUTHOR: << parameters.hideAuthor >>
8490
CKE5_PIPELINE_NUMBER: << pipeline.number >>
8591
name: Waiting for other jobs to finish and sending notification on failure
86-
command: yarn ckeditor5-dev-ci-circle-workflow-notifier
92+
command: pnpm ckeditor5-dev-ci-circle-workflow-notifier
8793
no_output_timeout: 1h
8894

8995
validate_and_tests:
@@ -94,10 +100,10 @@ jobs:
94100
- bootstrap_repository_command
95101
- run:
96102
name: Execute ESLint
97-
command: yarn run lint
103+
command: pnpm run lint
98104
- run:
99105
name: Run unit tests
100-
command: yarn run coverage
106+
command: pnpm run coverage
101107
- unless:
102108
# Upload the code coverage results for non-nightly builds only.
103109
condition: << pipeline.parameters.isNightly >>
@@ -113,9 +119,15 @@ jobs:
113119
then
114120
circleci-agent step halt
115121
fi
116-
- run:
117-
name: Upload code coverage
118-
command: cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
122+
- run:
123+
name: Upload code coverage (non-fatal)
124+
command: |
125+
#!/bin/bash
126+
127+
set -eo pipefail
128+
129+
cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js \
130+
|| echo "Coveralls upload failed (e.g., 504). Continuing without failing CI."
119131
120132
release_prepare:
121133
docker:
@@ -125,7 +137,7 @@ jobs:
125137
- bootstrap_repository_command
126138
- run:
127139
name: Check if packages are ready to be released
128-
command: yarn run release:prepare-packages --verbose --compile-only
140+
command: pnpm run release:prepare-packages --verbose --compile-only
129141

130142
trigger_release_process:
131143
docker:
@@ -154,7 +166,7 @@ jobs:
154166
CKE5_GITHUB_RELEASE_BRANCH: master
155167
CKE5_GITHUB_REPOSITORY_SLUG: cksource/mrgit
156168
CKE5_COMMIT_SHA1: << pipeline.git.revision >>
157-
command: yarn ckeditor5-dev-ci-trigger-circle-build
169+
command: pnpm ckeditor5-dev-ci-trigger-circle-build
158170

159171
release_project:
160172
docker:
@@ -186,7 +198,7 @@ jobs:
186198
187199
# Do not fail if the Node script ends with non-zero exit code.
188200
set +e
189-
yarn ckeditor5-dev-ci-is-job-triggered-by-member
201+
pnpm ckeditor5-dev-ci-is-job-triggered-by-member
190202
EXIT_CODE=$( echo $? )
191203
192204
if [ ${EXIT_CODE} -ne 0 ];
@@ -199,7 +211,7 @@ jobs:
199211
environment:
200212
CKE5_GITHUB_ORGANIZATION: cksource
201213
CKE5_GITHUB_REPOSITORY: mrgit
202-
command: yarn ckeditor5-dev-ci-circle-disable-auto-cancel-builds
214+
command: pnpm ckeditor5-dev-ci-circle-disable-auto-cancel-builds
203215
- run:
204216
name: Prepare the new version to release
205217
command: npm run release:prepare-packages -- --verbose
@@ -211,7 +223,7 @@ jobs:
211223
environment:
212224
CKE5_GITHUB_ORGANIZATION: cksource
213225
CKE5_GITHUB_REPOSITORY: mrgit
214-
command: yarn ckeditor5-dev-ci-circle-enable-auto-cancel-builds
226+
command: pnpm ckeditor5-dev-ci-circle-enable-auto-cancel-builds
215227
when: always
216228
- run:
217229
name: Pack the "release/" directory (in case of failure)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
This repository uses Markdown files to define changelog entries. If the changes in this pull request are **user-facing**, please create a changelog entry by running the following command:
44
5-
yarn run nice
5+
pnpm run nice
66
77
This will generate a `*.md` file in the `.changelog/` directory for your description. You can create as many as you need.
88

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
coverage/
33
node_modules/
44
.idea
5+
yarn.lock
56

67
# Prepared files to publish to npm.
78
/release/

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
. "$(dirname -- "$0")/_/husky.sh"
77

8-
yarn lint-staged
8+
pnpm lint-staged

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77

88
Multi-repo manager for git. A tool for managing projects build using multiple repositories.
99

10-
`mrgit` is designed to work with [yarn workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) and [Lerna](https://github.com/lerna/lerna) out of the box, hence, it mixes the "package" and "repository" concepts. In other words, every repository is meant to be a single [npm](https://npmjs.com) package. It doesn't mean that you must use it with Lerna and npm, but don't be surprised that mrgit talks about "packages" and works best with npm packages.
10+
`mrgit` is designed to work with [workspaces](https://pnpm.io/workspaces) and [Lerna](https://github.com/lerna/lerna) out of the box, hence, it mixes the "package" and "repository" concepts. In other words, every repository is meant to be a single [npm](https://npmjs.com) package. It doesn't mean that you must use it with Lerna and npm, but don't be surprised that mrgit talks about "packages" and works best with npm packages.
1111

1212
# Table of content
1313

14+
1. [Cloning](#cloning)
1415
1. [Installation](#installation)
1516
1. [Usage](#usage)
1617
1. [Configuration](#configuration)
@@ -34,6 +35,15 @@ Multi-repo manager for git. A tool for managing projects build using multiple re
3435
1. [`checkout` or `co`](#checkout-alias-co)
3536
1. [Projects using mrgit](#projects-using-mrgit)
3637

38+
## Cloning
39+
40+
> [!NOTE]
41+
> This project requires **pnpm v10** or higher. You can check your version with `pnpm --version` and update if needed with `npm install -g pnpm@latest`.
42+
43+
1. Clone this repository.
44+
1. Do `pnpm install` inside.
45+
1. You're ready to go!
46+
3747
## Installation
3848

3949
```bash
@@ -517,7 +527,7 @@ Before you start, you need to prepare the changelog entries.
517527

518528
1. Make sure the `#master` branch is up-to-date: `git fetch && git checkout master && git pull`.
519529
1. Prepare a release branch: `git checkout -b release-[YYYYMMDD]` where `YYYYMMDD` is the current day.
520-
1. Generate the changelog entries: `yarn run release:prepare-changelog`.
530+
1. Generate the changelog entries: `pnpm run release:prepare-changelog`.
521531
* You can specify the release date by passing the `--date` option, e.g., `--date=2025-06-11`.
522532
* By passing the `--dry-run` option, you can check what the script will do without actually modifying the files.
523533
* Read all the entries, correct poor wording and other issues, wrap code names in backticks to format them, etc.

package.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
"minimatch": "^4.0.0",
2323
"minimist": "^1.2.5",
2424
"minimist-options": "^4.1.0",
25-
"shelljs": "^0.8.4",
25+
"shelljs": "^0.10.0",
2626
"upath": "^2.0.0"
2727
},
2828
"devDependencies": {
29-
"@ckeditor/ckeditor5-dev-bump-year": "^50.0.0",
30-
"@ckeditor/ckeditor5-dev-changelog": "^50.0.0",
31-
"@ckeditor/ckeditor5-dev-ci": "^50.0.0",
32-
"@ckeditor/ckeditor5-dev-release-tools": "^50.0.0",
29+
"@ckeditor/ckeditor5-dev-bump-year": "^53.0.0",
30+
"@ckeditor/ckeditor5-dev-changelog": "^53.0.0",
31+
"@ckeditor/ckeditor5-dev-ci": "^53.0.0",
32+
"@ckeditor/ckeditor5-dev-release-tools": "^53.0.0",
3333
"@inquirer/prompts": "^7.8.3",
3434
"@listr2/prompt-adapter-inquirer": "^3.0.2",
3535
"chai": "^4.2.0",
@@ -45,18 +45,19 @@
4545
"nyc": "^15.1.0",
4646
"sinon": "^9.0.3"
4747
},
48-
"resolutions": {
49-
"form-data": "^2.5.4",
50-
"semver": "^7.0.0",
51-
"string-width": "^4.0.0",
52-
"wrap-ansi": "^7.0.0"
48+
"pnpm": {
49+
"overrides": {
50+
"form-data": "^4.0.4"
51+
}
5352
},
5453
"repository": {
5554
"type": "git",
5655
"url": "https://github.com/cksource/mrgit.git"
5756
},
5857
"engines": {
59-
"node": ">=22.0.0"
58+
"node": ">=22.0.0",
59+
"pnpm": ">=10.14.0",
60+
"yarn": "\n\n┌─────────────────────────┐\n│ Hey, we use pnpm now! │\n└─────────────────────────┘\n\n"
6061
},
6162
"author": "CKSource (http://cksource.com/)",
6263
"license": "MIT",
@@ -66,7 +67,7 @@
6667
"nice": "ckeditor5-dev-changelog-create-entry",
6768
"postinstall": "node ./scripts/postinstall.js",
6869
"test": "mocha tests --recursive",
69-
"coverage": "nyc --reporter=lcov --reporter=text-summary yarn run test",
70+
"coverage": "nyc --reporter=lcov --reporter=text-summary pnpm run test",
7071
"lint": "eslint --quiet \"**/*.{js,mjs}\"",
7172
"release:prepare-changelog": "node ./scripts/preparechangelog.mjs",
7273
"release:prepare-packages": "node ./scripts/preparepackages.mjs",

0 commit comments

Comments
 (0)