Skip to content

Commit

Permalink
build: Adapt top-level npm script names to match client/package.json
Browse files Browse the repository at this point in the history
This will make them slightly more consistent.

The following scripts were renamed:

- `npm run analyse:server` → `npm run check:server:phpstan`
- `npm run cs:server` → `npm run check:server:cs`
- `npm run lint:server` → `npm run check:server:lint`

Notably `npm run test:server` remains the same.
  • Loading branch information
jtojnar committed Jul 11, 2024
1 parent 2cbecf9 commit dd134ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@ jobs:
run: nix-shell --run 'npm run check:client'

- name: Check syntax of back-end code
run: nix-shell --run 'npm run lint:server'
run: nix-shell --run 'npm run check:server:lint'

- name: Lint back-end code
if: matrix.cs_fixer
run: nix-shell --run 'npm run cs:server'
run: nix-shell --run 'npm run check:server:cs'

- name: Run unit tests
run: nix-shell --run 'npm run test:server'

- name: Analyse back-end code
if: matrix.phpstan
run: nix-shell --run 'npm run analyse:server'
run: nix-shell --run 'npm run check:server:phpstan'

- name: Run integration tests
run: SELFOSS_TEST_STORAGE_BACKEND=${{ matrix.storage }} nix-shell --run 'npm run test:integration'
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#### For developers
- Back-end source code is now checked using [PHPStan](https://phpstan.org/). ([#1409](https://github.com/fossar/selfoss/pull/1409))
- [Prettier](https://prettier.io/) is now used for code formatting. ([#1493](https://github.com/fossar/selfoss/pull/1493))
- Several `npm run` scripts were renamed for consistency: `analyse:server``check:server:phpstan`, `cs:server``check:server:cs`, `lint:server``check:server:lint`. ([#1494](https://github.com/fossar/selfoss/pull/1494))


## 2.19 – 2022-10-12
**This version requires PHP ~~5.6~~ 7.2 (see known regressions section) or newer. It is also the last version to support PHP 7.**
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
"npm": ">=7"
},
"scripts": {
"analyse:server": "composer run-script phpstan",
"bump-version": "$NODE utils/bump-version.js",
"check": "npm run check:client && npm run check:server",
"check:client": "npm run --prefix client/ check",
"check:server": "npm run lint:server && npm run cs:server && npm run test:server && npm run analyse:server",
"cs:server": "composer run-script cs",
"check:server": "npm run check:server:lint && npm run check:server:cs && npm run test:server && npm run check:server:phpstan",
"check:server:lint": "composer run-script lint",
"check:server:phpstan": "composer run-script phpstan",
"check:server:cs": "composer run-script cs",
"dev": "npm run --prefix client/ dev",
"build": "npm run --prefix client/ build",
"dist": "python3 utils/create-zipball.py",
Expand All @@ -26,7 +27,6 @@
"install-dependencies": "npm run install-dependencies:client && npm run install-dependencies:server",
"install-dependencies:client": "npm install --production=false --prefix client/",
"install-dependencies:server": "composer install --dev",
"lint:server": "composer run-script lint",
"test:server": "composer run-script test",
"test:integration": "python3 tests/integration/run.py",
"postinstall": "npm run install-dependencies"
Expand Down

0 comments on commit dd134ff

Please sign in to comment.