@atlaskit/react-ufo 3.1.2 → 3.1.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,13 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 3.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#120623](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120623)
8
+ [`c225bc1a5daf7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c225bc1a5daf7) -
9
+ fix ufo labelstack formatting by version
10
+
3
11
  ## 3.1.2
4
12
 
5
13
  ### Patch Changes
@@ -62,7 +62,7 @@ function labelStackStartWith(labelStack, startWith) {
62
62
  return stringifyLabelStackFully(labelStack).startsWith(stringifyLabelStackFully(startWith));
63
63
  }
64
64
  function optimizeLabelStack(labelStack, reactUFOVersion) {
65
- return reactUFOVersion ? getLabelStackReference(labelStack) : labelStack.map(function (ls) {
65
+ return reactUFOVersion === '2.0.0' ? getLabelStackReference(labelStack) : labelStack.map(function (ls) {
66
66
  return _objectSpread({
67
67
  n: ls.name
68
68
  }, ls.segmentId ? {
@@ -45,7 +45,7 @@ export function labelStackStartWith(labelStack, startWith) {
45
45
  return stringifyLabelStackFully(labelStack).startsWith(stringifyLabelStackFully(startWith));
46
46
  }
47
47
  export function optimizeLabelStack(labelStack, reactUFOVersion) {
48
- return reactUFOVersion ? getLabelStackReference(labelStack) : labelStack.map(ls => ({
48
+ return reactUFOVersion === '2.0.0' ? getLabelStackReference(labelStack) : labelStack.map(ls => ({
49
49
  n: ls.name,
50
50
  ...(ls.segmentId ? {
51
51
  s: ls.segmentId
@@ -50,7 +50,7 @@ export function labelStackStartWith(labelStack, startWith) {
50
50
  return stringifyLabelStackFully(labelStack).startsWith(stringifyLabelStackFully(startWith));
51
51
  }
52
52
  export function optimizeLabelStack(labelStack, reactUFOVersion) {
53
- return reactUFOVersion ? getLabelStackReference(labelStack) : labelStack.map(function (ls) {
53
+ return reactUFOVersion === '2.0.0' ? getLabelStackReference(labelStack) : labelStack.map(function (ls) {
54
54
  return _objectSpread({
55
55
  n: ls.name
56
56
  }, ls.segmentId ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",