@percy/cli-snapshot 1.10.1 → 1.10.2

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.
Files changed (2) hide show
  1. package/dist/snapshot.js +2 -1
  2. package/package.json +3 -3
package/dist/snapshot.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
+ import { pathToFileURL } from 'url';
3
4
  import command from '@percy/cli-command';
4
5
  import * as SnapshotConfig from './config.js';
5
6
  export const snapshot = command('snapshot', {
@@ -153,7 +154,7 @@ async function loadSnapshotFile(file) {
153
154
  if (/\.(c|m)?js$/.test(ext)) {
154
155
  let {
155
156
  default: module
156
- } = await import(path.resolve(file));
157
+ } = await import(pathToFileURL(file));
157
158
  return typeof module === 'function' ? await module() : module;
158
159
  } else if (ext === '.json') {
159
160
  return JSON.parse(fs.readFileSync(file, 'utf-8'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/cli-snapshot",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
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.10.1",
35
+ "@percy/cli-command": "1.10.2",
36
36
  "yaml": "^2.0.0"
37
37
  },
38
- "gitHead": "3e16144300e8b49aab638ceb699630f4be71bb9f"
38
+ "gitHead": "66527175cdac3848157be7dd8368f5845d98e77e"
39
39
  }