@applitools/core 4.59.1 → 4.59.3

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,169 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.59.3](https://github.com/Applitools-Dev/sdk/compare/js/core@4.59.2...js/core@4.59.3) (2026-04-16)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * pass top-level fallbackBaselineId through UFG render environments | FLD-4292 ([#3763](https://github.com/Applitools-Dev/sdk/issues/3763)) ([8c46c2e](https://github.com/Applitools-Dev/sdk/commit/8c46c2e9cff684c18dbc83f4bf87ee61f4637c8e))
9
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
10
+ * restore logDeprecations and else-if guard in UFG snapshot paths ([#3739](https://github.com/Applitools-Dev/sdk/issues/3739)) ([b487a3a](https://github.com/Applitools-Dev/sdk/commit/b487a3a2747b33ce4d912b9c50eb8ed2bb28672e))
11
+
12
+
13
+ ### Dependencies
14
+
15
+ * @applitools/utils bumped to 1.14.4
16
+ #### Bug Fixes
17
+
18
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
19
+ * @applitools/logger bumped to 2.2.11
20
+ #### Bug Fixes
21
+
22
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
23
+
24
+
25
+
26
+ * @applitools/dom-shared bumped to 1.1.3
27
+ #### Bug Fixes
28
+
29
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
30
+ * @applitools/dom-snapshot bumped to 4.16.4
31
+ #### Bug Fixes
32
+
33
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
34
+
35
+
36
+
37
+ * @applitools/socket bumped to 1.3.12
38
+ #### Bug Fixes
39
+
40
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
41
+
42
+
43
+
44
+ * @applitools/req bumped to 1.9.3
45
+ #### Bug Fixes
46
+
47
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
48
+
49
+
50
+
51
+ * @applitools/image bumped to 1.2.10
52
+ #### Bug Fixes
53
+
54
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
55
+
56
+
57
+
58
+ * @applitools/snippets bumped to 2.8.2
59
+ #### Bug Fixes
60
+
61
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
62
+ * @applitools/dom-capture bumped to 11.7.1
63
+ #### Bug Fixes
64
+
65
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
66
+
67
+
68
+
69
+ * @applitools/driver bumped to 1.25.5
70
+ #### Bug Fixes
71
+
72
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
73
+
74
+
75
+
76
+ * @applitools/spec-driver-webdriver bumped to 1.5.10
77
+ #### Bug Fixes
78
+
79
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
80
+
81
+
82
+
83
+ * @applitools/spec-driver-selenium bumped to 1.7.16
84
+ #### Bug Fixes
85
+
86
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
87
+
88
+
89
+
90
+ * @applitools/spec-driver-puppeteer bumped to 1.7.5
91
+ #### Bug Fixes
92
+
93
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
94
+
95
+
96
+
97
+ * @applitools/screenshoter bumped to 3.12.18
98
+ #### Bug Fixes
99
+
100
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
101
+
102
+
103
+
104
+ * @applitools/nml-client bumped to 1.11.24
105
+ #### Bug Fixes
106
+
107
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
108
+
109
+
110
+
111
+ * @applitools/tunnel-client bumped to 1.11.10
112
+ #### Bug Fixes
113
+
114
+ * prevent listener accumulation causing OOM in tunnel worker | FLD-4423 ([#3761](https://github.com/Applitools-Dev/sdk/issues/3761)) ([85633c3](https://github.com/Applitools-Dev/sdk/commit/85633c3836230e7045a9ff62772631eb2990e32c))
115
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
116
+ * use APPLITOOLS_LOG_DIR as fallback for EG tunnel log directory | FLD-4321 ([#3732](https://github.com/Applitools-Dev/sdk/issues/3732)) ([03a3f60](https://github.com/Applitools-Dev/sdk/commit/03a3f60e9a5cfca066f0f1f07fc56969530cbf8a))
117
+
118
+
119
+
120
+ * @applitools/ufg-client bumped to 1.20.3
121
+ #### Bug Fixes
122
+
123
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
124
+
125
+
126
+
127
+ * @applitools/core-base bumped to 1.32.5
128
+ #### Bug Fixes
129
+
130
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
131
+
132
+
133
+
134
+ * @applitools/ec-client bumped to 1.12.25
135
+ #### Bug Fixes
136
+
137
+ * remediate npm security vulnerabilities (FLD-4179) ([#3764](https://github.com/Applitools-Dev/sdk/issues/3764)) ([4bc0ef9](https://github.com/Applitools-Dev/sdk/commit/4bc0ef915e8ad606627c6074de582bec53397738))
138
+
139
+
140
+
141
+ * @applitools/test-server bumped to 1.4.3
142
+
143
+
144
+ ## [4.59.2](https://github.com/Applitools-Dev/sdk/compare/js/core@4.59.1...js/core@4.59.2) (2026-04-13)
145
+
146
+
147
+ ### Bug Fixes
148
+
149
+ * protect page render target from pointing to html instead of cdt | FLD-4313 ([#3758](https://github.com/Applitools-Dev/sdk/issues/3758)) ([fd8008a](https://github.com/Applitools-Dev/sdk/commit/fd8008af0f6b491d3a3a9dce648bef1c18118b9b))
150
+
151
+
152
+ ### Dependencies
153
+
154
+ * @applitools/dom-snapshot bumped to 4.16.3
155
+ #### Bug Fixes
156
+
157
+ * protect page render target from pointing to html instead of cdt | FLD-4313 ([#3758](https://github.com/Applitools-Dev/sdk/issues/3758)) ([fd8008a](https://github.com/Applitools-Dev/sdk/commit/fd8008af0f6b491d3a3a9dce648bef1c18118b9b))
158
+ * @applitools/nml-client bumped to 1.11.23
159
+ #### Bug Fixes
160
+
161
+ * log nml responses | FLD-4433 ([#3757](https://github.com/Applitools-Dev/sdk/issues/3757)) ([70f0bcd](https://github.com/Applitools-Dev/sdk/commit/70f0bcdaa00b60f6fe8f2177b1713b92c8232c27))
162
+ * @applitools/ufg-client bumped to 1.20.2
163
+ #### Bug Fixes
164
+
165
+ * protect page render target from pointing to html instead of cdt | FLD-4313 ([#3758](https://github.com/Applitools-Dev/sdk/issues/3758)) ([fd8008a](https://github.com/Applitools-Dev/sdk/commit/fd8008af0f6b491d3a3a9dce648bef1c18118b9b))
166
+
3
167
  ## [4.59.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.59.0...js/core@4.59.1) (2026-04-06)
4
168
 
5
169
 
@@ -15,6 +15,7 @@ async function createRenderTargetFromSnapshot({ ufgClient, snapshot, logger, url
15
15
  },
16
16
  proxy: snapshot.account.eyesServer.proxy,
17
17
  autProxy: snapshot.settings.autProxy,
18
+ skipRootHtmlResource: snapshot.settings.skipRootHtmlResource,
18
19
  },
19
20
  logger,
20
21
  });
@@ -40,7 +40,7 @@ function makeGetBaseEyes({ settings: defaultSettings, eyes, logger: mainLogger,
40
40
  });
41
41
  return getBaseEyesWithCache;
42
42
  async function getBaseEyes({ settings, logger = mainLogger, }) {
43
- var _a;
43
+ var _a, _b;
44
44
  logger = logger.extend(mainLogger);
45
45
  logger.log(`Command "getBaseEyes" is called with settings`, settings);
46
46
  const ufgClient = await eyes.core.getUFGClient({
@@ -58,7 +58,7 @@ function makeGetBaseEyes({ settings: defaultSettings, eyes, logger: mainLogger,
58
58
  const baseEyes = await eyes.core.base.openEyes({
59
59
  settings: {
60
60
  ...defaultSettings,
61
- fallbackBaselineId: (_a = settings.environment) === null || _a === void 0 ? void 0 : _a.fallbackBaselineId,
61
+ fallbackBaselineId: (_b = (_a = settings.environment) === null || _a === void 0 ? void 0 : _a.fallbackBaselineId) !== null && _b !== void 0 ? _b : defaultSettings.fallbackBaselineId,
62
62
  environment: {
63
63
  ...defaultSettings.environment,
64
64
  ...environment,
@@ -26,6 +26,7 @@ function makeTakeSnapshots({ core, fetchConcurrency, signal, logger: mainLogger,
26
26
  const { elementReferencesToMark, getGeneratedSelectors } = (0, to_generated_selectors_1.toGeneratedSelectors)({
27
27
  elementReferences,
28
28
  logger,
29
+ logDeprecations,
29
30
  });
30
31
  let snapshots;
31
32
  if (environment.isWeb) {
@@ -46,6 +47,7 @@ function makeTakeSnapshots({ core, fetchConcurrency, signal, logger: mainLogger,
46
47
  layoutBreakpoints: settings.layoutBreakpoints,
47
48
  environments: uniqueEnvironments,
48
49
  skipResources: ufgClient.getCachedResourceUrls(),
50
+ skipRootHtmlResource: settings.skipRootHtmlResource,
49
51
  lazyLoad: settings.lazyLoad,
50
52
  elementReferences: elementReferencesToMark,
51
53
  },
@@ -75,6 +77,7 @@ function makeTakeSnapshots({ core, fetchConcurrency, signal, logger: mainLogger,
75
77
  }
76
78
  }
77
79
  else {
80
+ logDeprecations('takeSnapshots: taking native snapshots is no longer supported. How did you reach this message? (dead code)');
78
81
  throw new Error('Taking native (non-web) snapshots via VisualGridRunner is no longer supported. Please use ClassicRunner for native apps.');
79
82
  }
80
83
  await currentContext.focus();
@@ -111,6 +114,19 @@ function makeTakeSnapshots({ core, fetchConcurrency, signal, logger: mainLogger,
111
114
  title,
112
115
  userAgent,
113
116
  }));
117
+ function logDeprecations(...args) {
118
+ core.logEvent({
119
+ settings: {
120
+ level: 'Error',
121
+ event: {
122
+ type: 'SDK.unreachableCodeReached',
123
+ message: args.join(' '),
124
+ },
125
+ ...account.eyesServer,
126
+ },
127
+ logger,
128
+ });
129
+ }
114
130
  };
115
131
  }
116
132
  exports.makeTakeSnapshots = makeTakeSnapshots;
@@ -47,6 +47,7 @@ async function takeDomSnapshot({ context, settings, logger, }) {
47
47
  const arg = {
48
48
  dontFetchResources: settings === null || settings === void 0 ? void 0 : settings.disableBrowserFetching,
49
49
  skipResources: settings === null || settings === void 0 ? void 0 : settings.skipResources,
50
+ skipRootHtmlResource: settings === null || settings === void 0 ? void 0 : settings.skipRootHtmlResource,
50
51
  fetchConcurrency: settings === null || settings === void 0 ? void 0 : settings.fetchConcurrency,
51
52
  removeReverseProxyURLPrefixes: Boolean(process.env.APPLITOOLS_SCRIPT_REMOVE_REVERSE_PROXY_URL_PREFIXES),
52
53
  chunkByteLength: (_a = settings === null || settings === void 0 ? void 0 : settings.chunkByteLength) !== null && _a !== void 0 ? _a : (Number(process.env.APPLITOOLS_SCRIPT_RESULT_MAX_BYTE_LENGTH) ||
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toGeneratedSelectors = void 0;
4
- function toGeneratedSelectors({ elementReferences, logger, }) {
4
+ function toGeneratedSelectors({ elementReferences, logger, logDeprecations, }) {
5
5
  var _a, _b, _c;
6
6
  const elementReferencesToMark = [
7
7
  (_a = elementReferences.target) !== null && _a !== void 0 ? _a : [],
@@ -51,6 +51,11 @@ function toGeneratedSelectors({ elementReferences, logger, }) {
51
51
  };
52
52
  });
53
53
  }
54
+ else if (target || scrolling || calculate.length) {
55
+ // the entire else statement should be a dead code that was used for NMG, will be removed later
56
+ logDeprecations('toGeneratedSelectors: `transformElementReference` was unexpectedly called.');
57
+ throw new Error('toGeneratedSelectors: `transformElementReference` was unexpectedly called.');
58
+ }
54
59
  return { target, scrolling, calculate };
55
60
  }
56
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/core",
3
- "version": "4.59.1",
3
+ "version": "4.59.3",
4
4
  "homepage": "https://applitools.com",
5
5
  "bugs": {
6
6
  "url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
@@ -60,19 +60,19 @@
60
60
  "setup:standalone": "sh -c 'yarn chromedriver --port=4444 --verbose &'"
61
61
  },
62
62
  "dependencies": {
63
- "@applitools/core-base": "1.32.4",
64
- "@applitools/dom-capture": "11.7.0",
65
- "@applitools/dom-snapshot": "4.16.2",
66
- "@applitools/driver": "1.25.4",
67
- "@applitools/ec-client": "1.12.24",
68
- "@applitools/logger": "2.2.10",
69
- "@applitools/nml-client": "1.11.22",
70
- "@applitools/req": "1.9.2",
71
- "@applitools/screenshoter": "3.12.17",
72
- "@applitools/snippets": "2.8.1",
73
- "@applitools/socket": "1.3.11",
74
- "@applitools/ufg-client": "1.20.1",
75
- "@applitools/utils": "1.14.3",
63
+ "@applitools/core-base": "1.32.5",
64
+ "@applitools/dom-capture": "11.7.1",
65
+ "@applitools/dom-snapshot": "4.16.4",
66
+ "@applitools/driver": "1.25.5",
67
+ "@applitools/ec-client": "1.12.25",
68
+ "@applitools/logger": "2.2.11",
69
+ "@applitools/nml-client": "1.11.24",
70
+ "@applitools/req": "1.9.3",
71
+ "@applitools/screenshoter": "3.12.18",
72
+ "@applitools/snippets": "2.8.2",
73
+ "@applitools/socket": "1.3.12",
74
+ "@applitools/ufg-client": "1.20.3",
75
+ "@applitools/utils": "1.14.4",
76
76
  "abort-controller": "3.0.0",
77
77
  "chalk": "4.1.2",
78
78
  "node-fetch": "2.6.7",
@@ -81,11 +81,11 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@applitools/bongo": "^5.10.0",
84
- "@applitools/spec-driver-puppeteer": "^1.7.4",
85
- "@applitools/spec-driver-selenium": "^1.7.15",
86
- "@applitools/test-server": "^1.4.2",
84
+ "@applitools/spec-driver-puppeteer": "^1.7.5",
85
+ "@applitools/spec-driver-selenium": "^1.7.16",
86
+ "@applitools/test-server": "^1.4.3",
87
87
  "@applitools/test-utils": "^1.5.17",
88
- "@applitools/tunnel-client": "^1.11.9",
88
+ "@applitools/tunnel-client": "^1.11.10",
89
89
  "@types/mocha": "^10.0.7",
90
90
  "@types/node": "^12.20.55",
91
91
  "@types/selenium-webdriver": "^4.1.2",
@@ -158,6 +158,8 @@ export interface ScreenshotSettings<TSpec extends SpecType> extends BaseCore.Ima
158
158
  sendDom?: boolean;
159
159
  captureStatusBar?: boolean;
160
160
  mobileOptions?: MobileOptions;
161
+ /** @internal */
162
+ skipRootHtmlResource?: boolean;
161
163
  }
162
164
  export type LocateSettings<TLocator extends string, TSpec extends SpecType> = BaseCore.LocateSettings<TLocator, Region | ElementReference<TSpec>> & ScreenshotSettings<TSpec>;
163
165
  export type LocateTextSettings<TPattern extends string, TSpec extends SpecType> = BaseCore.LocateTextSettings<TPattern, Region | ElementReference<TSpec>> & ScreenshotSettings<TSpec>;
@@ -32,6 +32,7 @@ export declare function makeCheckAndClose<TSpec extends SpecType>({ eyes, target
32
32
  domains?: string[] | undefined;
33
33
  }) | undefined;
34
34
  headers?: Record<string, string> | undefined;
35
+ skipRootHtmlResource?: boolean | undefined;
35
36
  } & import("@applitools/core-base").CloseSettings & {
36
37
  environments?: Environment[] | undefined;
37
38
  }) | undefined;
@@ -67,6 +67,8 @@ export type SnapshotSettings<TSpec extends SpecType> = AutomationCore.CheckSetti
67
67
  domains?: string[];
68
68
  };
69
69
  headers?: Record<string, string>;
70
+ /** @internal */
71
+ skipRootHtmlResource?: boolean;
70
72
  };
71
73
  export type CheckSettings<TSpec extends SpecType> = SnapshotSettings<TSpec>;
72
74
  export type SafeCheckSettings = CheckSettings<SpecType<never, never, UFGSelector, never, never>>;
@@ -31,6 +31,8 @@ export type RawDomSnapshot = {
31
31
  export type DomSnapshotSettings<TSpec extends SpecType> = {
32
32
  disableBrowserFetching?: boolean;
33
33
  skipResources?: string[];
34
+ /** @internal */
35
+ skipRootHtmlResource?: boolean;
34
36
  fetchConcurrency?: number;
35
37
  chunkByteLength?: number;
36
38
  executionTimeout?: number;
@@ -1,13 +1,14 @@
1
1
  import { type SpecType, type ElementReference } from '@applitools/driver';
2
2
  import type { Logger } from '@applitools/logger';
3
3
  import { type Selector as UFGSelector } from '@applitools/ufg-client';
4
- export declare function toGeneratedSelectors<TSpec extends SpecType>({ elementReferences, logger, }: {
4
+ export declare function toGeneratedSelectors<TSpec extends SpecType>({ elementReferences, logger, logDeprecations, }: {
5
5
  elementReferences: {
6
6
  target?: ElementReference<TSpec>;
7
7
  scrolling?: ElementReference<TSpec>;
8
8
  calculate?: ElementReference<TSpec>[];
9
9
  };
10
10
  logger: Logger;
11
+ logDeprecations: (...args: string[]) => void;
11
12
  }): {
12
13
  elementReferencesToMark: (string | TSpec["element"] | TSpec["secondary"]["element"] | TSpec["selector"] | TSpec["secondary"]["selector"] | {
13
14
  selector: string | TSpec["selector"] | TSpec["secondary"]["selector"];