@percy/cli-snapshot 1.6.2 → 1.7.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/dist/snapshot.js +2 -2
- package/package.json +3 -3
package/dist/snapshot.js
CHANGED
|
@@ -147,14 +147,14 @@ function merge(...objs) {
|
|
|
147
147
|
async function loadSnapshotFile(file) {
|
|
148
148
|
let ext = path.extname(file);
|
|
149
149
|
|
|
150
|
-
if (ext
|
|
150
|
+
if (/\.(c|m)?js$/.test(ext)) {
|
|
151
151
|
let {
|
|
152
152
|
default: module
|
|
153
153
|
} = await import(path.resolve(file));
|
|
154
154
|
return typeof module === 'function' ? await module() : module;
|
|
155
155
|
} else if (ext === '.json') {
|
|
156
156
|
return JSON.parse(fs.readFileSync(file, 'utf-8'));
|
|
157
|
-
} else if (
|
|
157
|
+
} else if (/\.ya?ml$/.test(ext)) {
|
|
158
158
|
let {
|
|
159
159
|
default: YAML
|
|
160
160
|
} = await import('yaml');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/cli-snapshot",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@percy/cli-command": "1.
|
|
35
|
+
"@percy/cli-command": "1.7.0",
|
|
36
36
|
"yaml": "^2.0.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "f1418fb1effdaad2d32c65d1a358282ab1f9ec32"
|
|
39
39
|
}
|