@cronn/element-snapshot 0.24.0 → 0.25.0
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/README.md +2 -4
- package/dist/index.mjs +6 -4
- package/package.json +7 -7
package/README.md
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -140,8 +140,7 @@ var SemanticSnapshotTransformer = class {
|
|
|
140
140
|
return this.transformedSnapshot(role, children.length === 1 ? children.at(0) : children);
|
|
141
141
|
}
|
|
142
142
|
const { role, name, attributes, children } = normalizedSnapshot;
|
|
143
|
-
return this.transformedSnapshot(role, {
|
|
144
|
-
name: name.length === 0 ? void 0 : name,
|
|
143
|
+
return this.transformedSnapshot(role, name, {
|
|
145
144
|
...attributes,
|
|
146
145
|
children: children.length === 0 ? void 0 : children
|
|
147
146
|
});
|
|
@@ -185,8 +184,11 @@ var SemanticSnapshotTransformer = class {
|
|
|
185
184
|
}
|
|
186
185
|
return attributes[name];
|
|
187
186
|
}
|
|
188
|
-
transformedSnapshot(role,
|
|
189
|
-
return {
|
|
187
|
+
transformedSnapshot(role, nameOrContent, additionalProperties) {
|
|
188
|
+
return {
|
|
189
|
+
[role]: nameOrContent,
|
|
190
|
+
...additionalProperties
|
|
191
|
+
};
|
|
190
192
|
}
|
|
191
193
|
};
|
|
192
194
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cronn/element-snapshot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Element snapshots for Playwright",
|
|
5
5
|
"homepage": "https://cronn.github.io/file-snapshots/playwright/element-snapshots/",
|
|
6
6
|
"bugs": {
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"@vitest/coverage-v8": "4.1.10",
|
|
38
38
|
"eslint": "10.7.0",
|
|
39
39
|
"eslint-config-prettier": "10.1.8",
|
|
40
|
-
"eslint-plugin-check-file": "3.3.
|
|
40
|
+
"eslint-plugin-check-file": "3.3.2",
|
|
41
41
|
"eslint-plugin-unused-imports": "4.4.1",
|
|
42
42
|
"publint": "0.3.21",
|
|
43
43
|
"rimraf": "6.1.3",
|
|
44
|
-
"tsdown": "0.22.
|
|
44
|
+
"tsdown": "0.22.12",
|
|
45
45
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
46
|
-
"typescript-eslint": "8.
|
|
46
|
+
"typescript-eslint": "8.64.0",
|
|
47
47
|
"vitest": "4.1.10",
|
|
48
48
|
"node": "runtime:24.18.0",
|
|
49
49
|
"@cronn/shared-configs": "0.0.0",
|
|
50
|
-
"@cronn/
|
|
51
|
-
"@cronn/
|
|
50
|
+
"@cronn/test-utils": "0.0.0",
|
|
51
|
+
"@cronn/vitest-file-snapshots": "2.1.2"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@playwright/test": "^1.55"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"devEngines": {
|
|
57
57
|
"packageManager": {
|
|
58
58
|
"name": "pnpm",
|
|
59
|
-
"version": "11.
|
|
59
|
+
"version": "11.17.0",
|
|
60
60
|
"onFail": "download"
|
|
61
61
|
},
|
|
62
62
|
"runtime": {
|