@paypal/checkout-components 5.0.198 → 5.0.199
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 +6 -0
- package/package.json +11 -3
- package/src/zoid/buttons/component.jsx +12 -1
- package/src/zoid/buttons/util.js +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## <small>5.0.199 (2022-02-23)</small>
|
|
2
|
+
|
|
3
|
+
* chore(deps): update dependency karma to v6 [security] (#1876) ([0d1c628](https://github.com/paypal/paypal-checkout-components/commit/0d1c628)), closes [#1876](https://github.com/paypal/paypal-checkout-components/issues/1876)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
1
7
|
## <small>5.0.198 (2022-02-22)</small>
|
|
2
8
|
|
|
3
9
|
* chore(release): 5.0.197 🎉 ([47eecc1](https://github.com/paypal/paypal-checkout-components/commit/47eecc1))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paypal/checkout-components",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.199",
|
|
4
4
|
"description": "PayPal Checkout components, for integrating checkout products.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"jest-ssr": "jest test/ssr --env=node --no-cache --collectCoverage --collectCoverageFrom='src/' --coverageDirectory='coverage/jest'",
|
|
27
27
|
"jest-e2e": "rm -f ./test/e2e/screenshots/*.png && jest test/e2e",
|
|
28
28
|
"check-size": "npm run webpack-size && bundlemon && npm run delete-size",
|
|
29
|
-
"delete-size": "rm dist/size.* dist/report.html"
|
|
29
|
+
"delete-size": "rm dist/size.* dist/report.html",
|
|
30
|
+
"prepare": "husky install"
|
|
30
31
|
},
|
|
31
32
|
"files": [
|
|
32
33
|
"src/",
|
|
@@ -63,15 +64,19 @@
|
|
|
63
64
|
"flow-bin": "0.155.0",
|
|
64
65
|
"fs-extra": "^10.0.0",
|
|
65
66
|
"grumbler-scripts": "^5.0.1",
|
|
67
|
+
"husky": "^7.0.4",
|
|
66
68
|
"imagemagick": "^0.1.3",
|
|
67
69
|
"imgur": "^0.3.1",
|
|
68
|
-
"karma": "^
|
|
70
|
+
"karma": "^6.0.0",
|
|
69
71
|
"karma-coverage": "^2.0.3",
|
|
72
|
+
"lint-staged": "^12.3.4",
|
|
70
73
|
"memory-fs": "^0.5.0",
|
|
71
74
|
"mocha": "^4.1.0",
|
|
72
75
|
"mocketeer": "^0.3.1",
|
|
73
76
|
"pixelmatch": "^5.2.1",
|
|
74
77
|
"pngjs": "^6.0.0",
|
|
78
|
+
"prettier": "^2.5.1",
|
|
79
|
+
"prettier-plugin-sh": "^0.8.1",
|
|
75
80
|
"puppeteer": "^1.20.0",
|
|
76
81
|
"serve": "^13.0.0",
|
|
77
82
|
"sync-browser-mocks": "^2.0.8"
|
|
@@ -88,5 +93,8 @@
|
|
|
88
93
|
"post-robot": "^10.0.0",
|
|
89
94
|
"zalgo-promise": "^1.0.10",
|
|
90
95
|
"zoid": "^9.0.0"
|
|
96
|
+
},
|
|
97
|
+
"lint-staged": {
|
|
98
|
+
"*.sh": "prettier --write"
|
|
91
99
|
}
|
|
92
100
|
}
|
|
@@ -9,7 +9,7 @@ import { getLogger, getLocale, getClientID, getEnv, getIntent, getCommit, getVau
|
|
|
9
9
|
import { rememberFunding, getRememberedFunding, getRefinedFundingEligibility } from '@paypal/funding-components/src';
|
|
10
10
|
import { ZalgoPromise } from 'zalgo-promise/src';
|
|
11
11
|
import { create, type ZoidComponent } from 'zoid/src';
|
|
12
|
-
import { uniqueID, memoize, isApplePaySupported, supportsPopups as userAgentSupportsPopups, noop } from 'belter/src';
|
|
12
|
+
import { uniqueID, memoize, isApplePaySupported, supportsPopups as userAgentSupportsPopups, noop, isLocalStorageEnabled } from 'belter/src';
|
|
13
13
|
import { FUNDING, FUNDING_BRAND_LABEL, QUERY_BOOL, ENV, FPTI_KEY } from '@paypal/sdk-constants/src';
|
|
14
14
|
import { node, dom } from 'jsx-pragmatic/src';
|
|
15
15
|
|
|
@@ -42,6 +42,17 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
|
|
|
42
42
|
logger: getLogger(),
|
|
43
43
|
|
|
44
44
|
prerenderTemplate: ({ state, props, doc }) => {
|
|
45
|
+
const { buttonSessionID } = props;
|
|
46
|
+
|
|
47
|
+
if (!isLocalStorageEnabled()) {
|
|
48
|
+
getLogger().info('localstoage_inaccessible_possible_private_browsing').track({
|
|
49
|
+
[ FPTI_KEY.BUTTON_SESSION_UID ]: buttonSessionID,
|
|
50
|
+
[ FPTI_KEY.CONTEXT_TYPE ]: 'button_session_id',
|
|
51
|
+
[ FPTI_KEY.CONTEXT_ID ]: buttonSessionID,
|
|
52
|
+
[ FPTI_KEY.TRANSITION ]: 'localstorage_inaccessible_possible_private_browsing'
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
45
56
|
return (
|
|
46
57
|
<PrerenderedButtons
|
|
47
58
|
nonce={ props.nonce }
|
package/src/zoid/buttons/util.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* @flow */
|
|
2
|
-
import { supportsPopups as userAgentSupportsPopups, isAndroid, isChrome, isIos, isSafari, isSFVC, type Experiment, isDevice, isTablet, getElement } from 'belter/src';
|
|
2
|
+
import { supportsPopups as userAgentSupportsPopups, isAndroid, isChrome, isIos, isSafari, isSFVC, type Experiment, isDevice, isTablet, getElement, isLocalStorageEnabled } from 'belter/src';
|
|
3
3
|
import { ENV, FUNDING } from '@paypal/sdk-constants/src';
|
|
4
4
|
import { getEnableFunding, getDisableFunding, createExperiment, getFundingEligibility, getPlatform, getComponents, getEnv } from '@paypal/sdk-client/src';
|
|
5
5
|
import { getRefinedFundingEligibility } from '@paypal/funding-components/src';
|
|
@@ -138,7 +138,13 @@ export function getNoPaylaterExperiment(fundingSource : ?$Values<typeof FUNDING>
|
|
|
138
138
|
|
|
139
139
|
export function getVenmoAppLabelExperiment() : EligibilityExperiment {
|
|
140
140
|
const isEnvForTest = getEnv() === ENV.LOCAL || getEnv() === ENV.TEST || getEnv() === ENV.STAGE;
|
|
141
|
-
|
|
141
|
+
|
|
142
|
+
let isEnabledForTest = false;
|
|
143
|
+
|
|
144
|
+
if (isLocalStorageEnabled() && isEnvForTest) {
|
|
145
|
+
isEnabledForTest = window.localStorage.getItem('enable_venmo_app_label');
|
|
146
|
+
}
|
|
147
|
+
|
|
142
148
|
return {
|
|
143
149
|
enableVenmoAppLabel: isEnabledForTest
|
|
144
150
|
};
|