@percy/cli 1.27.0 → 1.27.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/bin/run.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // DO NOT REMOVE: Update NODE_ENV for executable
3
4
  // ensure that we're running within a supported node version
4
5
  if (parseInt(process.version.split('.')[0].substring(1), 10) < 14) {
5
6
  console.error(`Node ${process.version} is not supported. Percy only ` + (
package/dist/commands.js CHANGED
@@ -96,6 +96,13 @@ function importLegacyCommands(commandsPath) {
96
96
  }
97
97
  });
98
98
  }
99
+ function formatFilepath(filepath) {
100
+ /* istanbul ignore next */
101
+ if (!process.platform.startsWith('win')) {
102
+ filepath = '/' + filepath;
103
+ }
104
+ return filepath;
105
+ }
99
106
 
100
107
  // Imports and returns compatibile CLI commands from various sources
101
108
  export async function importCommands() {
@@ -144,7 +151,13 @@ export async function importCommands() {
144
151
  pkgs.set(pkg.name, () => Promise.all(pkg['@percy/cli'].commands.map(async cmdPath => {
145
152
  var _module$default;
146
153
  let modulePath = path.join(pkgPath, cmdPath);
147
- let module = await import(url.pathToFileURL(modulePath).href);
154
+ // Below code is used in scripts/build.sh to update href
155
+ let module = null;
156
+ if (process.env.NODE_ENV === 'executable') {
157
+ module = await import(formatFilepath(modulePath));
158
+ } else {
159
+ module = await import(url.pathToFileURL(modulePath).href);
160
+ }
148
161
  (_module$default = module.default).packageInformation || (_module$default.packageInformation = pkg);
149
162
  return module.default;
150
163
  })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/cli",
3
- "version": "1.27.0",
3
+ "version": "1.27.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,15 +31,15 @@
31
31
  "test:coverage": "yarn test --coverage"
32
32
  },
33
33
  "dependencies": {
34
- "@percy/cli-app": "1.27.0",
35
- "@percy/cli-build": "1.27.0",
36
- "@percy/cli-command": "1.27.0",
37
- "@percy/cli-config": "1.27.0",
38
- "@percy/cli-exec": "1.27.0",
39
- "@percy/cli-snapshot": "1.27.0",
40
- "@percy/cli-upload": "1.27.0",
41
- "@percy/client": "1.27.0",
42
- "@percy/logger": "1.27.0"
34
+ "@percy/cli-app": "1.27.1",
35
+ "@percy/cli-build": "1.27.1",
36
+ "@percy/cli-command": "1.27.1",
37
+ "@percy/cli-config": "1.27.1",
38
+ "@percy/cli-exec": "1.27.1",
39
+ "@percy/cli-snapshot": "1.27.1",
40
+ "@percy/cli-upload": "1.27.1",
41
+ "@percy/client": "1.27.1",
42
+ "@percy/logger": "1.27.1"
43
43
  },
44
- "gitHead": "3b92a894d4cf6dcdedccf42b86aaf61f331535c6"
44
+ "gitHead": "a6f6441483b9c092ee1de1832f53c9a774968202"
45
45
  }