Skip to content

Commit 3b42ee4

Browse files
author
Marvin Frachet
authored
fix(deps): failing deps with pnpm (#217)
1 parent 562b909 commit 3b42ee4

File tree

10 files changed

+5235
-12278
lines changed

10 files changed

+5235
-12278
lines changed

packages/lighthouse/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ declare global {
2727
"total-byte-weight"?: number;
2828
"dom-size"?: number;
2929
}
30-
30+
3131
interface Chainable<Subject> {
3232
/**
3333
* Runs a lighthouse audit
@@ -40,4 +40,6 @@ declare global {
4040
}
4141

4242
export declare function lighthouse(): Cypress.Task;
43-
export { prepareAudit } from '@cypress-audit/shared';
43+
export declare function prepareAudit(
44+
launchOptions: Cypress.BrowserLaunchOptions
45+
): void;

packages/lighthouse/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { prepareAudit } = require("@cypress-audit/shared");
1+
const { prepareAudit } = require("./src/prepare-audit");
22
const { lighthouse } = require("./src/task");
33

44
module.exports = { lighthouse, prepareAudit };

packages/lighthouse/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
},
1111
"license": "MIT",
1212
"dependencies": {
13-
"@cypress-audit/shared": "workspace:*",
1413
"lighthouse": "^10.0.2"
1514
},
1615
"scripts": {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ const prepareAudit = (launchOptions) => {
88
} else {
99
console.error(
1010
`[cypress-audit]: Woops, something went wrong when trying to get the browser port. Are sure you run your tests in a chromium based browser?
11-
12-
npx cypress run --browser=chrome
13-
`
11+
12+
npx cypress run --browser=chrome
13+
`
1414
);
1515
}
1616
};

packages/pa11y/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { prepareAudit } = require("@cypress-audit/shared");
1+
const { prepareAudit } = require("./src/prepare-audit");
22
const { pa11y } = require("./src/task");
33

44
module.exports = { pa11y, prepareAudit };

packages/pa11y/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
},
1010
"license": "MIT",
1111
"dependencies": {
12-
"@cypress-audit/shared": "workspace:*",
1312
"pa11y": "^6.2.3"
1413
},
1514
"scripts": {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const prepareAudit = (launchOptions) => {
2+
const remoteDebugging = launchOptions.args.find((config) =>
3+
config.startsWith("--remote-debugging-port")
4+
);
5+
6+
if (remoteDebugging) {
7+
global.cypress_audit_port = remoteDebugging.split("=")[1];
8+
} else {
9+
console.error(
10+
`[cypress-audit]: Woops, something went wrong when trying to get the browser port. Are sure you run your tests in a chromium based browser?
11+
12+
npx cypress run --browser=chrome
13+
`
14+
);
15+
}
16+
};
17+
18+
module.exports = { prepareAudit };

packages/shared/index.d.ts

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

packages/shared/package.json

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

0 commit comments

Comments
 (0)