@applitools/eyes-storybook 3.55.6 → 3.55.8
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/CHANGELOG.md +199 -0
- package/README.md +1 -1
- package/package.json +9 -9
- package/src/extractEnvironment.js +15 -2
- package/src/utils/determineStorybookVersion.js +26 -15
- package/src/utils/frameworks.js +99 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,204 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.55.8](https://github.com/Applitools-Dev/sdk/compare/js/eyes-storybook@3.55.7...js/eyes-storybook@3.55.8) (2025-07-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Performance Improvements
|
|
7
|
+
|
|
8
|
+
* yarn dedup packages ([#3061](https://github.com/Applitools-Dev/sdk/issues/3061)) ([2fd8951](https://github.com/Applitools-Dev/sdk/commit/2fd8951d6ce9c18a5dbdb648adaa2c454eae9b4e))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* @applitools/dom-snapshot bumped to 4.12.1
|
|
14
|
+
#### Performance Improvements
|
|
15
|
+
|
|
16
|
+
* yarn dedup packages ([#3061](https://github.com/Applitools-Dev/sdk/issues/3061)) ([2fd8951](https://github.com/Applitools-Dev/sdk/commit/2fd8951d6ce9c18a5dbdb648adaa2c454eae9b4e))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
* @applitools/req bumped to 1.7.15
|
|
21
|
+
#### Performance Improvements
|
|
22
|
+
|
|
23
|
+
* yarn dedup packages ([#3061](https://github.com/Applitools-Dev/sdk/issues/3061)) ([2fd8951](https://github.com/Applitools-Dev/sdk/commit/2fd8951d6ce9c18a5dbdb648adaa2c454eae9b4e))
|
|
24
|
+
* @applitools/driver bumped to 1.22.1
|
|
25
|
+
#### Performance Improvements
|
|
26
|
+
|
|
27
|
+
* yarn dedup packages ([#3061](https://github.com/Applitools-Dev/sdk/issues/3061)) ([2fd8951](https://github.com/Applitools-Dev/sdk/commit/2fd8951d6ce9c18a5dbdb648adaa2c454eae9b4e))
|
|
28
|
+
* @applitools/spec-driver-webdriver bumped to 1.3.1
|
|
29
|
+
|
|
30
|
+
* @applitools/spec-driver-puppeteer bumped to 1.5.1
|
|
31
|
+
|
|
32
|
+
* @applitools/screenshoter bumped to 3.11.7
|
|
33
|
+
#### Performance Improvements
|
|
34
|
+
|
|
35
|
+
* yarn dedup packages ([#3061](https://github.com/Applitools-Dev/sdk/issues/3061)) ([2fd8951](https://github.com/Applitools-Dev/sdk/commit/2fd8951d6ce9c18a5dbdb648adaa2c454eae9b4e))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
* @applitools/nml-client bumped to 1.9.7
|
|
40
|
+
#### Performance Improvements
|
|
41
|
+
|
|
42
|
+
* yarn dedup packages ([#3061](https://github.com/Applitools-Dev/sdk/issues/3061)) ([2fd8951](https://github.com/Applitools-Dev/sdk/commit/2fd8951d6ce9c18a5dbdb648adaa2c454eae9b4e))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
* @applitools/tunnel-client bumped to 1.9.0
|
|
47
|
+
#### Features
|
|
48
|
+
|
|
49
|
+
* enable EC healthchecks | AD-10040 ([#3017](https://github.com/Applitools-Dev/sdk/issues/3017)) ([c01c300](https://github.com/Applitools-Dev/sdk/commit/c01c300259427ddae53147a64d30b152960503d9))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
* @applitools/ufg-client bumped to 1.16.14
|
|
54
|
+
#### Performance Improvements
|
|
55
|
+
|
|
56
|
+
* yarn dedup packages ([#3061](https://github.com/Applitools-Dev/sdk/issues/3061)) ([2fd8951](https://github.com/Applitools-Dev/sdk/commit/2fd8951d6ce9c18a5dbdb648adaa2c454eae9b4e))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
* @applitools/core-base bumped to 1.25.6
|
|
61
|
+
#### Performance Improvements
|
|
62
|
+
|
|
63
|
+
* yarn dedup packages ([#3061](https://github.com/Applitools-Dev/sdk/issues/3061)) ([2fd8951](https://github.com/Applitools-Dev/sdk/commit/2fd8951d6ce9c18a5dbdb648adaa2c454eae9b4e))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
* @applitools/ec-client bumped to 1.11.0
|
|
68
|
+
#### Features
|
|
69
|
+
|
|
70
|
+
* enable EC healthchecks | AD-10040 ([#3017](https://github.com/Applitools-Dev/sdk/issues/3017)) ([c01c300](https://github.com/Applitools-Dev/sdk/commit/c01c300259427ddae53147a64d30b152960503d9))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
#### Performance Improvements
|
|
74
|
+
|
|
75
|
+
* yarn dedup packages ([#3061](https://github.com/Applitools-Dev/sdk/issues/3061)) ([2fd8951](https://github.com/Applitools-Dev/sdk/commit/2fd8951d6ce9c18a5dbdb648adaa2c454eae9b4e))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
* @applitools/spec-driver-selenium bumped to 1.6.1
|
|
80
|
+
|
|
81
|
+
* @applitools/core bumped to 4.42.0
|
|
82
|
+
#### Features
|
|
83
|
+
|
|
84
|
+
* enable EC healthchecks | AD-10040 ([#3017](https://github.com/Applitools-Dev/sdk/issues/3017)) ([c01c300](https://github.com/Applitools-Dev/sdk/commit/c01c300259427ddae53147a64d30b152960503d9))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
#### Performance Improvements
|
|
88
|
+
|
|
89
|
+
* yarn dedup packages ([#3061](https://github.com/Applitools-Dev/sdk/issues/3061)) ([2fd8951](https://github.com/Applitools-Dev/sdk/commit/2fd8951d6ce9c18a5dbdb648adaa2c454eae9b4e))
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
* @applitools/eyes bumped to 1.35.2
|
|
94
|
+
#### Performance Improvements
|
|
95
|
+
|
|
96
|
+
* yarn dedup packages ([#3061](https://github.com/Applitools-Dev/sdk/issues/3061)) ([2fd8951](https://github.com/Applitools-Dev/sdk/commit/2fd8951d6ce9c18a5dbdb648adaa2c454eae9b4e))
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
## [3.55.7](https://github.com/Applitools-Dev/sdk/compare/js/eyes-storybook@3.55.6...js/eyes-storybook@3.55.7) (2025-07-07)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Bug Fixes
|
|
105
|
+
|
|
106
|
+
* determine storybook 9 version | AD-10406 ([#3054](https://github.com/Applitools-Dev/sdk/issues/3054)) ([23486bf](https://github.com/Applitools-Dev/sdk/commit/23486bf1c9dc905d243239214e0e838d54c0b3c2))
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Dependencies
|
|
110
|
+
|
|
111
|
+
* @applitools/utils bumped to 1.9.0
|
|
112
|
+
#### Features
|
|
113
|
+
|
|
114
|
+
* support https_proxy and http_proxy env variables | FLD-2702 ([#3046](https://github.com/Applitools-Dev/sdk/issues/3046)) ([0633809](https://github.com/Applitools-Dev/sdk/commit/06338099f44bfb149a5829f62c2f9b19e2392850))
|
|
115
|
+
* @applitools/logger bumped to 2.1.5
|
|
116
|
+
|
|
117
|
+
* @applitools/dom-snapshot bumped to 4.12.0
|
|
118
|
+
#### Features
|
|
119
|
+
|
|
120
|
+
* canvas webgl without preserveDrawingBuffer=1 | FLD-3144 ([#3040](https://github.com/Applitools-Dev/sdk/issues/3040)) ([f82d8f1](https://github.com/Applitools-Dev/sdk/commit/f82d8f148f913098752ec7bef8635a46b453d6fa))
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
#### Bug Fixes
|
|
124
|
+
|
|
125
|
+
* support for programmatically added nested css rules | FLD-3212 ([#3049](https://github.com/Applitools-Dev/sdk/issues/3049)) ([5abb0f7](https://github.com/Applitools-Dev/sdk/commit/5abb0f7904c4d9e4b716291abecad54554b9ca01))
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
* @applitools/socket bumped to 1.2.6
|
|
130
|
+
|
|
131
|
+
* @applitools/req bumped to 1.7.14
|
|
132
|
+
|
|
133
|
+
* @applitools/image bumped to 1.1.21
|
|
134
|
+
|
|
135
|
+
* @applitools/driver bumped to 1.22.0
|
|
136
|
+
#### Features
|
|
137
|
+
|
|
138
|
+
* canvas webgl without preserveDrawingBuffer=1 | FLD-3144 ([#3040](https://github.com/Applitools-Dev/sdk/issues/3040)) ([f82d8f1](https://github.com/Applitools-Dev/sdk/commit/f82d8f148f913098752ec7bef8635a46b453d6fa))
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
* @applitools/spec-driver-webdriver bumped to 1.3.0
|
|
143
|
+
#### Features
|
|
144
|
+
|
|
145
|
+
* canvas webgl without preserveDrawingBuffer=1 | FLD-3144 ([#3040](https://github.com/Applitools-Dev/sdk/issues/3040)) ([f82d8f1](https://github.com/Applitools-Dev/sdk/commit/f82d8f148f913098752ec7bef8635a46b453d6fa))
|
|
146
|
+
* support https_proxy and http_proxy env variables | FLD-2702 ([#3046](https://github.com/Applitools-Dev/sdk/issues/3046)) ([0633809](https://github.com/Applitools-Dev/sdk/commit/06338099f44bfb149a5829f62c2f9b19e2392850))
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
* @applitools/spec-driver-selenium bumped to 1.6.0
|
|
151
|
+
#### Features
|
|
152
|
+
|
|
153
|
+
* canvas webgl without preserveDrawingBuffer=1 | FLD-3144 ([#3040](https://github.com/Applitools-Dev/sdk/issues/3040)) ([f82d8f1](https://github.com/Applitools-Dev/sdk/commit/f82d8f148f913098752ec7bef8635a46b453d6fa))
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
* @applitools/spec-driver-puppeteer bumped to 1.5.0
|
|
158
|
+
#### Features
|
|
159
|
+
|
|
160
|
+
* canvas webgl without preserveDrawingBuffer=1 | FLD-3144 ([#3040](https://github.com/Applitools-Dev/sdk/issues/3040)) ([f82d8f1](https://github.com/Applitools-Dev/sdk/commit/f82d8f148f913098752ec7bef8635a46b453d6fa))
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
* @applitools/screenshoter bumped to 3.11.6
|
|
165
|
+
|
|
166
|
+
* @applitools/nml-client bumped to 1.9.6
|
|
167
|
+
#### Bug Fixes
|
|
168
|
+
|
|
169
|
+
* add retries for ConnectEnomem errors | FLD-3015 ([#3052](https://github.com/Applitools-Dev/sdk/issues/3052)) ([92caa45](https://github.com/Applitools-Dev/sdk/commit/92caa452b4a6d6f86c903548b40f8207a0ed11d0))
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
* @applitools/core-base bumped to 1.25.5
|
|
174
|
+
#### Bug Fixes
|
|
175
|
+
|
|
176
|
+
* add retries for ConnectEnomem errors | FLD-3015 ([#3052](https://github.com/Applitools-Dev/sdk/issues/3052)) ([92caa45](https://github.com/Applitools-Dev/sdk/commit/92caa452b4a6d6f86c903548b40f8207a0ed11d0))
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
* @applitools/tunnel-client bumped to 1.8.1
|
|
181
|
+
|
|
182
|
+
* @applitools/ufg-client bumped to 1.16.13
|
|
183
|
+
|
|
184
|
+
* @applitools/ec-client bumped to 1.10.16
|
|
185
|
+
|
|
186
|
+
* @applitools/core bumped to 4.41.0
|
|
187
|
+
#### Features
|
|
188
|
+
|
|
189
|
+
* canvas webgl without preserveDrawingBuffer=1 | FLD-3144 ([#3040](https://github.com/Applitools-Dev/sdk/issues/3040)) ([f82d8f1](https://github.com/Applitools-Dev/sdk/commit/f82d8f148f913098752ec7bef8635a46b453d6fa))
|
|
190
|
+
* support https_proxy and http_proxy env variables | FLD-2702 ([#3046](https://github.com/Applitools-Dev/sdk/issues/3046)) ([0633809](https://github.com/Applitools-Dev/sdk/commit/06338099f44bfb149a5829f62c2f9b19e2392850))
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
#### Bug Fixes
|
|
194
|
+
|
|
195
|
+
* add retries for ConnectEnomem errors | FLD-3015 ([#3052](https://github.com/Applitools-Dev/sdk/issues/3052)) ([92caa45](https://github.com/Applitools-Dev/sdk/commit/92caa452b4a6d6f86c903548b40f8207a0ed11d0))
|
|
196
|
+
* determine storybook 9 version | AD-10406 ([#3054](https://github.com/Applitools-Dev/sdk/issues/3054)) ([23486bf](https://github.com/Applitools-Dev/sdk/commit/23486bf1c9dc905d243239214e0e838d54c0b3c2))
|
|
197
|
+
* support for programmatically added nested css rules | FLD-3212 ([#3049](https://github.com/Applitools-Dev/sdk/issues/3049)) ([5abb0f7](https://github.com/Applitools-Dev/sdk/commit/5abb0f7904c4d9e4b716291abecad54554b9ca01))
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
3
202
|
## [3.55.6](https://github.com/Applitools-Dev/sdk/compare/js/eyes-storybook@3.55.5...js/eyes-storybook@3.55.6) (2025-06-15)
|
|
4
203
|
|
|
5
204
|
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Install Eyes-Storybook as a local dev dependency in your tested project:
|
|
|
10
10
|
npm install --save-dev @applitools/eyes-storybook
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
### Entering the Applitools API key
|
|
13
|
+
### Entering the Applitools API key
|
|
14
14
|
|
|
15
15
|
To authenticate via the Applitools server and run tests, you need to set the environment variable `APPLITOOLS_API_KEY` to the API key provided from Applitools Eyes. For details on how to retrieve your API key, see [the Applitools documentation](https://applitools.com/tutorials/getting-started/retrieve-api-key).
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-storybook",
|
|
3
|
-
"version": "3.55.
|
|
3
|
+
"version": "3.55.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -53,21 +53,21 @@
|
|
|
53
53
|
"up:framework": "cd test/fixtures/storybook-versions/${APPLITOOLS_FRAMEWORK_VERSION} && npm ci"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@applitools/core": "4.
|
|
57
|
-
"@applitools/driver": "1.
|
|
58
|
-
"@applitools/eyes": "1.35.
|
|
56
|
+
"@applitools/core": "4.42.0",
|
|
57
|
+
"@applitools/driver": "1.22.1",
|
|
58
|
+
"@applitools/eyes": "1.35.2",
|
|
59
59
|
"@applitools/functional-commons": "1.6.0",
|
|
60
|
-
"@applitools/logger": "2.1.
|
|
60
|
+
"@applitools/logger": "2.1.5",
|
|
61
61
|
"@applitools/monitoring-commons": "1.0.19",
|
|
62
|
-
"@applitools/spec-driver-puppeteer": "1.
|
|
63
|
-
"@applitools/ufg-client": "1.16.
|
|
64
|
-
"@applitools/utils": "1.
|
|
62
|
+
"@applitools/spec-driver-puppeteer": "1.5.1",
|
|
63
|
+
"@applitools/ufg-client": "1.16.14",
|
|
64
|
+
"@applitools/utils": "1.9.0",
|
|
65
65
|
"boxen": "4.2.0",
|
|
66
66
|
"chalk": "3.0.0",
|
|
67
67
|
"detect-port": "1.3.0",
|
|
68
68
|
"lodash": "4.17.21",
|
|
69
69
|
"ora": "3.4.0",
|
|
70
|
-
"puppeteer": "
|
|
70
|
+
"puppeteer": "24.11.1",
|
|
71
71
|
"semver": "7.6.2",
|
|
72
72
|
"strip-ansi": "6.0.0",
|
|
73
73
|
"throat": "6.0.2",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const {getStorybookFrameworks} = require('./utils/frameworks');
|
|
2
|
+
|
|
1
3
|
function extractEnvironment() {
|
|
2
4
|
const versions = {};
|
|
3
5
|
try {
|
|
@@ -8,8 +10,19 @@ function extractEnvironment() {
|
|
|
8
10
|
}
|
|
9
11
|
let sdk;
|
|
10
12
|
try {
|
|
11
|
-
const {
|
|
12
|
-
|
|
13
|
+
const {
|
|
14
|
+
name,
|
|
15
|
+
version,
|
|
16
|
+
dependencies,
|
|
17
|
+
devDependencies,
|
|
18
|
+
peerDependencies,
|
|
19
|
+
} = require('../package.json');
|
|
20
|
+
const {frameworksCommaSeparated: framework, dependencyFrameworks} = getStorybookFrameworks(
|
|
21
|
+
dependencies,
|
|
22
|
+
devDependencies,
|
|
23
|
+
peerDependencies,
|
|
24
|
+
);
|
|
25
|
+
sdk = {lang: 'js', name, currentVersion: version, framework, dependencyFrameworks};
|
|
13
26
|
} catch {
|
|
14
27
|
// NOTE: ignore error
|
|
15
28
|
}
|
|
@@ -7,25 +7,36 @@ async function determineStorybookVersion({packagePath, isWindows}) {
|
|
|
7
7
|
let sbArg, storybookPath;
|
|
8
8
|
|
|
9
9
|
const commandV6 = 'start-storybook' + (isWindows ? '.cmd' : '');
|
|
10
|
-
const commandV7 = 'sb' + (isWindows ? '.cmd' : '');
|
|
11
|
-
const
|
|
12
|
-
const storybookPathV7 = resolve(packagePath, 'node_modules/.bin', commandV7);
|
|
10
|
+
const commandV7 = 'sb' + (isWindows ? '.cmd' : ''); // works for v8
|
|
11
|
+
const commandV9 = 'storybook' + (isWindows ? '.cmd' : '');
|
|
13
12
|
|
|
14
|
-
// first we look for the binaries in the local node_modules/.bin folder
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
storybookPath = await findNpmModuleCommandPath(commandV6, packagePath);
|
|
23
|
-
if (!storybookPath) {
|
|
24
|
-
storybookPath = await findNpmModuleCommandPath(commandV7, packagePath);
|
|
25
|
-
sbArg = 'dev';
|
|
13
|
+
// first we look for the binaries in the local node_modules/.bin folder,
|
|
14
|
+
// in case there are multiple versions of storybook installed
|
|
15
|
+
for (const command of [commandV6, commandV7, commandV9]) {
|
|
16
|
+
const storybookPathCommand = resolve(packagePath, 'node_modules/.bin', command);
|
|
17
|
+
if (fs.existsSync(storybookPathCommand)) {
|
|
18
|
+
storybookPath = storybookPathCommand;
|
|
19
|
+
sbArg = command === commandV6 ? '' : 'dev';
|
|
20
|
+
break;
|
|
26
21
|
}
|
|
27
22
|
}
|
|
28
23
|
|
|
24
|
+
// the binary is not in the local node_modules/.bin folder,
|
|
25
|
+
// so we need to find it, we do a fallback search up the tree
|
|
26
|
+
if (!storybookPath) {
|
|
27
|
+
for (const command of [commandV6, commandV7, commandV9]) {
|
|
28
|
+
storybookPath = await findNpmModuleCommandPath(command, packagePath);
|
|
29
|
+
if (storybookPath) {
|
|
30
|
+
sbArg = command === commandV6 ? '' : 'dev';
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!storybookPath) {
|
|
37
|
+
throw new Error('Unable to determine storybook version, storybook path not found');
|
|
38
|
+
}
|
|
39
|
+
|
|
29
40
|
const sbVersion = execSync(`"${storybookPath}" ${sbArg ?? ''} --version`).toString();
|
|
30
41
|
return {storybookPath, sbVersion, sbArg};
|
|
31
42
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
const thirdPartyFrameworks = ['storybook-solidjs-vite', 'storybook-framework-qwik'];
|
|
2
|
+
|
|
3
|
+
const storybookFrameworks = [
|
|
4
|
+
'@storybook/angular',
|
|
5
|
+
'@storybook/ember',
|
|
6
|
+
'@storybook/html-vite',
|
|
7
|
+
'@storybook/nextjs-vite',
|
|
8
|
+
'@storybook/nextjs',
|
|
9
|
+
'@storybook/preact-vite',
|
|
10
|
+
'@storybook/react-native-web-vite',
|
|
11
|
+
'@storybook/react-vite',
|
|
12
|
+
'@storybook/react-webpack5',
|
|
13
|
+
'@storybook/server-webpack5',
|
|
14
|
+
'@storybook/svelte-vite',
|
|
15
|
+
'@storybook/sveltekit',
|
|
16
|
+
'@storybook/vue3-vite',
|
|
17
|
+
'@storybook/web-components-vite',
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
const storybookRenderers = [
|
|
21
|
+
'@storybook/html',
|
|
22
|
+
'@storybook/preact',
|
|
23
|
+
'@storybook/react',
|
|
24
|
+
'@storybook/server',
|
|
25
|
+
'@storybook/svelte',
|
|
26
|
+
'@storybook/vue3',
|
|
27
|
+
'@storybook/web-components',
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
// Superset list of frameworks (ignoring vite, webpack, kit, etc.)
|
|
31
|
+
const frameworksSuperset = [
|
|
32
|
+
'angular',
|
|
33
|
+
'ember',
|
|
34
|
+
'html',
|
|
35
|
+
'nextjs',
|
|
36
|
+
'preact',
|
|
37
|
+
'react',
|
|
38
|
+
'react-native-web',
|
|
39
|
+
'server',
|
|
40
|
+
'svelte',
|
|
41
|
+
'sveltekit',
|
|
42
|
+
'vue3',
|
|
43
|
+
'web-components',
|
|
44
|
+
'solidjs',
|
|
45
|
+
'qwik',
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
const mapFrameworksToSuperset = {
|
|
49
|
+
'@storybook/angular': 'angular',
|
|
50
|
+
'@storybook/ember': 'ember',
|
|
51
|
+
'@storybook/html-vite': 'html',
|
|
52
|
+
'@storybook/nextjs-vite': 'nextjs',
|
|
53
|
+
'@storybook/nextjs': 'nextjs',
|
|
54
|
+
'@storybook/preact-vite': 'preact',
|
|
55
|
+
'@storybook/react-native-web-vite': 'react-native-web',
|
|
56
|
+
'@storybook/react-vite': 'react',
|
|
57
|
+
'@storybook/react-webpack5': 'react',
|
|
58
|
+
'@storybook/server-webpack5': 'server',
|
|
59
|
+
'@storybook/svelte-vite': 'svelte',
|
|
60
|
+
'@storybook/sveltekit': 'sveltekit',
|
|
61
|
+
'@storybook/vue3-vite': 'vue3',
|
|
62
|
+
'@storybook/web-components-vite': 'web-components',
|
|
63
|
+
'@storybook/html': 'html',
|
|
64
|
+
'@storybook/preact': 'preact',
|
|
65
|
+
'@storybook/react': 'react',
|
|
66
|
+
'@storybook/server': 'server',
|
|
67
|
+
'@storybook/svelte': 'svelte',
|
|
68
|
+
'@storybook/vue3': 'vue3',
|
|
69
|
+
'@storybook/web-components': 'web-components',
|
|
70
|
+
'storybook-solidjs-vite': 'solidjs',
|
|
71
|
+
'storybook-framework-qwik': 'qwik',
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const reduceFrameworks = fw => {
|
|
75
|
+
const reducedSet = new Set();
|
|
76
|
+
fw.forEach(element => {
|
|
77
|
+
const mapped = mapFrameworksToSuperset[element];
|
|
78
|
+
if (mapped) reducedSet.add(mapped);
|
|
79
|
+
});
|
|
80
|
+
return Array.from(reducedSet);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const frameworksSet = new Set([
|
|
84
|
+
...thirdPartyFrameworks,
|
|
85
|
+
...storybookFrameworks,
|
|
86
|
+
...storybookRenderers,
|
|
87
|
+
]);
|
|
88
|
+
|
|
89
|
+
function getStorybookFrameworks(dependencies = {}, devDependencies = {}, peerDependencies = {}) {
|
|
90
|
+
const allDeps = Object.assign({}, dependencies, devDependencies, peerDependencies);
|
|
91
|
+
const dependencyFrameworks = Object.keys(allDeps).filter(dep => frameworksSet.has(dep));
|
|
92
|
+
const superSet = reduceFrameworks(dependencyFrameworks);
|
|
93
|
+
return {frameworksCommaSeparated: superSet.join(','), dependencyFrameworks};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
module.exports = {
|
|
97
|
+
frameworksSuperset,
|
|
98
|
+
getStorybookFrameworks,
|
|
99
|
+
};
|