@atlaskit/react-ufo 3.4.0 → 3.4.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,13 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 3.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#124988](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/124988)
8
+ [`fa5bc92ae734d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fa5bc92ae734d) -
9
+ Deduplicate nth-child(n) selectors produced by TTVC v3 debug info
10
+
3
11
  ## 3.4.0
4
12
 
5
13
  ### Minor Changes
@@ -61,8 +61,7 @@ function getUniqueSelector(selectorConfig, element) {
61
61
  } else if (!isSelectorUnique(potentialSelector)) {
62
62
  var parentElement = element.parentElement;
63
63
  if (parentElement) {
64
- var siblingIndex = Array.from(parentElement.children).indexOf(element) + 1;
65
- return "".concat(potentialSelector, ":nth-child(").concat(siblingIndex, ")");
64
+ return "".concat(potentialSelector, ":nth-child"); // NOTE: invalid DOM selector, but enough information for VC
66
65
  }
67
66
  }
68
67
  return potentialSelector;
@@ -55,8 +55,7 @@ function getUniqueSelector(selectorConfig, element) {
55
55
  } else if (!isSelectorUnique(potentialSelector)) {
56
56
  const parentElement = element.parentElement;
57
57
  if (parentElement) {
58
- const siblingIndex = Array.from(parentElement.children).indexOf(element) + 1;
59
- return `${potentialSelector}:nth-child(${siblingIndex})`;
58
+ return `${potentialSelector}:nth-child`; // NOTE: invalid DOM selector, but enough information for VC
60
59
  }
61
60
  }
62
61
  return potentialSelector;
@@ -55,8 +55,7 @@ function getUniqueSelector(selectorConfig, element) {
55
55
  } else if (!isSelectorUnique(potentialSelector)) {
56
56
  var parentElement = element.parentElement;
57
57
  if (parentElement) {
58
- var siblingIndex = Array.from(parentElement.children).indexOf(element) + 1;
59
- return "".concat(potentialSelector, ":nth-child(").concat(siblingIndex, ")");
58
+ return "".concat(potentialSelector, ":nth-child"); // NOTE: invalid DOM selector, but enough information for VC
60
59
  }
61
60
  }
62
61
  return potentialSelector;
@@ -1,4 +1,4 @@
1
- import type { ResourceEntry } from "../resource-timing/common/types";
1
+ import type { ResourceEntry } from '../resource-timing/common/types';
2
2
  export declare const cacheableTypes: string[];
3
3
  export declare const MEMORY_KEY = "mem";
4
4
  export declare const DISK_KEY = "disk";
@@ -1,4 +1,4 @@
1
- import type { ResourceEntry } from "../resource-timing/common/types";
1
+ import type { ResourceEntry } from '../resource-timing/common/types';
2
2
  export declare const cacheableTypes: string[];
3
3
  export declare const MEMORY_KEY = "mem";
4
4
  export declare const DISK_KEY = "disk";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",