Skip to content

Commit 0537f2c

Browse files
Merge pull request #619 from ckeditor/i/618
Pnpm migration
2 parents da34e1c + 7f81ca5 commit 0537f2c

File tree

11 files changed

+13879
-11530
lines changed

11 files changed

+13879
-11530
lines changed

.circleci/config.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@ commands:
1919
description: "Bootstrap the repository"
2020
steps:
2121
- install_ssh_keys_command
22+
- run:
23+
name: Disable Corepack
24+
command: sudo corepack disable
25+
- run:
26+
name: Install pnpm
27+
command: sudo npm i -g pnpm@^10
2228
- run:
2329
name: Install dependencies
24-
command: yarn install
30+
command: pnpm install
2531
- prepare_environment_variables_commands
2632

2733
install_ssh_keys_command:
@@ -109,7 +115,7 @@ jobs:
109115
CKE5_SLACK_NOTIFY_HIDE_AUTHOR: << parameters.hideAuthor >>
110116
CKE5_PIPELINE_NUMBER: << pipeline.number >>
111117
name: Waiting for other jobs to finish and sending notification on failure
112-
command: yarn ckeditor5-dev-ci-circle-workflow-notifier
118+
command: pnpm ckeditor5-dev-ci-circle-workflow-notifier
113119
no_output_timeout: 1h
114120

115121
validate_and_tests:
@@ -121,16 +127,16 @@ jobs:
121127
- browser-tools/install_chrome
122128
- run:
123129
name: Execute ESLint
124-
command: yarn run lint
130+
command: pnpm run lint
125131
- run:
126132
name: Run build
127-
command: yarn run build
133+
command: pnpm run build
128134
- run:
129135
name: Check types of tests
130-
command: yarn run test:check:types
136+
command: pnpm run test:check:types
131137
- run:
132138
name: Run unit tests
133-
command: yarn run test
139+
command: pnpm run test
134140
- run:
135141
name: Verify the code coverage
136142
command: |
@@ -160,8 +166,12 @@ jobs:
160166
circleci-agent step halt
161167
fi
162168
- run:
163-
name: Upload code coverage
164-
command: cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
169+
name: Upload code coverage (non-fatal)
170+
command: |
171+
#!/bin/bash
172+
set -eo pipefail
173+
cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js \
174+
|| echo "Coveralls upload failed (e.g., 504). Continuing without failing CI."
165175
166176
release_prepare:
167177
docker:
@@ -196,7 +206,7 @@ jobs:
196206
fi
197207
- run:
198208
name: Trigger the release pipeline
199-
command: yarn ckeditor5-dev-ci-trigger-circle-build
209+
command: pnpm ckeditor5-dev-ci-trigger-circle-build
200210

201211
release_project:
202212
docker:
@@ -226,7 +236,7 @@ jobs:
226236
# Do not fail if the Node script ends with non-zero exit code.
227237
set +e
228238
229-
yarn ckeditor5-dev-ci-is-job-triggered-by-member
239+
pnpm ckeditor5-dev-ci-is-job-triggered-by-member
230240
EXIT_CODE=$( echo $? )
231241
232242
if [ ${EXIT_CODE} -ne 0 ];
@@ -236,7 +246,7 @@ jobs:
236246
fi
237247
- run:
238248
name: Disable the redundant workflows option
239-
command: yarn ckeditor5-dev-ci-circle-disable-auto-cancel-builds
249+
command: pnpm ckeditor5-dev-ci-circle-disable-auto-cancel-builds
240250
- run:
241251
name: Prepare the new version to release
242252
command: npm run release:prepare-packages -- --verbose
@@ -245,7 +255,7 @@ jobs:
245255
command: npm run release:publish-packages -- --verbose
246256
- run:
247257
name: Enable the redundant workflows option
248-
command: yarn ckeditor5-dev-ci-circle-enable-auto-cancel-builds
258+
command: pnpm ckeditor5-dev-ci-circle-enable-auto-cancel-builds
249259
when: always
250260
- run:
251261
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
@@ -4,3 +4,4 @@ dist/
44
.idea
55
.tmp
66
/release/
7+
yarn.lock

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
22
# For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
33

