Skip to content

Commit e23a1fd

Browse files
Upgrade to pa11y-webservice*5 and other more recent dependencies (#340)
* Update GitHub Actions versions * Test with Ubuntu `22.04`, rather than the now retired `20.04` * Use `ubuntu-latest` * Test Mongo 7 * Update Node support to `20, 22, 24` * Disable AppArmor * Set `package.engines >= 20` * Use `pa11y-webservice*` `^5` * Use `mocha^11` in place of `10` * Use ESLint `^8` in place of `^7` * Make implicit dependency on `request` explicit * Fix double `promisify` * Bump `compression`, `morgan`, `nanoid` * Remove redundant dependency `node-fetch` * Rewrite `navigate` using `fetch`; remove `request` as dependency * Use `cheerio@1.1.2`, resolving another high severity vulnerability * Upgrade ExpressJS, resolving more alerts * Upgrade `body-parser`, resolving another high alert * Mention MongoDB 8 instead of 4.4 in readme
1 parent 0428086 commit e23a1fd

File tree

6 files changed

+4556
-3497
lines changed

6 files changed

+4556
-3497
lines changed

.github/workflows/tests.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,43 @@ jobs:
88
lint:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
12-
- uses: actions/setup-node@v3
11+
- uses: actions/checkout@v5
12+
- uses: actions/setup-node@v6
1313
with:
14-
node-version: 12
14+
node-version: 20
1515
- run: npm ci
1616
- run: npm run lint
1717

1818
test:
1919
name: test (node ${{ matrix.node }}, mongodb ${{ matrix.mongo }})
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-latest
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
node: [12, 14, 16, 18, 20]
24+
node: [20, 22, 24]
2525
mongo: [latest]
2626
include:
27-
- { node: 12, mongo: 6.0.11 }
28-
- { node: 12, mongo: 5.0.22 }
29-
- { node: 12, mongo: 4.4.25 }
30-
- { node: 12, mongo: 3.6.23 }
31-
- { node: 12, mongo: 2.6.12 }
27+
- { node: 20, mongo: 7.0.25 }
28+
- { node: 20, mongo: 6.0.11 }
29+
- { node: 20, mongo: 5.0.22 }
30+
- { node: 20, mongo: 4.4.25 }
31+
- { node: 20, mongo: 3.6.23 }
32+
- { node: 20, mongo: 2.6.12 }
3233

3334
steps:
34-
- uses: actions/checkout@v4
35-
- uses: actions/setup-node@v3
35+
- name: Disable AppArmor User Namespace Restrictions, required to open
36+
Chrome on Ubuntu 23.10+ without --no-sandbox). See
37+
https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md.
38+
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
39+
40+
- uses: actions/checkout@v5
41+
- uses: actions/setup-node@v6
3642
with:
3743
node-version: ${{ matrix.node }}
3844
- run: npm ci
3945

4046
- name: Supply MongoDB ${{ matrix.mongo }}
41-
uses: supercharge/mongodb-github-action@1.5.0
47+
uses: supercharge/mongodb-github-action@1.12.0
4248
with:
4349
mongodb-version: ${{ matrix.mongo }}
4450

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ npm install
4242

4343
Instructions for installing and running MongoDB are outside the scope of this document. When in doubt, please refer to the [MongoDB installation instructions](https://docs.mongodb.com/manual/installation/) for details of how to install and run MongoDB on your specific operating system. An example of the installation and configuration process for macOS follows.
4444

45-
Pa11y Dashboard uses [MongoDB Node.js Driver][mongodb-package] version 3, which [may not support some features][mongodb-package-compatibility] of MongoDB versions 6 and beyond. We do however test against MongoDB versions 2 to 6, plus the latest major version, which at the time of writing is `7`.
45+
Pa11y Dashboard uses [MongoDB Node.js Driver][mongodb-package] version 3, which [may not support some features][mongodb-package-compatibility] of MongoDB versions 6 and beyond. We do however test against MongoDB versions 2 to 7, plus the latest major version, which at the time of writing is `8`.
4646

4747
#### Example MongoDB installation for macOS
4848

@@ -57,13 +57,13 @@ brew tap mongodb/brew
5757
Install a supported Community version of MongoDB:
5858

5959
```sh
60-
brew install mongodb-community@4.4
60+
brew install mongodb-community@8.0
6161
```
6262

6363
Start the MongoDB server:
6464

6565
```sh
66-
brew services start mongodb/brew/mongodb-community@4.4
66+
brew services start mongodb/brew/mongodb-community@8.0
6767
```
6868

6969
Check that the service has started properly:

0 commit comments

Comments
 (0)