@percy/cli 1.28.9 → 1.29.1-alpha.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/commands.js +13 -1
- package/package.json +12 -12
package/dist/commands.js
CHANGED
|
@@ -103,6 +103,18 @@ function formatFilepath(filepath) {
|
|
|
103
103
|
}
|
|
104
104
|
return filepath;
|
|
105
105
|
}
|
|
106
|
+
export function getSiblings(root) {
|
|
107
|
+
const siblings = [path.join(root, '..')];
|
|
108
|
+
|
|
109
|
+
// Check if Percy CLI is installed using '.pnpm' by searching
|
|
110
|
+
// ffor the .pnpm folder in the root path
|
|
111
|
+
const nodeModulesIndex = root.indexOf('.pnpm');
|
|
112
|
+
if (nodeModulesIndex !== -1) {
|
|
113
|
+
// add the parent directory of the .pnpm and append /@percy
|
|
114
|
+
siblings.push(path.join(root.substring(0, nodeModulesIndex), '@percy'));
|
|
115
|
+
}
|
|
116
|
+
return siblings;
|
|
117
|
+
}
|
|
106
118
|
|
|
107
119
|
// Imports and returns compatibile CLI commands from various sources
|
|
108
120
|
export async function importCommands() {
|
|
@@ -113,7 +125,7 @@ export async function importCommands() {
|
|
|
113
125
|
// find included dependencies
|
|
114
126
|
root,
|
|
115
127
|
// find potential sibling packages
|
|
116
|
-
|
|
128
|
+
...getSiblings(root),
|
|
117
129
|
// find any current project dependencies
|
|
118
130
|
process.cwd()]), async (roots, dir) => {
|
|
119
131
|
if (fs.existsSync(path.join(dir, 'package.json'))) roots.push(dir);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.1-alpha.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": "alpha"
|
|
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.
|
|
35
|
-
"@percy/cli-build": "1.
|
|
36
|
-
"@percy/cli-command": "1.
|
|
37
|
-
"@percy/cli-config": "1.
|
|
38
|
-
"@percy/cli-exec": "1.
|
|
39
|
-
"@percy/cli-snapshot": "1.
|
|
40
|
-
"@percy/cli-upload": "1.
|
|
41
|
-
"@percy/client": "1.
|
|
42
|
-
"@percy/logger": "1.
|
|
34
|
+
"@percy/cli-app": "1.29.1-alpha.0",
|
|
35
|
+
"@percy/cli-build": "1.29.1-alpha.0",
|
|
36
|
+
"@percy/cli-command": "1.29.1-alpha.0",
|
|
37
|
+
"@percy/cli-config": "1.29.1-alpha.0",
|
|
38
|
+
"@percy/cli-exec": "1.29.1-alpha.0",
|
|
39
|
+
"@percy/cli-snapshot": "1.29.1-alpha.0",
|
|
40
|
+
"@percy/cli-upload": "1.29.1-alpha.0",
|
|
41
|
+
"@percy/client": "1.29.1-alpha.0",
|
|
42
|
+
"@percy/logger": "1.29.1-alpha.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "5044adb5caa7507fdec629eda8f33d6ddde07997"
|
|
45
45
|
}
|