Skip to content

Commit

Permalink
fix(cloud-masthead): update the services and utilities to use canary (#…
Browse files Browse the repository at this point in the history
…8250)

### Description

We were getting an error that the `checkPersonalization()` method from `CloudAccountAuth` service was not defined. Updating the package versions for `services` and `utilities` resolves this issue.

### Changelog

**Changed**

- add optional chaining for cloud auth check for `digitalData.user.segment.isCloudLoggedOn`
- update services and utilities packages

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
annawen1 authored Feb 11, 2022
1 parent 0b17c94 commit 9a73de0
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 5 deletions.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions packages/services-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"prettier": "^1.19.0"
},
"dependencies": {
"@carbon/ibmdotcom-services": "1.31.0-canary.adhoc5.6836",
"@carbon/ibmdotcom-utilities": "1.31.0-canary.adhoc5.6836",
"@carbon/ibmdotcom-services": "canary",
"@carbon/ibmdotcom-utilities": "canary",
"carbon-components": "10.52.0",
"redux": "^4.0.0",
"redux-logger": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CloudAccountAuthAPI {
*/
static async checkPersonalization() {
return await DDOAPI.isReady().then(() => {
const status = root.digitalData.user.segment.isCloudLoggedOn;
const status = root.digitalData?.user?.segment?.isCloudLoggedOn;
return { user: status === true ? 'authenticated' : 'anonymous' };
});
}
Expand Down
4 changes: 2 additions & 2 deletions packages/web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@
"prettier": "^1.19.0"
},
"dependencies": {
"@carbon/ibmdotcom-services": "1.31.0-canary.adhoc5.6836",
"@carbon/ibmdotcom-services": "canary",
"@carbon/ibmdotcom-styles": "1.31.0-rc.0",
"@carbon/ibmdotcom-utilities": "1.31.0-canary.adhoc5.6836",
"@carbon/ibmdotcom-utilities": "canary",
"@carbon/layout": "10.34.0",
"@carbon/telemetry": "0.0.0-alpha.6",
"carbon-components": "10.52.0",
Expand Down
24 changes: 24 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,17 @@
axios "~0.21.4"
window-or-global "^1.0.1"

"@carbon/ibmdotcom-services@canary":
version "1.31.0-canary.1827018708.0"
resolved "https://registry.yarnpkg.com/@carbon/ibmdotcom-services/-/ibmdotcom-services-1.31.0-canary.1827018708.0.tgz#2fa24ea199cdf026e177ba74f76f9190cf810ca8"
integrity sha512-9RvnbOtST2klP1sm4WhssXGr7Ey9vVu5a96TP4gahdv6hk9Vl+FyqU/oEbJ0lcKmdnN+8b82wpfaFK9h1LUu7w==
dependencies:
"@babel/runtime" "^7.5.0"
"@carbon/ibmdotcom-utilities" "1.31.0-canary.adhoc5.6836"
"@carbon/telemetry" "0.0.0-alpha.6"
axios "~0.21.4"
window-or-global "^1.0.1"

"@carbon/[email protected]", "@carbon/[email protected]+acf59c1b5":
version "1.31.0-canary.adhoc5.6836"
resolved "https://registry.yarnpkg.com/@carbon/ibmdotcom-utilities/-/ibmdotcom-utilities-1.31.0-canary.adhoc5.6836.tgz#61ebb6aaa3df135905ebc11f79c42927f250d839"
Expand All @@ -1380,6 +1391,19 @@
marked "^4.0.10"
window-or-global "^1.0.1"

"@carbon/ibmdotcom-utilities@canary":
version "1.31.0-canary.1827018708.0"
resolved "https://registry.yarnpkg.com/@carbon/ibmdotcom-utilities/-/ibmdotcom-utilities-1.31.0-canary.1827018708.0.tgz#37048fa89a65e34964f882a5c6de3329b428543e"
integrity sha512-1bAci1BdK3hykH29eKRlcRqQuNA8bOoOaHhwnCNFhZdGkUiXuA7A8W55JnMdC8an0UGXcMMGu5Gr0VmRzIhtsQ==
dependencies:
"@carbon/telemetry" "0.0.0-alpha.6"
axios "~0.21.4"
carbon-components "10.52.0"
isomorphic-dompurify "0.4.0"
js-cookie "^2.2.1"
marked "^4.0.10"
window-or-global "^1.0.1"

"@carbon/[email protected]", "@carbon/icon-helpers@^10.26.0":
version "10.26.0"
resolved "https://registry.yarnpkg.com/@carbon/icon-helpers/-/icon-helpers-10.26.0.tgz#fe8277836e7b758ae48c93fbab8aab444b2f3b70"
Expand Down

0 comments on commit 9a73de0

Please sign in to comment.