@applitools/core 4.74.0 → 4.74.2

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,87 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.74.2](https://github.com/Applitools-Dev/sdk/compare/js/core@4.74.1...js/core@4.74.2) (2026-11-04)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * bound PR-head git fetch + skip under ignoreGitBranching | AD-17125 ([#4381](https://github.com/Applitools-Dev/sdk/issues/4381)) ([0a496de](https://github.com/Applitools-Dev/sdk/commit/0a496dec85dead514988bd15b265f028d4461b00))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/logger bumped to 2.3.3
14
+ #### Bug Fixes
15
+
16
+ * ignore empty and non-string mask values | AD-17629 ([#4403](https://github.com/Applitools-Dev/sdk/issues/4403)) ([01cdbf1](https://github.com/Applitools-Dev/sdk/commit/01cdbf15f562044636783401e341bda581927589))
17
+ * @applitools/dom-snapshot bumped to 4.18.9
18
+ #### Bug Fixes
19
+
20
+ * keep the value of the all shorthand on Chrome 148+ | AD-17608 ([#4408](https://github.com/Applitools-Dev/sdk/issues/4408)) ([4488308](https://github.com/Applitools-Dev/sdk/commit/448830893cd605150ac046bd874555feea95b006))
21
+
22
+
23
+
24
+ * @applitools/socket bumped to 1.3.19
25
+
26
+ * @applitools/dom-capture bumped to 11.8.11
27
+ #### Bug Fixes
28
+
29
+ * stop marking elements under partial or transparent overlays as hidden | FLD-5180 ([#4407](https://github.com/Applitools-Dev/sdk/issues/4407)) ([ecf0979](https://github.com/Applitools-Dev/sdk/commit/ecf0979a7ca101fcf0c7287b192e7b68b8caacb3))
30
+
31
+
32
+
33
+ * @applitools/req bumped to 1.11.7
34
+
35
+ * @applitools/image bumped to 1.3.5
36
+
37
+ * @applitools/driver bumped to 1.26.15
38
+
39
+ * @applitools/spec-driver-webdriver bumped to 1.6.15
40
+
41
+ * @applitools/spec-driver-selenium bumped to 1.8.15
42
+
43
+ * @applitools/spec-driver-playwright bumped to 1.9.15
44
+
45
+ * @applitools/spec-driver-puppeteer bumped to 1.8.15
46
+
47
+ * @applitools/screenshoter bumped to 3.12.37
48
+
49
+ * @applitools/nml-client bumped to 1.12.12
50
+
51
+ * @applitools/tunnel-client bumped to 1.12.10
52
+
53
+ * @applitools/ufg-client bumped to 1.25.1
54
+
55
+ * @applitools/core-base bumped to 1.41.5
56
+
57
+ * @applitools/ec-client bumped to 1.12.56
58
+
59
+ * @applitools/test-server bumped to 1.4.9
60
+
61
+
62
+ ## [4.74.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.74.0...js/core@4.74.1) (2026-11-02)
63
+
64
+
65
+ ### Bug Fixes
66
+
67
+ * restore the viewport and tear down the media guard when a breakpoint snapshot fails | FLD-4800 ([#4355](https://github.com/Applitools-Dev/sdk/issues/4355)) ([fac0583](https://github.com/Applitools-Dev/sdk/commit/fac0583425f2e5714ab9ed3c7afcb79ea85c6e6f))
68
+
69
+
70
+ ### Dependencies
71
+
72
+ * @applitools/nml-client bumped to 1.12.11
73
+
74
+ * @applitools/tunnel-client bumped to 1.12.9
75
+ #### Bug Fixes
76
+
77
+ * stop leaking tunnel services and sessions | FLD-5000 ([#4344](https://github.com/Applitools-Dev/sdk/issues/4344)) ([0dd225d](https://github.com/Applitools-Dev/sdk/commit/0dd225d95382d32ebcc03e8a85b23a176bf75d6a))
78
+ * @applitools/core-base bumped to 1.41.4
79
+ #### Bug Fixes
80
+
81
+ * mask presigned URL credentials from renderinfo when MASK_LOG is on | AD-17356 ([#4385](https://github.com/Applitools-Dev/sdk/issues/4385)) ([7dceaf6](https://github.com/Applitools-Dev/sdk/commit/7dceaf67410bd46cc9e356de14abe0024f326d4f))
82
+ * @applitools/ec-client bumped to 1.12.55
83
+
84
+
3
85
  ## [4.74.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.73.3...js/core@4.74.0) (2026-11-01)
4
86
 
5
87
 
package/dist/open-eyes.js CHANGED
@@ -93,7 +93,11 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, removeDup
93
93
  (_t = settings.ignoreBaseline) !== null && _t !== void 0 ? _t : (settings.ignoreBaseline = false);
94
94
  (_u = settings.compareWithParentBranch) !== null && _u !== void 0 ? _u : (settings.compareWithParentBranch = false);
95
95
  (_v = settings.removeDuplicateTests) !== null && _v !== void 0 ? _v : (settings.removeDuplicateTests = removeDuplicateTests);
96
- (_w = settings.latestCommitInfo) !== null && _w !== void 0 ? _w : (settings.latestCommitInfo = await (0, extract_git_info_1.extractLatestCommitInfo)({ execOptions: { cwd }, logger }));
96
+ (_w = settings.latestCommitInfo) !== null && _w !== void 0 ? _w : (settings.latestCommitInfo = await (0, extract_git_info_1.extractLatestCommitInfo)({
97
+ execOptions: { cwd },
98
+ logger,
99
+ ignoreGitBranching: settings.ignoreGitBranching,
100
+ }));
97
101
  if (settings.latestCommitInfo && !(0, extract_git_info_1.isISODate)(settings.latestCommitInfo.timestamp)) {
98
102
  logger.warn(`latestCommitInfo.timestamp is an invalid ISO date string: ${settings.latestCommitInfo.timestamp}`);
99
103
  settings.latestCommitInfo = undefined;
@@ -39,6 +39,8 @@ const chalk_1 = __importDefault(require("chalk"));
39
39
  const utils = __importStar(require("@applitools/utils"));
40
40
  const lang = __importStar(require("../../lang"));
41
41
  __exportStar(require("./take-dom-snapshot"), exports);
42
+ /** Time limit for each cleanup step after a snapshot error. The call is not cancelled and may finish later. */
43
+ const CLEANUP_TIMEOUT_MS = 3000;
42
44
  async function takeDomSnapshots({ driver, settings, hooks, provides, logger, }) {
43
45
  var _a, _b;
44
46
  // calculating cookies here once so that we (a) don't do it for each dom snapshot, and (b) do it before generating safe selectors
@@ -93,6 +95,7 @@ async function takeDomSnapshots({ driver, settings, hooks, provides, logger, })
93
95
  // that rebuilds content on resize would otherwise be captured at the previous breakpoint's width.
94
96
  const previousFocusEmulation = await driver.setFocusEmulation(true);
95
97
  const snapshots = Array(settings.environments.length);
98
+ let loopFailed = false;
96
99
  try {
97
100
  for (const [index, { viewportSize, browsers }] of entries.entries()) {
98
101
  logger.log(`Taking dom snapshot for viewport size ${viewportSize}`);
@@ -135,17 +138,47 @@ async function takeDomSnapshots({ driver, settings, hooks, provides, logger, })
135
138
  browsers.forEach(({ index }) => (snapshots[index] = snapshot));
136
139
  await mediaGuard.afterSnapshot();
137
140
  }
138
- await driver.setViewportSize(initialViewportSize);
141
+ }
142
+ catch (error) {
143
+ loopFailed = true;
144
+ throw error;
139
145
  }
140
146
  finally {
141
- await driver.setFocusEmulation(previousFocusEmulation);
147
+ if (loopFailed) {
148
+ // the tab may be stuck, so no cleanup step may hide the error that stopped the loop or block it
149
+ await cleanupAfterError('restore viewport size', () => driver.setViewportSize(initialViewportSize));
150
+ await cleanupAfterError('restore focus emulation', () => driver.setFocusEmulation(previousFocusEmulation));
151
+ await cleanupAfterError('tear down media guard', () => mediaGuard.teardown());
152
+ }
153
+ else {
154
+ try {
155
+ await driver.setViewportSize(initialViewportSize);
156
+ }
157
+ finally {
158
+ await driver.setFocusEmulation(previousFocusEmulation);
159
+ await mediaGuard.teardown();
160
+ }
161
+ }
142
162
  }
143
- await mediaGuard.teardown();
144
163
  if (settings.layoutBreakpoints.reload) {
145
164
  await driver.reloadPage();
146
165
  await beforeEachSnapshot();
147
166
  }
148
167
  return snapshots;
168
+ async function cleanupAfterError(name, step) {
169
+ let timer;
170
+ const run = Promise.resolve()
171
+ .then(step)
172
+ .catch(error => logger.error(`Failed to ${name} after a snapshot error`, error));
173
+ const limit = new Promise(resolve => {
174
+ timer = setTimeout(() => {
175
+ logger.warn(`Stopped waiting to ${name} after the time limit of ${CLEANUP_TIMEOUT_MS} ms`);
176
+ resolve();
177
+ }, CLEANUP_TIMEOUT_MS);
178
+ });
179
+ await Promise.race([run, limit]);
180
+ clearTimeout(timer);
181
+ }
149
182
  async function beforeEachSnapshot() {
150
183
  var _a, _b;
151
184
  await ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.beforeEachSnapshot) === null || _a === void 0 ? void 0 : _a.call(hooks));
@@ -358,7 +358,7 @@ exports.extractDefaultBranch = utils.general.cachify(async function ({ execOptio
358
358
  logger.log('extractDefaultBranch: falling back to literal "main"');
359
359
  return 'main';
360
360
  }, args => { var _a, _b; return ({ cwd: (_b = (_a = args[0]) === null || _a === void 0 ? void 0 : _a.execOptions) === null || _b === void 0 ? void 0 : _b.cwd }); });
361
- exports.extractLatestCommitInfo = utils.general.cachify(async function ({ execOptions, logger = (0, logger_1.makeLogger)(), }) {
361
+ exports.extractLatestCommitInfo = utils.general.cachify(async function ({ execOptions, logger = (0, logger_1.makeLogger)(), ignoreGitBranching, }) {
362
362
  // Function-entry env gate. Without git or a repo, there is no commit to extract.
363
363
  const env = await (0, exports.checkGitEnvironment)({ execOptions, logger });
364
364
  if (!env.ok) {
@@ -391,9 +391,16 @@ exports.extractLatestCommitInfo = utils.general.cachify(async function ({ execOp
391
391
  }
392
392
  async function extractGithubPullRequestLastCommitSha() {
393
393
  var _a, _b, _c;
394
+ // ignoreGitBranching opts out of the remote git integration; local HEAD still yields commit info.
395
+ if (ignoreGitBranching)
396
+ return;
394
397
  if (((_a = process.env.GITHUB_EVENT_NAME) === null || _a === void 0 ? void 0 : _a.startsWith('pull_request')) && process.env.GITHUB_EVENT_PATH) {
395
398
  const remoteName = await (0, exports.getPrimaryRemoteName)({ execOptions, logger });
396
- await executeWithLog((0, shell_quote_1.quote)(['git', 'fetch', remoteName, '--depth=2']), { execOptions, logger });
399
+ const timeout = utils.general.getEnvValue('APPLITOOLS_GIT_FETCH_TIMEOUT', 'number') || 10000;
400
+ await executeWithLog((0, shell_quote_1.quote)(['git', 'fetch', remoteName, '--depth=2', '--filter=tree:0']), {
401
+ execOptions: { ...execOptions, timeout },
402
+ logger,
403
+ });
397
404
  const event = await fs_1.default.promises.readFile(process.env.GITHUB_EVENT_PATH, 'utf-8').then(JSON.parse);
398
405
  return (_c = (_b = event === null || event === void 0 ? void 0 : event.pull_request) === null || _b === void 0 ? void 0 : _b.head) === null || _c === void 0 ? void 0 : _c.sha;
399
406
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/core",
3
- "version": "4.74.0",
3
+ "version": "4.74.2",
4
4
  "homepage": "https://applitools.com",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": {
@@ -55,19 +55,19 @@
55
55
  "test:ios-simulator": "MOCHA_ONLY_TAGS=ios-simulator MOCHA_GROUP=ios-simulator run --top-level mocha ./test/e2e/classic/webview.spec.ts --exit --require ./test/mocha-global-setup.js"
56
56
  },
57
57
  "dependencies": {
58
- "@applitools/core-base": "1.41.3",
59
- "@applitools/dom-capture": "11.8.10",
60
- "@applitools/dom-snapshot": "4.18.8",
61
- "@applitools/driver": "1.26.14",
62
- "@applitools/ec-client": "1.12.54",
63
- "@applitools/image": "1.3.4",
64
- "@applitools/logger": "2.3.2",
65
- "@applitools/nml-client": "1.12.10",
66
- "@applitools/req": "1.11.6",
67
- "@applitools/screenshoter": "3.12.36",
58
+ "@applitools/core-base": "1.41.5",
59
+ "@applitools/dom-capture": "11.8.11",
60
+ "@applitools/dom-snapshot": "4.18.9",
61
+ "@applitools/driver": "1.26.15",
62
+ "@applitools/ec-client": "1.12.56",
63
+ "@applitools/image": "1.3.5",
64
+ "@applitools/logger": "2.3.3",
65
+ "@applitools/nml-client": "1.12.12",
66
+ "@applitools/req": "1.11.7",
67
+ "@applitools/screenshoter": "3.12.37",
68
68
  "@applitools/snippets": "2.9.10",
69
- "@applitools/socket": "1.3.18",
70
- "@applitools/ufg-client": "1.25.0",
69
+ "@applitools/socket": "1.3.19",
70
+ "@applitools/ufg-client": "1.25.1",
71
71
  "@applitools/utils": "1.15.3",
72
72
  "abort-controller": "3.0.0",
73
73
  "chalk": "4.1.2",
@@ -79,13 +79,13 @@
79
79
  },
80
80
  "devDependencies": {
81
81
  "@applitools/bongo": "^5.10.0",
82
- "@applitools/spec-driver-playwright": "^1.9.14",
83
- "@applitools/spec-driver-puppeteer": "^1.8.14",
84
- "@applitools/spec-driver-selenium": "^1.8.14",
85
- "@applitools/spec-driver-webdriver": "^1.6.14",
86
- "@applitools/test-server": "^1.4.8",
82
+ "@applitools/spec-driver-playwright": "^1.9.15",
83
+ "@applitools/spec-driver-puppeteer": "^1.8.15",
84
+ "@applitools/spec-driver-selenium": "^1.8.15",
85
+ "@applitools/spec-driver-webdriver": "^1.6.15",
86
+ "@applitools/test-server": "^1.4.9",
87
87
  "@applitools/test-utils": "^1.5.17",
88
- "@applitools/tunnel-client": "^1.12.8",
88
+ "@applitools/tunnel-client": "^1.12.10",
89
89
  "@swc-node/register": "^1.6.8",
90
90
  "@types/mocha": "^10.0.7",
91
91
  "@types/node": "^12.20.55",
@@ -16,6 +16,7 @@ type ExtractGitBranchingTimestampOptions = {
16
16
  type ExtractCurrentCommitTimestampOptions = {
17
17
  execOptions?: ExecOptions;
18
18
  logger?: Logger;
19
+ ignoreGitBranching?: boolean;
19
20
  };
20
21
  export declare const cacheKey = "default";
21
22
  /** Primary remote name (cached). Prefers `origin`, else the first remote. */
@@ -114,7 +115,7 @@ export declare const extractDefaultBranch: (({ execOptions, logger }: {
114
115
  clearCache(): void;
115
116
  TTL?: number | undefined;
116
117
  };
117
- export declare const extractLatestCommitInfo: (({ execOptions, logger, }: ExtractCurrentCommitTimestampOptions) => Promise<{
118
+ export declare const extractLatestCommitInfo: (({ execOptions, logger, ignoreGitBranching, }: ExtractCurrentCommitTimestampOptions) => Promise<{
118
119
  timestamp: string;
119
120
  sha: string;
120
121
  } | undefined>) & {