@argos-ci/playwright 7.7.0 → 7.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +3 -1
- package/dist/reporter.mjs +3 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -179,6 +179,12 @@ export declare function getCSPScriptHash(): string;
|
|
|
179
179
|
type MetadataConfig = {
|
|
180
180
|
sdk: ScreenshotMetadata["sdk"];
|
|
181
181
|
playwrightLibraries: string[];
|
|
182
|
+
/**
|
|
183
|
+
* Automation library resolved by the SDK itself, which wins over
|
|
184
|
+
* `playwrightLibraries`: for packages this one cannot resolve from its own
|
|
185
|
+
* install location, like a user's Storybook under strict package managers.
|
|
186
|
+
*/
|
|
187
|
+
automationLibrary?: ScreenshotMetadata["automationLibrary"];
|
|
182
188
|
url?: string;
|
|
183
189
|
test?: ScreenshotMetadata["test"];
|
|
184
190
|
story?: ScreenshotMetadata["story"];
|
package/dist/index.mjs
CHANGED
|
@@ -43,7 +43,9 @@ function getMetadataOverrides() {
|
|
|
43
43
|
* Get the name and version of the automation library.
|
|
44
44
|
*/
|
|
45
45
|
async function getAutomationLibraryMetadata() {
|
|
46
|
-
const
|
|
46
|
+
const metadataConfig = metadataConfigStorage.getStore();
|
|
47
|
+
if (metadataConfig?.automationLibrary) return metadataConfig.automationLibrary;
|
|
48
|
+
const libraries = metadataConfig?.playwrightLibraries ?? DEFAULT_PLAYWRIGHT_LIBRARIES;
|
|
47
49
|
for (const name of libraries) {
|
|
48
50
|
const pkgPath = tryResolve(`${name}/package.json`);
|
|
49
51
|
if (pkgPath) return {
|
package/dist/reporter.mjs
CHANGED
|
@@ -33,7 +33,9 @@ const DEFAULT_PLAYWRIGHT_LIBRARIES = [
|
|
|
33
33
|
* Get the name and version of the automation library.
|
|
34
34
|
*/
|
|
35
35
|
async function getAutomationLibraryMetadata() {
|
|
36
|
-
const
|
|
36
|
+
const metadataConfig = metadataConfigStorage.getStore();
|
|
37
|
+
if (metadataConfig?.automationLibrary) return metadataConfig.automationLibrary;
|
|
38
|
+
const libraries = metadataConfig?.playwrightLibraries ?? DEFAULT_PLAYWRIGHT_LIBRARIES;
|
|
37
39
|
for (const name of libraries) {
|
|
38
40
|
const pkgPath = tryResolve(`${name}/package.json`);
|
|
39
41
|
if (pkgPath) return {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/playwright",
|
|
3
3
|
"description": "Playwright SDK for visual testing with Argos.",
|
|
4
|
-
"version": "7.7.
|
|
4
|
+
"version": "7.7.1",
|
|
5
5
|
"author": "Smooth Code",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@argos-ci/browser": "6.5.0",
|
|
51
|
-
"@argos-ci/core": "6.8.
|
|
52
|
-
"@argos-ci/util": "4.2.
|
|
51
|
+
"@argos-ci/core": "6.8.7",
|
|
52
|
+
"@argos-ci/util": "4.2.2",
|
|
53
53
|
"chalk": "^6.0.1",
|
|
54
54
|
"debug": "^4.4.3"
|
|
55
55
|
},
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"lint": "eslint .",
|
|
70
70
|
"test": "vitest src"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "e9d0b2fb39001683230eff86f9c39e0016b5cf27"
|
|
73
73
|
}
|