@applitools/core 4.51.0 → 4.53.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/CHANGELOG.md CHANGED
@@ -1,5 +1,146 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.53.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.52.0...js/core@4.53.0) (2025-11-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * disable heartbeats whenever no tests are running ([#3344](https://github.com/Applitools-Dev/sdk/issues/3344)) ([b66d28a](https://github.com/Applitools-Dev/sdk/commit/b66d28a7a382f26b68de70c8633c027cb4bdf225))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * better nml error messages ([#3311](https://github.com/Applitools-Dev/sdk/issues/3311)) ([3deea01](https://github.com/Applitools-Dev/sdk/commit/3deea0130636c44573adc919b95c1c99e6d194f1))
14
+ * fails to create test with coded dynamic region | AD-11074 ([#3361](https://github.com/Applitools-Dev/sdk/issues/3361)) ([7f8c8cd](https://github.com/Applitools-Dev/sdk/commit/7f8c8cd85c0cd2e5861cd33fbc29c465903258d5))
15
+ * resolved an issue with `matchTimeout` changing `retryTimeout` ([f656f59](https://github.com/Applitools-Dev/sdk/commit/f656f59dbfb7c41fdb569fbc56d2e9daecefb854))
16
+
17
+
18
+ ### Dependencies
19
+
20
+ * @applitools/utils bumped to 1.14.0
21
+ #### Features
22
+
23
+ * disable heartbeats whenever no tests are running ([#3344](https://github.com/Applitools-Dev/sdk/issues/3344)) ([b66d28a](https://github.com/Applitools-Dev/sdk/commit/b66d28a7a382f26b68de70c8633c027cb4bdf225))
24
+ * @applitools/nml-client bumped to 1.11.11
25
+ #### Bug Fixes
26
+
27
+ * better nml error messages ([#3311](https://github.com/Applitools-Dev/sdk/issues/3311)) ([3deea01](https://github.com/Applitools-Dev/sdk/commit/3deea0130636c44573adc919b95c1c99e6d194f1))
28
+
29
+
30
+
31
+ * @applitools/logger bumped to 2.2.6
32
+
33
+ * @applitools/dom-snapshot bumped to 4.15.1
34
+
35
+ * @applitools/socket bumped to 1.3.7
36
+
37
+ * @applitools/req bumped to 1.8.6
38
+
39
+ * @applitools/image bumped to 1.2.5
40
+
41
+ * @applitools/dom-capture bumped to 11.6.7
42
+
43
+ * @applitools/driver bumped to 1.24.2
44
+
45
+ * @applitools/spec-driver-webdriver bumped to 1.5.2
46
+
47
+ * @applitools/spec-driver-selenium bumped to 1.7.8
48
+
49
+ * @applitools/spec-driver-puppeteer bumped to 1.6.8
50
+
51
+ * @applitools/screenshoter bumped to 3.12.9
52
+
53
+ * @applitools/tunnel-client bumped to 1.11.4
54
+
55
+ * @applitools/ufg-client bumped to 1.18.2
56
+
57
+ * @applitools/core-base bumped to 1.30.0
58
+ #### Features
59
+
60
+ * disable heartbeats whenever no tests are running ([#3344](https://github.com/Applitools-Dev/sdk/issues/3344)) ([b66d28a](https://github.com/Applitools-Dev/sdk/commit/b66d28a7a382f26b68de70c8633c027cb4bdf225))
61
+
62
+
63
+ #### Bug Fixes
64
+
65
+ * fails to create test with coded dynamic region | AD-11074 ([#3361](https://github.com/Applitools-Dev/sdk/issues/3361)) ([7f8c8cd](https://github.com/Applitools-Dev/sdk/commit/7f8c8cd85c0cd2e5861cd33fbc29c465903258d5))
66
+ * resolved an issue with `matchTimeout` changing `retryTimeout` ([f656f59](https://github.com/Applitools-Dev/sdk/commit/f656f59dbfb7c41fdb569fbc56d2e9daecefb854))
67
+
68
+
69
+
70
+ * @applitools/ec-client bumped to 1.12.13
71
+
72
+ * @applitools/test-server bumped to 1.3.5
73
+
74
+
75
+ ## [4.52.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.51.0...js/core@4.52.0) (2025-11-09)
76
+
77
+
78
+ ### Features
79
+
80
+ * restart cache and keepalive | FLD-3773 ([#3326](https://github.com/Applitools-Dev/sdk/issues/3326)) ([0fd12ca](https://github.com/Applitools-Dev/sdk/commit/0fd12ca703b4546560b563076a38f9ada24acc75))
81
+
82
+
83
+ ### Performance Improvements
84
+
85
+ * remove dynamic loading of Dom capture and Dom snapshot ([#3322](https://github.com/Applitools-Dev/sdk/issues/3322)) ([7d15ee9](https://github.com/Applitools-Dev/sdk/commit/7d15ee98d5d39c7e478b6bfe3e14b8eea93937e5))
86
+
87
+
88
+ ### Dependencies
89
+
90
+ * @applitools/utils bumped to 1.13.0
91
+ #### Features
92
+
93
+ * restart cache and keepalive | FLD-3773 ([#3326](https://github.com/Applitools-Dev/sdk/issues/3326)) ([0fd12ca](https://github.com/Applitools-Dev/sdk/commit/0fd12ca703b4546560b563076a38f9ada24acc75))
94
+ * @applitools/dom-snapshot bumped to 4.15.0
95
+ #### Features
96
+
97
+ * add support for adopted stylesheets with nesting | FLD-3212 ([#3325](https://github.com/Applitools-Dev/sdk/issues/3325)) ([8587926](https://github.com/Applitools-Dev/sdk/commit/8587926b0d6ef820cfbd8f89ddb062a3d77f65ab))
98
+
99
+
100
+
101
+ * @applitools/dom-capture bumped to 11.6.6
102
+ #### Performance Improvements
103
+
104
+ * remove dynamic loading of Dom capture and Dom snapshot ([#3322](https://github.com/Applitools-Dev/sdk/issues/3322)) ([7d15ee9](https://github.com/Applitools-Dev/sdk/commit/7d15ee98d5d39c7e478b6bfe3e14b8eea93937e5))
105
+
106
+
107
+
108
+ * @applitools/logger bumped to 2.2.5
109
+
110
+ * @applitools/socket bumped to 1.3.6
111
+
112
+ * @applitools/req bumped to 1.8.5
113
+
114
+ * @applitools/image bumped to 1.2.4
115
+
116
+ * @applitools/driver bumped to 1.24.1
117
+
118
+ * @applitools/spec-driver-webdriver bumped to 1.5.1
119
+
120
+ * @applitools/spec-driver-selenium bumped to 1.7.7
121
+
122
+ * @applitools/spec-driver-puppeteer bumped to 1.6.7
123
+
124
+ * @applitools/screenshoter bumped to 3.12.8
125
+
126
+ * @applitools/nml-client bumped to 1.11.10
127
+
128
+ * @applitools/tunnel-client bumped to 1.11.3
129
+
130
+ * @applitools/ufg-client bumped to 1.18.1
131
+
132
+ * @applitools/core-base bumped to 1.29.0
133
+ #### Features
134
+
135
+ * restart cache and keepalive | FLD-3773 ([#3326](https://github.com/Applitools-Dev/sdk/issues/3326)) ([0fd12ca](https://github.com/Applitools-Dev/sdk/commit/0fd12ca703b4546560b563076a38f9ada24acc75))
136
+
137
+
138
+
139
+ * @applitools/ec-client bumped to 1.12.12
140
+
141
+ * @applitools/test-server bumped to 1.3.4
142
+
143
+
3
144
  ## [4.51.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.50.4...js/core@4.51.0) (2025-11-03)
4
145
 
5
146
 
package/dist/check.js CHANGED
@@ -56,7 +56,7 @@ function makeCheck({ type: defaultType = 'classic', eyes, target: defaultTarget,
56
56
  !utils.types.isEmpty(settings.accessibilitySettings));
57
57
  (_h = settings.autProxy) !== null && _h !== void 0 ? _h : (settings.autProxy = eyes.test.eyesServer.proxy);
58
58
  (_j = settings.useDom) !== null && _j !== void 0 ? _j : (settings.useDom = false);
59
- (_k = (_r = settings).retryTimeout) !== null && _k !== void 0 ? _k : (_r.retryTimeout = 0);
59
+ (_k = (_r = settings).matchTimeout) !== null && _k !== void 0 ? _k : (_r.matchTimeout = 0);
60
60
  settings.lazyLoad = settings.lazyLoad === true ? {} : settings.lazyLoad;
61
61
  if (settings.lazyLoad) {
62
62
  (_l = (_s = settings.lazyLoad).scrollLength) !== null && _l !== void 0 ? _l : (_s.scrollLength = defaults_1.DEFAULT_LAZY_LOAD.scrollLength);
@@ -55,16 +55,16 @@ function makeCheck({ eyes, target: defaultTarget, environments: defaultEnvironme
55
55
  let driver = undefined;
56
56
  if ((0, driver_1.isDriver)(target, spec)) {
57
57
  driver = await (0, driver_1.makeDriver)({ spec, driver: target, reset: target === defaultTarget, logger });
58
- if (settings.retryTimeout) {
59
- // when retry timeout is set, retry checking until it passes or timeout is reached. This will stall the client test execution until it passes or timeout is reached to prevent the test from continuing and changing the state of the app
60
- logger.log(`Retry timeout is set to ${settings.retryTimeout}ms - will retry checking until it passes or timeout is reached`);
58
+ if (settings.matchTimeout) {
59
+ // when match timeout is set, retry checking until it passes or timeout is reached. This will stall the client test execution until it passes or timeout is reached to prevent the test from continuing and changing the state of the app
60
+ logger.log(`Match timeout is set to ${settings.matchTimeout}ms - will retry checking until it passes or timeout is reached`);
61
61
  const start = Date.now();
62
62
  const environmentLogger = logger.extend({ tags: [`environment-${utils.general.shortid()}`] });
63
63
  // this getter actually open the eyes session if it's not already open
64
64
  const baseEyes = await Promise.all(uniqueEnvironments.map(environment => getBaseEyes({ environment, driver, logger: environmentLogger })));
65
65
  // if the test is new for any of the environments, we wait for the page to stabaliize before starting the checks. This should prevent us from creating a baseline with a loading spinner or something similar
66
66
  if (baseEyes.map(baseEye => baseEye.test.isNew).some(isNew => isNew)) {
67
- await new Promise(resolve => setTimeout(resolve, settings.retryTimeout));
67
+ await new Promise(resolve => setTimeout(resolve, settings.matchTimeout));
68
68
  }
69
69
  let asExpected = false, retries = 0;
70
70
  do {
@@ -93,12 +93,12 @@ function makeCheck({ eyes, target: defaultTarget, environments: defaultEnvironme
93
93
  putInStorage(exactEnvironment, eyes, Promise.resolve());
94
94
  });
95
95
  }
96
- } while (!asExpected && Date.now() - start < settings.retryTimeout);
96
+ } while (!asExpected && Date.now() - start < settings.matchTimeout);
97
97
  }
98
98
  else {
99
99
  // generate base targets (images to be compared) and settings for each environment
100
100
  const baseScreenshotsAndSettings = await generateBaseScreenshotsAndSettings(settings, uniqueEnvironments, eyes, logger, driver);
101
- // when no retry timeout is set, queue all environment checks against the server without stalling the client test execution
101
+ // when no match timeout is set, queue all environment checks against the server without stalling the client test execution
102
102
  baseScreenshotsAndSettings.forEach(({ exactEnvironment: environment, baseSetting, baseTarget }) => {
103
103
  checkInTheBackground(environment, baseTarget, baseSetting);
104
104
  });
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.takeDomCapture = void 0;
4
4
  const req_1 = require("@applitools/req");
5
- const { getCaptureDomPoll, getPollResult, getCaptureDomPollForIE, getPollResultForIE, } = require('@applitools/dom-capture');
5
+ const { captureDomPoll, pollResult, captureDomPollForIE, pollResultForIE } = require('@applitools/dom-capture');
6
6
  async function takeDomCapture({ driver, settings, logger, }) {
7
7
  var _a;
8
8
  const environment = await driver.getEnvironment();
@@ -15,11 +15,11 @@ async function takeDomCapture({ driver, settings, logger, }) {
15
15
  };
16
16
  const scripts = {
17
17
  main: features.canExecuteOnlyFunctionScripts
18
- ? require('@applitools/dom-capture').captureDomPoll
19
- : `return (${isLegacyBrowser ? await getCaptureDomPollForIE() : await getCaptureDomPoll()}).apply(null, arguments);`,
18
+ ? captureDomPoll
19
+ : `/* @applitools/dom-capture */return (${isLegacyBrowser ? captureDomPollForIE : captureDomPoll}).apply(null, arguments);`,
20
20
  poll: features.canExecuteOnlyFunctionScripts
21
- ? require('@applitools/dom-capture').pollResult
22
- : `return (${isLegacyBrowser ? await getPollResultForIE() : await getPollResult()}).apply(null, arguments);`,
21
+ ? pollResult
22
+ : `/* @applitools/dom-capture */return (${isLegacyBrowser ? pollResultForIE : pollResult}).apply(null, arguments);`,
23
23
  };
24
24
  const url = await driver.getUrl();
25
25
  const dom = await captureContextDom(driver.mainContext);
@@ -339,8 +339,11 @@ async function runOfflineSnapshots(options) {
339
339
  logger: checkLogger,
340
340
  heartbeat: {
341
341
  processId: '',
342
- startPeriodicHeartbeatMessaging(settings) {
343
- logger.log('heartbeat is not used (offline)', settings);
342
+ acquire(settings) {
343
+ logger.log('acquire | heartbeat is not used (offline)', settings);
344
+ },
345
+ release() {
346
+ logger.log('release | heartbeat is not used (offline)');
344
347
  },
345
348
  },
346
349
  });
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.takeDomSnapshot = void 0;
27
27
  const utils = __importStar(require("@applitools/utils"));
28
- const { getProcessPagePoll, getPollResult } = require('@applitools/dom-snapshot');
28
+ const { processPagePoll, pollResult } = require('@applitools/dom-snapshot');
29
29
  async function takeDomSnapshot({ context, settings, logger, }) {
30
30
  var _a, _b;
31
31
  const driver = context.driver;
@@ -57,11 +57,11 @@ async function takeDomSnapshot({ context, settings, logger, }) {
57
57
  };
58
58
  const scripts = {
59
59
  main: features.canExecuteOnlyFunctionScripts
60
- ? require('@applitools/dom-snapshot').processPagePoll
61
- : `return (${await getProcessPagePoll()}).apply(null, arguments);`,
60
+ ? processPagePoll
61
+ : `/* @applitools/dom-snapshot@1 */ return (${processPagePoll}).apply(null, arguments);`,
62
62
  poll: features.canExecuteOnlyFunctionScripts
63
- ? require('@applitools/dom-snapshot').pollResult
64
- : `return (${await getPollResult()}).apply(null, arguments);`,
63
+ ? pollResult
64
+ : `/* @applitools/dom-snapshot@1 */ return (${pollResult}).apply(null, arguments);`,
65
65
  };
66
66
  const snapshot = await context.executePoll(scripts, {
67
67
  main: arg,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/core",
3
- "version": "4.51.0",
3
+ "version": "4.53.0",
4
4
  "homepage": "https://applitools.com",
5
5
  "bugs": {
6
6
  "url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
@@ -79,20 +79,20 @@
79
79
  }
80
80
  },
81
81
  "dependencies": {
82
- "@applitools/core-base": "1.28.2",
83
- "@applitools/dom-capture": "11.6.5",
84
- "@applitools/dom-snapshot": "4.14.0",
85
- "@applitools/driver": "1.24.0",
86
- "@applitools/ec-client": "1.12.11",
87
- "@applitools/logger": "2.2.4",
88
- "@applitools/nml-client": "1.11.9",
89
- "@applitools/req": "1.8.4",
90
- "@applitools/screenshoter": "3.12.7",
82
+ "@applitools/core-base": "1.30.0",
83
+ "@applitools/dom-capture": "11.6.7",
84
+ "@applitools/dom-snapshot": "4.15.1",
85
+ "@applitools/driver": "1.24.2",
86
+ "@applitools/ec-client": "1.12.13",
87
+ "@applitools/logger": "2.2.6",
88
+ "@applitools/nml-client": "1.11.11",
89
+ "@applitools/req": "1.8.6",
90
+ "@applitools/screenshoter": "3.12.9",
91
91
  "@applitools/snippets": "2.7.0",
92
- "@applitools/socket": "1.3.5",
93
- "@applitools/spec-driver-webdriver": "1.5.0",
94
- "@applitools/ufg-client": "1.18.0",
95
- "@applitools/utils": "1.12.0",
92
+ "@applitools/socket": "1.3.7",
93
+ "@applitools/spec-driver-webdriver": "1.5.2",
94
+ "@applitools/ufg-client": "1.18.2",
95
+ "@applitools/utils": "1.14.0",
96
96
  "@types/ws": "8.5.5",
97
97
  "abort-controller": "3.0.0",
98
98
  "chalk": "4.1.2",
@@ -106,11 +106,11 @@
106
106
  "devDependencies": {
107
107
  "@applitools/bongo": "^5.10.0",
108
108
  "@applitools/sea": "^1.0.0",
109
- "@applitools/spec-driver-puppeteer": "^1.6.6",
110
- "@applitools/spec-driver-selenium": "^1.7.6",
111
- "@applitools/test-server": "^1.3.3",
109
+ "@applitools/spec-driver-puppeteer": "^1.6.8",
110
+ "@applitools/spec-driver-selenium": "^1.7.8",
111
+ "@applitools/test-server": "^1.3.5",
112
112
  "@applitools/test-utils": "^1.5.17",
113
- "@applitools/tunnel-client": "^1.11.2",
113
+ "@applitools/tunnel-client": "^1.11.4",
114
114
  "@types/mocha": "^10.0.7",
115
115
  "@types/node": "^12.20.55",
116
116
  "@types/selenium-webdriver": "^4.1.2",
@@ -17,7 +17,7 @@ export declare function makeCheckAndClose<TSpec extends SpecType>({ eyes, target
17
17
  settings?: (BaseCheckSettings<utils.Region | import("@applitools/driver").ElementReference<TSpec>> & import("./types").ScreenshotSettings<TSpec> & {
18
18
  environments?: Environment[] | undefined;
19
19
  } & {
20
- retryTimeout?: number | undefined;
20
+ matchTimeout?: number | undefined;
21
21
  } & BaseCloseSettings & {
22
22
  environments?: Environment[] | undefined;
23
23
  }) | undefined;
@@ -30,5 +30,5 @@ export type OpenSettings = AutomationCore.OpenSettings & {
30
30
  keepPlatformNameAsIs?: boolean;
31
31
  };
32
32
  export type CheckSettings<TSpec extends SpecType> = AutomationCore.CheckSettings<TSpec> & {
33
- retryTimeout?: number;
33
+ matchTimeout?: number;
34
34
  };
@@ -10,5 +10,6 @@ export declare function makeGetECClient({ logger: mainLogger }: Options): (({ se
10
10
  getCachedValues(): Promise<ECClient>[];
11
11
  setCachedValue(key: any, value: Promise<ECClient>): void;
12
12
  clearCache(): void;
13
+ TTL?: number | undefined;
13
14
  };
14
15
  export {};
@@ -14,5 +14,6 @@ export declare function makeGetUFGClient({ client, fetchConcurrency, offlineLoca
14
14
  getCachedValues(): Promise<UFGClient>[];
15
15
  setCachedValue(key: any, value: Promise<UFGClient>): void;
16
16
  clearCache(): void;
17
+ TTL?: number | undefined;
17
18
  };
18
19
  export {};
@@ -29,11 +29,13 @@ export declare const extractLatestCommitInfo: (({ execOptions, logger, }: Extrac
29
29
  sha: string;
30
30
  } | undefined>): void;
31
31
  clearCache(): void;
32
+ TTL?: number | undefined;
32
33
  };
33
34
  export declare const extractGitBranch: (({ execOptions, logger }: Options) => Promise<string | undefined>) & {
34
35
  getCachedValues(): Promise<string | undefined>[];
35
36
  setCachedValue(key: any, value: Promise<string | undefined>): void;
36
37
  clearCache(): void;
38
+ TTL?: number | undefined;
37
39
  };
38
40
  export declare const extractGitRepo: (({ execOptions, logger }: Options) => Promise<{
39
41
  name?: string;
@@ -48,12 +50,14 @@ export declare const extractGitRepo: (({ execOptions, logger }: Options) => Prom
48
50
  owner?: string | undefined;
49
51
  }>): void;
50
52
  clearCache(): void;
53
+ TTL?: number | undefined;
51
54
  };
52
55
  export declare function extractBuildIdFromCI(): Promise<string | undefined>;
53
56
  export declare const extractBranchingTimestamp: (({ branchName, parentBranchName, execOptions, logger, }: ExtractGitBranchingTimestampOptions) => Promise<string | undefined>) & {
54
57
  getCachedValues(): Promise<string | undefined>[];
55
58
  setCachedValue(key: any, value: Promise<string | undefined>): void;
56
59
  clearCache(): void;
60
+ TTL?: number | undefined;
57
61
  };
58
62
  export declare function isISODate(str: string): boolean;
59
63
  export {};
@@ -4,26 +4,31 @@ declare const extractors: {
4
4
  getCachedValues(): Promise<string>[];
5
5
  setCachedValue(key: any, value: Promise<string>): void;
6
6
  clearCache(): void;
7
+ TTL?: number | undefined;
7
8
  };
8
9
  java: typeof extractLatestJavaPackageVersion & {
9
10
  getCachedValues(): Promise<string>[];
10
11
  setCachedValue(key: any, value: Promise<string>): void;
11
12
  clearCache(): void;
13
+ TTL?: number | undefined;
12
14
  };
13
15
  dotnet: typeof extractLatestDotNetPackageVersion & {
14
16
  getCachedValues(): Promise<string>[];
15
17
  setCachedValue(key: any, value: Promise<string>): void;
16
18
  clearCache(): void;
19
+ TTL?: number | undefined;
17
20
  };
18
21
  python: typeof extractLatestPythonPackageVersion & {
19
22
  getCachedValues(): Promise<string>[];
20
23
  setCachedValue(key: any, value: Promise<string>): void;
21
24
  clearCache(): void;
25
+ TTL?: number | undefined;
22
26
  };
23
27
  ruby: typeof extractLatestRubyPackageVersion & {
24
28
  getCachedValues(): Promise<string>[];
25
29
  setCachedValue(key: any, value: Promise<string>): void;
26
30
  clearCache(): void;
31
+ TTL?: number | undefined;
27
32
  };
28
33
  };
29
34
  export declare function validateSdkVersion(sdk: {