@rebilly/framepay-react 4.0.6 → 5.1.0
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 +18 -0
- package/build/index.d.ts +1 -1
- package/build/index.spec.js +1 -1
- package/build/lib/components/elements/applepay-element.js +2 -2
- package/build/lib/components/elements/bank-element.js +3 -3
- package/build/lib/components/elements/base-element.js +14 -13
- package/build/lib/components/elements/card-element.js +3 -3
- package/build/lib/components/elements/googlepay-element.js +2 -2
- package/build/lib/components/elements/iban-element.js +4 -4
- package/build/lib/components/elements/paypal-element.js +2 -2
- package/build/lib/components/injector.js +20 -20
- package/build/lib/components/provider.js +11 -11
- package/build/lib/constants.js +1 -1
- package/build/lib/context.js +2 -4
- package/build/lib/dom-util.js +1 -5
- package/build/lib/framepay-error.d.ts +1 -1
- package/build/lib/framepay-error.js +4 -4
- package/build/lib/get-rebilly-api.js +2 -2
- package/package.json +6 -16
- package/src/index.spec.ts +1 -1
- package/src/index.ts +3 -3
- package/src/lib/components/elements/applepay-element.tsx +2 -2
- package/src/lib/components/elements/bank-element.spec.tsx +12 -12
- package/src/lib/components/elements/bank-element.tsx +4 -4
- package/src/lib/components/elements/base-element.tsx +16 -16
- package/src/lib/components/elements/card-element.spec.tsx +13 -13
- package/src/lib/components/elements/card-element.tsx +4 -4
- package/src/lib/components/elements/googlepay-element.tsx +2 -2
- package/src/lib/components/elements/iban-element.spec.tsx +9 -9
- package/src/lib/components/elements/iban-element.tsx +4 -4
- package/src/lib/components/elements/paypal-element.tsx +2 -2
- package/src/lib/components/injector.spec.tsx +3 -4
- package/src/lib/components/injector.tsx +50 -48
- package/src/lib/components/provider.spec.tsx +5 -7
- package/src/lib/components/provider.tsx +15 -15
- package/src/lib/constants.ts +1 -1
- package/src/lib/context.ts +1 -3
- package/src/lib/dom-util.ts +0 -4
- package/src/lib/framepay-error.ts +9 -6
- package/src/lib/get-rebilly-api.ts +1 -1
- package/test/e2e/cypress-support.js +1 -1
- package/test/e2e/fixtures/apple-pay.js +4 -8
- package/test/e2e/fixtures/bank-separate.js +68 -67
- package/test/e2e/fixtures/card-separate-brands.js +256 -139
- package/test/e2e/fixtures/card-separate-rebilly-fields.js +48 -57
- package/test/e2e/fixtures/card-separate.js +214 -112
- package/test/e2e/fixtures/checkout-combined.js +145 -95
- package/test/e2e/fixtures/google-pay.js +6 -10
- package/test/e2e/fixtures/iban.js +47 -45
- package/test/e2e/fixtures/multiple-methods.js +104 -98
- package/test/e2e/fixtures/nav.js +3 -4
- package/test/e2e/fixtures/paypal.js +5 -12
- package/test/e2e/fixtures/util.js +50 -37
- package/test/e2e/specs/card-separate-brands.cy.ts +2 -2
- package/test/e2e/specs/react-version.cy.ts +1 -1
- package/test/e2e/switch-react-version.js +5 -6
- package/test/unit/jest.config.js +18 -28
- package/test/unit/specs/declaration-mock.spec.tsx +1 -0
- package/tslint.json +0 -36
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
1
2
|
/**
|
|
2
3
|
* Tiny util to switch react version in test
|
|
3
4
|
*
|
|
@@ -7,22 +8,20 @@ const fs = require('fs');
|
|
|
7
8
|
const pkg = require('../../package');
|
|
8
9
|
|
|
9
10
|
const version = process.env.REACT_VERSION;
|
|
10
|
-
const clean = !
|
|
11
|
-
|
|
11
|
+
const clean = !version || version === 'clean';
|
|
12
12
|
|
|
13
13
|
const template = {
|
|
14
14
|
'prop-types': './test/e2e/assets/prop-types.js',
|
|
15
|
-
|
|
16
|
-
'react-dom': `./test/e2e/assets/react-dom-${version}.js
|
|
15
|
+
react: `./test/e2e/assets/react-${version}.js`,
|
|
16
|
+
'react-dom': `./test/e2e/assets/react-dom-${version}.js`,
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
/**
|
|
21
20
|
* Delete aliases
|
|
22
21
|
*/
|
|
23
22
|
if (clean) {
|
|
24
23
|
if (pkg.alias) {
|
|
25
|
-
Object.keys(template).forEach(key => delete pkg.alias[key]);
|
|
24
|
+
Object.keys(template).forEach((key) => delete pkg.alias[key]);
|
|
26
25
|
|
|
27
26
|
if (!Object.keys(pkg.alias).length) {
|
|
28
27
|
delete pkg.alias;
|
package/test/unit/jest.config.js
CHANGED
|
@@ -1,29 +1,19 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
1
2
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
],
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
'js',
|
|
20
|
-
'json',
|
|
21
|
-
'ts',
|
|
22
|
-
'tsx',
|
|
23
|
-
],
|
|
24
|
-
moduleDirectories: [
|
|
25
|
-
'node_modules',
|
|
26
|
-
'src',
|
|
27
|
-
'types',
|
|
28
|
-
],
|
|
29
|
-
}
|
|
3
|
+
rootDir: '../..',
|
|
4
|
+
testEnvironment: 'jsdom',
|
|
5
|
+
testPathIgnorePatterns: ['.*/e2e/.*'],
|
|
6
|
+
transform: {
|
|
7
|
+
'.(ts|tsx)': [
|
|
8
|
+
'ts-jest',
|
|
9
|
+
{
|
|
10
|
+
tsconfig: 'tsconfig.spec.json',
|
|
11
|
+
diagnostics: {
|
|
12
|
+
warnOnly: true,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
moduleFileExtensions: ['js', 'json', 'ts', 'tsx'],
|
|
18
|
+
moduleDirectories: ['node_modules', 'src', 'types'],
|
|
19
|
+
};
|
package/tslint.json
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["tslint:latest", "tslint-config-prettier", "tslint-immutable"],
|
|
3
|
-
"rules": {
|
|
4
|
-
"no-submodule-imports": [false],
|
|
5
|
-
"interface-name": [true, "never-prefix"],
|
|
6
|
-
// TODO: allow devDependencies only in **/*.spec.ts files:
|
|
7
|
-
// waiting on https://github.com/palantir/tslint/pull/3708
|
|
8
|
-
"no-implicit-dependencies": [false, "dev"],
|
|
9
|
-
"member-access": [true, "no-public"],
|
|
10
|
-
/* tslint-immutable rules */
|
|
11
|
-
// Recommended built-in rules
|
|
12
|
-
"no-var-keyword": true,
|
|
13
|
-
"no-parameter-reassignment": true,
|
|
14
|
-
"typedef": [true],
|
|
15
|
-
// Immutability rules
|
|
16
|
-
"readonly-keyword": true,
|
|
17
|
-
"readonly-array": true,
|
|
18
|
-
"no-let": true,
|
|
19
|
-
"no-object-mutation": false,
|
|
20
|
-
"no-delete": true,
|
|
21
|
-
"no-method-signature": true,
|
|
22
|
-
"no-object-literal-type-assertion": false,
|
|
23
|
-
// Functional style rules
|
|
24
|
-
"no-this": false,
|
|
25
|
-
"no-class": false,
|
|
26
|
-
"no-mixed-interface": false,
|
|
27
|
-
"no-expression-statement": [
|
|
28
|
-
false,
|
|
29
|
-
{
|
|
30
|
-
"ignore-prefix": ["console.", "process.exit"]
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"no-if-statement": false
|
|
34
|
-
/* end tslint-immutable rules */
|
|
35
|
-
}
|
|
36
|
-
}
|