4-
yarn lint-staged
4+
pnpm lint-staged

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,50 @@ See the ["Rich text editor component for React"](https://ckeditor.com/docs/ckedi
1313

1414
* [Quick start](https://ckeditor.com/docs/ckeditor5/latest/getting-started/installation/react/react.html#quick-start)
1515
* [Using CKEditr 5 Builder](https://ckeditor.com/docs/ckeditor5/latest/getting-started/installation/react/react.html#using-ckeditor-5-builder)
16-
* [Installling from npm](https://ckeditor.com/docs/ckeditor5/latest/getting-started/installation/react/react.html#installing-from-npm)
16+
* [Installing from npm](https://ckeditor.com/docs/ckeditor5/latest/getting-started/installation/react/react.html#installing-from-npm)
1717
* [Component properties](https://ckeditor.com/docs/ckeditor5/latest/getting-started/installation/react/react.html#component-properties)
1818

1919
## Contributing
2020

21+
> [!NOTE]
22+
> 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`.
23+
2124
After cloning this repository, install necessary dependencies:
2225

2326
```bash
24-
npm install
27+
pnpm install
2528
```
2629

27-
You can also use [Yarn](https://yarnpkg.com/).
28-
2930
### Running the development server
3031

3132
To manually test the editor integration with different versions of React, you can start the development server using one of the commands below:
3233

3334
```bash
34-
npm run dev:16 # Open the demo projects using React 16.
35-
npm run dev:18 # Open the demo projects using React 18.
36-
npm run dev:19 # Open the demo projects using React 19.
35+
pnpm run dev:16 # Open the demo projects using React 16.
36+
pnpm run dev:18 # Open the demo projects using React 18.
37+
pnpm run dev:19 # Open the demo projects using React 19.
3738
```
3839

3940
### Executing tests
4041

4142
To test the editor integration against a set of automated tests, run the following command:
4243

4344
```bash
44-
npm run test
45+
pnpm run test
4546
```
4647

4748
If you want to run the tests in watch mode, use the following command:
4849

4950
```bash
50-
npm run test:watch
51+
pnpm run test:watch
5152
```
5253

5354
### Building the package
5455

5556
To build the package that is ready to publish, use the following command:
5657

5758
```bash
58-
npm run build
59+
pnpm run build
5960
```
6061

6162
## Releasing package
@@ -66,7 +67,7 @@ Before you start, you need to prepare the changelog entries.
6667

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

eslint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ export default defineConfig( [
5151
},
5252

5353
rules: {
54+
'@stylistic/func-call-spacing': 'off',
55+
'@stylistic/function-call-spacing': [ 'error', 'never' ],
56+
'@stylistic/operator-linebreak': 'off',
5457
'react/prop-types': 'off',
5558
'react/no-deprecated': 'off',
5659
'no-console': 'off',

package.json

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
"react": "^16.13.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
3636
},
3737
"devDependencies": {
38-
"@ckeditor/ckeditor5-dev-bump-year": "^50.0.0",
39-
"@ckeditor/ckeditor5-dev-changelog": "^50.0.0",
40-
"@ckeditor/ckeditor5-dev-ci": "^50.0.0",
41-
"@ckeditor/ckeditor5-dev-release-tools": "^50.0.0",
42-
"@ckeditor/ckeditor5-dev-utils": "^50.0.0",
38+
"@ckeditor/ckeditor5-dev-bump-year": "^53.0.0",
39+
"@ckeditor/ckeditor5-dev-changelog": "^53.0.0",
40+
"@ckeditor/ckeditor5-dev-ci": "^53.0.0",
41+
"@ckeditor/ckeditor5-dev-release-tools": "^53.0.0",
42+
"@ckeditor/ckeditor5-dev-utils": "^53.0.0",
4343
"@testing-library/dom": "^10.3.1",
4444
"@testing-library/jest-dom": "^6.4.8",
4545
"@testing-library/react": "^16.0.0",
@@ -80,15 +80,17 @@
8080
"vitest": "^2.1.9",
8181
"webdriverio": "^9.12.7"
8282
},
83-
"resolutions": {
84-
"form-data": "^4.0.4",
85-
"semver": "^7.0.0",
86-
"string-width": "4.1.0",
87-
"wrap-ansi": "7.0.0",
88-
"ws": "^8"
83+
"pnpm": {
84+
"overrides": {
85+
"form-data": "^4.0.4",
86+
"semver": "^7.0.0",
87+
"@stylistic/eslint-plugin": "^5.3.1"
88+
}
8989
},
9090
"engines": {
91-
"node": ">=22.0.0"
91+
"node": ">=22.0.0",
92+
"pnpm": ">=10.14.0",
93+
"yarn": "\n\n┌─────────────────────────┐\n│ Hey, we use pnpm now! │\n└─────────────────────────┘\n\n"
9294
},
9395
"scripts": {
9496
"nice": "ckeditor5-dev-changelog-create-entry",

0 commit comments

Comments
 (0)