Skip to content

Commit 557dbdd

Browse files
authored
CI fixup: Node 22, replace uvu with node:test, upgrade lockfile format (#432)
* CI fixup: Node 22, uvu -> node:test, upgrade lockfile, Cypress 14 dependabot grouped deps + monthly * prettier@3, linkedom and lint-staged upgrade rollup plugins & husky
1 parent 009ea73 commit 557dbdd

29 files changed

+9225
-5829
lines changed

.github/dependabot.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,18 @@ updates:
33
- package-ecosystem: "npm"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: "monthly"
7+
groups:
8+
dev-dependencies:
9+
patterns:
10+
- "*"
11+
dependency-type: "development"
12+
prod-dependencies:
13+
patterns:
14+
- "*"
15+
dependency-type: "production"
16+
ignore:
17+
- dependency-name: "alpinejs"
18+
- dependency-name: "tailwindcss"
19+
- dependency-name: "rollup"
20+
- dependency-name: "edge.js"

.github/workflows/build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ on:
66
branches:
77
- master
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
12+
913
jobs:
1014
build:
1115

1216
runs-on: ubuntu-latest
1317

1418
strategy:
1519
matrix:
16-
node-version: [14.x]
20+
node-version: [22.x]
1721

1822
env:
1923
CI: true
2024

2125
steps:
22-
- name: Cancel Previous Runs
23-
uses: styfle/[email protected]
24-
with:
25-
access_token: ${{ github.token }}
26-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v4
2727
- name: Use Node.js ${{ matrix.node-version }}
2828
uses: actions/setup-node@v1
2929
with:
@@ -35,7 +35,7 @@ jobs:
3535
- name: build
3636
run: npm run package
3737
- name: Archive production artifacts
38-
uses: actions/upload-artifact@v1
38+
uses: actions/upload-artifact@v4
3939
with:
4040
name: alpine-devtools
4141
path: dist
@@ -44,7 +44,7 @@ jobs:
4444
- name: check formatting
4545
run: npm run format
4646
- name: Commit changes
47-
uses: stefanzweifel/git-auto-commit-action@v4
47+
uses: stefanzweifel/git-auto-commit-action@v5
4848
with:
4949
commit_message: Apply formatting changes
5050
# see https://github.com/bahmutov/cypress-gh-action-split-install
@@ -53,13 +53,13 @@ jobs:
5353
# see https://github.com/actions/cache
5454
- name: Cache Cypress
5555
id: cache-cypress
56-
uses: actions/cache@v1
56+
uses: actions/cache@v4
5757
with:
5858
path: ~/.cache/Cypress
5959
key: cypress-cache-v1-${{ runner.os }}-${{ hashFiles('**/package.json') }}
6060
# install Cypress binary
6161
- run: npx cypress install && npx cypress cache list
62-
- uses: cypress-io/github-action@v2
62+
- uses: cypress-io/github-action@v6
6363
with:
6464
start: npm run start:ci
6565
command: npm run cy:run

.husky/pre-commit

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
42
npx lint-staged

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Note that when using the simulator all Chrome/Firefox devtools/Extension APIs ar
7373

7474
We have 2 levels of tests in the project:
7575

76-
- unit tests in [./tests](./tests), written and run with [uvu](https://github.com/lukeed/uvu)
76+
- unit tests in [./tests](./tests), written and run with `node:test`
7777
- The command to run them is `npm test`.
7878
- E2E tests that run against the devtools simulator, in [./cypress](./cypress), using [Cypress](https://cypress.io).
7979
- The command to run Cypress tests is `npm run cy:run`

cypress.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const { defineConfig } = require('cypress')
2+
3+
module.exports = defineConfig({
4+
video: false,
5+
fixturesFolder: false,
6+
chromeWebSecurity: false,
7+
retries: {
8+
runMode: 1,
9+
},
10+
11+
e2e: {
12+
experimentalRunAllSpecs: true,
13+
// TODO: when reworking the tests, we should do 1 test -> multiple assertions
14+
testIsolation: false,
15+
setupNodeEvents(on, config) {},
16+
baseUrl: 'http://localhost:8080',
17+
},
18+
})

cypress.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

cypress/integration/load.js renamed to cypress/e2e/load.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { AlpineVersion } = require('../support/index')
1+
const { AlpineVersion } = require('../support/e2e')
22
it('should load devtools', () => {
33
cy.visit('/')
44
// panel pre-Alpine loaded state
File renamed without changes.
File renamed without changes.
File renamed without changes.

cypress/integration/version.js renamed to cypress/e2e/version.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { AlpineVersion } = require('../support/index')
1+
const { AlpineVersion } = require('../support/e2e')
22

33
function overrideAlpineVersion(win, versionToOverride = undefined) {
44
const postMessage = win.postMessage.bind(win)
File renamed without changes.

cypress/support/e2e.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import './commands'
2+
3+
import { packages } from '../../package-lock.json'
4+
export const AlpineVersion = packages['node_modules/alpinejs'].version

cypress/support/index.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)