Skip to content

Commit 356b9ce

Browse files
chore(cli): upgrade to lighthouse v12 & puppeteer v23
BREAKING CHANGES: - Removed Deprecated Lighthouse Budgets - ESM migration with .mts files
2 parents 2c60939 + fe2fa33 commit 356b9ce

File tree

43 files changed

+510
-10404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+510
-10404
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
node-version: [18.x]
13+
node-version: [20.x]
1414
name: Node ${{ matrix.node }}
1515

1616
steps:

.github/workflows/quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
node-version: [ 18.x ]
15+
node-version: [ 20.x ]
1616
name: Node ${{ matrix.node }}
1717

1818
steps:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
node-version: [18.x]
18+
node-version: [20.x]
1919

2020
steps:
2121
- uses: actions/checkout@v4

.github/workflows/user-flow-gh-integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
node-version: [18.x]
9+
node-version: [20.x]
1010
steps:
1111
- uses: actions/checkout@v4
1212
- name: use Node.js ${{ matrix.node-version }}
@@ -19,4 +19,4 @@ jobs:
1919
- name: run:user-flow-action
2020
uses: push-based/user-flow-gh-action@v0.3.2
2121
with:
22-
rcPath: packages/user-flow-gh-integration/.user-flowrc.json
22+
rcPath: examples/github-report/.user-flowrc.json

.github/workflows/user-flow-md-report-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
node-version: [18.x]
13+
node-version: [20.x]
1414
name: Node ${{ matrix.node }}
1515

1616
steps:

budget.json

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

e2e/cli-e2e/tests/__snapshots__/help.e2e.test.ts.snap

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

e2e/cli-e2e/tests/collect/format.e2e.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { join } from 'node:path';
55
import { CliTest, DEFAULT_RC, USER_FLOW_MOCKS } from '../../utils/setup';
66

77
const DUMMY_USER_FLOW_NAME = 'Basic Navigation Example';
8+
const MOCK_MD_REPORT_HEADER = '| Gather Mode | Performance | Accessibility | Best Practices | Seo |';
89

910
describe('collect format', () => {
1011
['html', 'json', 'md'].forEach((format) => {
@@ -33,7 +34,7 @@ describe('collect format', () => {
3334

3435
const { code, stdout, stderr } = await cli.run('user-flow', ['collect']);
3536

36-
expect(stdout).toContain(`| Gather Mode | Performance | Accessibility | Best Practices | Seo | Pwa |`)
37+
expect(stdout).toContain(MOCK_MD_REPORT_HEADER)
3738
expect(stdout).toContain(DUMMY_USER_FLOW_NAME);
3839
expect(stderr).toBe('');
3940
expect(code).toBe(0);
@@ -54,7 +55,7 @@ describe('collect format', () => {
5455
expect(isValidFormatedResult(format, content)).toBeTruthy();
5556
});
5657

57-
expect(stdout).toContain(`| Gather Mode | Performance | Accessibility | Best Practices | Seo | Pwa |`)
58+
expect(stdout).toContain(MOCK_MD_REPORT_HEADER)
5859
expect(stdout).toContain(DUMMY_USER_FLOW_NAME);
5960
expect(stderr).toBe('');
6061
expect(code).toBe(0);
@@ -66,7 +67,7 @@ function isValidFormatedResult(format: string, result: string) {
6667
const isValidFile = {
6768
'html': (report: string) => report.includes(DUMMY_USER_FLOW_NAME),
6869
'json': (report: string) => !!(JSON.parse(report)?.name || '').includes(DUMMY_USER_FLOW_NAME),
69-
'md': (report: string) => report.includes(`| Gather Mode | Performance | Accessibility | Best Practices | Seo | Pwa |`)
70+
'md': (report: string) => report.includes(MOCK_MD_REPORT_HEADER)
7071
};
7172
// @ts-ignore
7273
return isValidFile[format](result);

e2e/cli-e2e/utils/setup.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export const DEFAULT_RC = {
1616
outPath: "./measures",
1717
format: ["html"]
1818
},
19-
assert: {}
2019
};
2120

2221
export const KEYBOARD = {

examples/github-report/tools/md-report-rename.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ console.log(`Rename results for comment action`);
55

66
const path = './examples/github-report/measures';
77

8-
const reportPath = readdirSync(path)[0];
8+
const reportPath = readdirSync(path).find((p) => p.endsWith('.md'));
99

1010
if (!reportPath) {
1111
throw new Error('Report file not found');

0 commit comments

Comments
 (0)