Skip to content

Commit 83a8baf

Browse files
committed
Migrate to pnpm
1 parent 53eec7e commit 83a8baf

13 files changed

Lines changed: 8187 additions & 12210 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ jobs:
2020

2121
steps:
2222
- name: Check out repository
23-
uses: actions/checkout@v6
23+
uses: actions/checkout@v7
24+
25+
- name: Set up pnpm
26+
uses: pnpm/action-setup@v6
2427

2528
- name: Set up Node.js
2629
uses: actions/setup-node@v6
2730
with:
2831
node-version-file: .nvmrc
29-
cache: npm
32+
cache: pnpm
33+
cache-dependency-path: pnpm-lock.yaml
3034

3135
- name: Install dependencies
32-
run: npm ci
36+
run: pnpm install --frozen-lockfile
3337

3438
- name: Run frontend checks
35-
run: npm run check
39+
run: pnpm run check
3640

3741
php:
3842
name: PHP
@@ -41,12 +45,12 @@ jobs:
4145

4246
steps:
4347
- name: Check out repository
44-
uses: actions/checkout@v6
48+
uses: actions/checkout@v7
4549

4650
- name: Set up PHP
4751
uses: shivammathur/setup-php@v2
4852
with:
49-
php-version: '8.1'
53+
php-version: '8.4'
5054
coverage: none
5155
tools: composer:v2
5256

CONTRIBUTING.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ Thank you for helping improve Butterfly's Nextcloud integration.
1414
## Development setup
1515

1616
You need Nextcloud 31–34, PHP 8.1 or newer, Composer, Node.js 24.11 or newer
17-
in the 24.x release line, and npm 11. The included Docker Compose setup
17+
in the 24.x release line, and Corepack for pnpm 11. The included Docker Compose setup
1818
provides a local Nextcloud 34 instance.
1919

2020
```bash
2121
git clone https://github.com/LinwoodDev/ButterflyNextcloud.git
2222
cd ButterflyNextcloud
2323
nvm install
2424
nvm use
25-
npm ci
26-
npm run build
25+
corepack enable
26+
pnpm install --frozen-lockfile
27+
pnpm run build
2728
composer install
2829
chmod a+rx .
2930
docker compose up -d
@@ -47,7 +48,7 @@ Open <http://localhost:8080> and sign in with `admin` / `admin`. Upload a
4748
Run all checks before opening a pull request:
4849

4950
```bash
50-
npm run check
51+
pnpm run check
5152
composer lint
5253
composer cs:check
5354
composer psalm
@@ -60,7 +61,7 @@ the pull request. Do not commit generated `node_modules`, `vendor`, `js`, or
6061

6162
## Dependency updates
6263

63-
Use `npm install` when intentionally changing JavaScript constraints, and
64-
commit both `package.json` and `package-lock.json`. Use `composer update` for
64+
Use `corepack pnpm update` when intentionally changing JavaScript constraints,
65+
and commit both `package.json` and `pnpm-lock.yaml`. Use `composer update` for
6566
PHP tooling and commit the affected Composer lockfiles. Avoid forced upgrades
6667
that violate the supported Node.js, PHP, or Nextcloud ranges.

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ while they are open. The app is based on the official
1010

1111
- Nextcloud 31–34
1212
- PHP 8.1 or newer
13-
- Node.js 24.11 or newer in the 24.x release line, and npm 11, for building
13+
- Node.js 24.11 or newer in the 24.x release line, with Corepack for pnpm 11,
14+
for building
1415
the frontend
1516
- Composer for PHP development and tests
1617

@@ -19,8 +20,9 @@ while they are open. The app is based on the official
1920
```bash
2021
nvm install
2122
nvm use
22-
npm ci
23-
npm run build
23+
corepack enable
24+
pnpm install --frozen-lockfile
25+
pnpm run build
2426
composer install
2527
```
2628

@@ -32,8 +34,9 @@ present in an installed or packaged app.
3234
Build the frontend, then start the included development instance:
3335

3436
```bash
35-
npm ci
36-
npm run build
37+
corepack enable
38+
pnpm install --frozen-lockfile
39+
pnpm run build
3740
chmod a+rx .
3841
docker compose up -d
3942
docker compose exec --user www-data nextcloud php occ app:enable butterfly
@@ -70,7 +73,7 @@ not discover the mounted app and attempted to install it instead.
7073
## Checks
7174

7275
```bash
73-
npm run check
76+
pnpm run check
7477
composer lint
7578
composer cs:check
7679
composer psalm

0 commit comments

Comments
 (0)