@percy/cli 1.27.0 → 1.27.1-beta.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/bin/run.cjs +1 -0
- package/dist/commands.js +14 -1
- package/package.json +12 -12
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
|
-
|
|
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-beta.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public",
|
|
12
|
-
"tag": "
|
|
12
|
+
"tag": "beta"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"bin",
|
|
@@ -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-beta.0",
|
|
35
|
+
"@percy/cli-build": "1.27.1-beta.0",
|
|
36
|
+
"@percy/cli-command": "1.27.1-beta.0",
|
|
37
|
+
"@percy/cli-config": "1.27.1-beta.0",
|
|
38
|
+
"@percy/cli-exec": "1.27.1-beta.0",
|
|
39
|
+
"@percy/cli-snapshot": "1.27.1-beta.0",
|
|
40
|
+
"@percy/cli-upload": "1.27.1-beta.0",
|
|
41
|
+
"@percy/client": "1.27.1-beta.0",
|
|
42
|
+
"@percy/logger": "1.27.1-beta.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "fc67a213ca35419285cba8a8eb563cf5b4958420"
|
|
45
45
|
}
|