@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.
Files changed (59) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/build/index.d.ts +1 -1
  3. package/build/index.spec.js +1 -1
  4. package/build/lib/components/elements/applepay-element.js +2 -2
  5. package/build/lib/components/elements/bank-element.js +3 -3
  6. package/build/lib/components/elements/base-element.js +14 -13
  7. package/build/lib/components/elements/card-element.js +3 -3
  8. package/build/lib/components/elements/googlepay-element.js +2 -2
  9. package/build/lib/components/elements/iban-element.js +4 -4
  10. package/build/lib/components/elements/paypal-element.js +2 -2
  11. package/build/lib/components/injector.js +20 -20
  12. package/build/lib/components/provider.js +11 -11
  13. package/build/lib/constants.js +1 -1
  14. package/build/lib/context.js +2 -4
  15. package/build/lib/dom-util.js +1 -5
  16. package/build/lib/framepay-error.d.ts +1 -1
  17. package/build/lib/framepay-error.js +4 -4
  18. package/build/lib/get-rebilly-api.js +2 -2
  19. package/package.json +6 -16
  20. package/src/index.spec.ts +1 -1
  21. package/src/index.ts +3 -3
  22. package/src/lib/components/elements/applepay-element.tsx +2 -2
  23. package/src/lib/components/elements/bank-element.spec.tsx +12 -12
  24. package/src/lib/components/elements/bank-element.tsx +4 -4
  25. package/src/lib/components/elements/base-element.tsx +16 -16
  26. package/src/lib/components/elements/card-element.spec.tsx +13 -13
  27. package/src/lib/components/elements/card-element.tsx +4 -4
  28. package/src/lib/components/elements/googlepay-element.tsx +2 -2
  29. package/src/lib/components/elements/iban-element.spec.tsx +9 -9
  30. package/src/lib/components/elements/iban-element.tsx +4 -4
  31. package/src/lib/components/elements/paypal-element.tsx +2 -2
  32. package/src/lib/components/injector.spec.tsx +3 -4
  33. package/src/lib/components/injector.tsx +50 -48
  34. package/src/lib/components/provider.spec.tsx +5 -7
  35. package/src/lib/components/provider.tsx +15 -15
  36. package/src/lib/constants.ts +1 -1
  37. package/src/lib/context.ts +1 -3
  38. package/src/lib/dom-util.ts +0 -4
  39. package/src/lib/framepay-error.ts +9 -6
  40. package/src/lib/get-rebilly-api.ts +1 -1
  41. package/test/e2e/cypress-support.js +1 -1
  42. package/test/e2e/fixtures/apple-pay.js +4 -8
  43. package/test/e2e/fixtures/bank-separate.js +68 -67
  44. package/test/e2e/fixtures/card-separate-brands.js +256 -139
  45. package/test/e2e/fixtures/card-separate-rebilly-fields.js +48 -57
  46. package/test/e2e/fixtures/card-separate.js +214 -112
  47. package/test/e2e/fixtures/checkout-combined.js +145 -95
  48. package/test/e2e/fixtures/google-pay.js +6 -10
  49. package/test/e2e/fixtures/iban.js +47 -45
  50. package/test/e2e/fixtures/multiple-methods.js +104 -98
  51. package/test/e2e/fixtures/nav.js +3 -4
  52. package/test/e2e/fixtures/paypal.js +5 -12
  53. package/test/e2e/fixtures/util.js +50 -37
  54. package/test/e2e/specs/card-separate-brands.cy.ts +2 -2
  55. package/test/e2e/specs/react-version.cy.ts +1 -1
  56. package/test/e2e/switch-react-version.js +5 -6
  57. package/test/unit/jest.config.js +18 -28
  58. package/test/unit/specs/declaration-mock.spec.tsx +1 -0
  59. 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 = !Boolean(version) || version === '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
- 'react': `./test/e2e/assets/react-${version}.js`,
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;
@@ -1,29 +1,19 @@
1
+ /* eslint-env node */
1
2
  module.exports = {
2
- rootDir: '../..',
3
- testEnvironment: 'jsdom',
4
- testPathIgnorePatterns: [
5
- '.*/e2e/.*',
6
- ],
7
- transform: {
8
- '.(ts|tsx)': [
9
- 'ts-jest',
10
- {
11
- tsconfig: 'tsconfig.spec.json',
12
- diagnostics: {
13
- warnOnly: true,
14
- },
15
- },
16
- ],
17
- },
18
- moduleFileExtensions: [
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
+ };
@@ -34,6 +34,7 @@ describe('Mock functionality works correctly', () => {
34
34
 
35
35
  interface Parent extends SuperParent {
36
36
  readonly property2: string;
37
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
38
  readonly method2: (arg: any) => string;
38
39
  }
39
40
 
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
- }