@applitools/core 4.50.0 → 4.50.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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.50.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.50.0...js/core@4.50.1) (2025-10-09)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * various config fixes for storybook-addon ([#3257](https://github.com/Applitools-Dev/sdk/issues/3257)) ([86fd4d1](https://github.com/Applitools-Dev/sdk/commit/86fd4d114122bbaf675b5fa361b0e967595ca296))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/dom-snapshot bumped to 4.13.9
14
+ #### Bug Fixes
15
+
16
+ * verbose Unknown CSS object model logging | AD-11542 | FLD-3687 ([#3261](https://github.com/Applitools-Dev/sdk/issues/3261)) ([ba85d32](https://github.com/Applitools-Dev/sdk/commit/ba85d3287a81af109db1a7b407e5ead20f395d9f))
17
+ * @applitools/nml-client bumped to 1.11.8
18
+
19
+ * @applitools/core-base bumped to 1.28.2
20
+ #### Bug Fixes
21
+
22
+ * various config fixes for storybook-addon ([#3257](https://github.com/Applitools-Dev/sdk/issues/3257)) ([86fd4d1](https://github.com/Applitools-Dev/sdk/commit/86fd4d114122bbaf675b5fa361b0e967595ca296))
23
+ * @applitools/ec-client bumped to 1.12.10
24
+
25
+
3
26
  ## [4.50.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.49.0...js/core@4.50.0) (2025-10-08)
4
27
 
5
28
 
package/dist/open-eyes.js CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getLatestCommitInfoFromEnvVars = exports.makeOpenEyes = void 0;
26
+ exports.handleConcurrency = exports.getLatestCommitInfoFromEnvVars = exports.makeOpenEyes = void 0;
27
27
  const driver_1 = require("@applitools/driver");
28
28
  const core_1 = require("./classic/core");
29
29
  const core_2 = require("./ufg/core");
@@ -105,27 +105,14 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, removeDup
105
105
  }
106
106
  const account = await core.getAccountInfo({ settings: eyesServerSettings, logger });
107
107
  const componentConcurrency = account.serverConcurrency.componentConcurrency;
108
- // TODO remove this hacky override `useServerConcurrency` once we want to override for all SDKs
109
- // remember when implementing: other SDKs use session concurrency, not component concurrency like storybook
110
- if (useServerConcurrency) {
111
- if (concurrency && concurrency < componentConcurrency) {
112
- if (shouldPrintConcurrencyWarning) {
113
- // TODO make this warning more generic
114
- logger.console.warn(`Eyes Storybook "testConcurrency" explicitly set to ${concurrency}, which is lower than your available limit of ${componentConcurrency}. Using the lower value as requested.`);
115
- }
116
- settings.sessionConcurrency = concurrency;
117
- }
118
- else {
119
- settings.sessionConcurrency = componentConcurrency;
120
- if (concurrency && shouldPrintConcurrencyWarning) {
121
- logger.console.warn(`Overriding user-defined "testConcurrency". Using organization concurrency limit from Eyes server: ${settings.sessionConcurrency}`);
122
- }
123
- }
124
- shouldPrintConcurrencyWarning = false;
125
- }
126
- else {
127
- settings.sessionConcurrency = concurrency !== null && concurrency !== void 0 ? concurrency : types_1.DEFAULT_CONCURRENCY;
128
- }
108
+ settings.sessionConcurrency = handleConcurrency({
109
+ userConcurrency: concurrency,
110
+ componentConcurrency,
111
+ useServerConcurrency,
112
+ shouldPrintConcurrencyWarning,
113
+ logger,
114
+ });
115
+ shouldPrintConcurrencyWarning = false;
129
116
  void core.logEvent({
130
117
  settings: {
131
118
  ...settings,
@@ -282,3 +269,35 @@ exports.getLatestCommitInfoFromEnvVars = getLatestCommitInfoFromEnvVars;
282
269
  function isRealBatchId(batchId) {
283
270
  return !!batchId && !batchId.startsWith('generated');
284
271
  }
272
+ function handleConcurrency({ userConcurrency, componentConcurrency, useServerConcurrency, shouldPrintConcurrencyWarning, logger, }) {
273
+ let sessionConcurrency;
274
+ // if user concurrency is 0 or negative, we ignore it and use server concurrency or default
275
+ if (userConcurrency !== undefined && userConcurrency <= 0) {
276
+ if (shouldPrintConcurrencyWarning) {
277
+ logger.console.warn(`"testConcurrency" is invalid. Using server concurrency or default concurrency instead.`);
278
+ }
279
+ userConcurrency = undefined;
280
+ }
281
+ // TODO only eyes-storybook uses this hacky override `useServerConcurrency`, not all SDKs
282
+ // remember when implementing for all SDKs: other SDKs use session concurrency, not component concurrency like storybook
283
+ if (useServerConcurrency) {
284
+ if (userConcurrency && userConcurrency < componentConcurrency) {
285
+ if (shouldPrintConcurrencyWarning) {
286
+ // TODO make this warning more generic
287
+ logger.console.warn(`Eyes Storybook "testConcurrency" explicitly set to ${userConcurrency}, which is lower than your available limit of ${componentConcurrency}. Using the lower value as requested.`);
288
+ }
289
+ sessionConcurrency = userConcurrency;
290
+ }
291
+ else {
292
+ sessionConcurrency = componentConcurrency;
293
+ if (userConcurrency && shouldPrintConcurrencyWarning) {
294
+ logger.console.warn(`Overriding user-defined "testConcurrency". Using organization concurrency limit from Eyes server: ${sessionConcurrency}`);
295
+ }
296
+ }
297
+ }
298
+ else {
299
+ sessionConcurrency = userConcurrency !== null && userConcurrency !== void 0 ? userConcurrency : types_1.DEFAULT_CONCURRENCY;
300
+ }
301
+ return sessionConcurrency;
302
+ }
303
+ exports.handleConcurrency = handleConcurrency;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/core",
3
- "version": "4.50.0",
3
+ "version": "4.50.1",
4
4
  "homepage": "https://applitools.com",
5
5
  "bugs": {
6
6
  "url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
@@ -79,13 +79,13 @@
79
79
  }
80
80
  },
81
81
  "dependencies": {
82
- "@applitools/core-base": "1.28.1",
82
+ "@applitools/core-base": "1.28.2",
83
83
  "@applitools/dom-capture": "11.6.5",
84
- "@applitools/dom-snapshot": "4.13.8",
84
+ "@applitools/dom-snapshot": "4.13.9",
85
85
  "@applitools/driver": "1.23.5",
86
- "@applitools/ec-client": "1.12.9",
86
+ "@applitools/ec-client": "1.12.10",
87
87
  "@applitools/logger": "2.2.4",
88
- "@applitools/nml-client": "1.11.7",
88
+ "@applitools/nml-client": "1.11.8",
89
89
  "@applitools/req": "1.8.4",
90
90
  "@applitools/screenshoter": "3.12.6",
91
91
  "@applitools/snippets": "2.7.0",
@@ -34,4 +34,11 @@ export declare function getLatestCommitInfoFromEnvVars(logger: Logger): {
34
34
  timestamp: string;
35
35
  sha: string;
36
36
  } | undefined;
37
+ export declare function handleConcurrency({ userConcurrency, componentConcurrency, useServerConcurrency, shouldPrintConcurrencyWarning, logger, }: {
38
+ userConcurrency: number | undefined;
39
+ componentConcurrency: number;
40
+ useServerConcurrency: boolean;
41
+ shouldPrintConcurrencyWarning: boolean;
42
+ logger: Logger;
43
+ }): number;
37
44
  export {};