Skip to content

Commit 77f8168

Browse files
committed
feat(core): CHECKOUT-9450 Lazy load payment strategies through essential build
1 parent 1b1b8c0 commit 77f8168

40 files changed

+824
-196
lines changed

.circleci/config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,14 @@ jobs:
6666

6767
build:
6868
<<: *node_executor
69-
resource_class: large
69+
resource_class: xlarge
7070
steps:
7171
- ci/pre-setup
7272
- node/npm-install
7373
- run:
7474
name: "Build distribution files"
75+
environment:
76+
INCLUDE_CJS: true
7577
command: npm run build && npm run docs
7678
- persist_to_workspace:
7779
root: .
@@ -110,7 +112,7 @@ jobs:
110112
111113
build_cdn:
112114
<<: *node_executor
113-
resource_class: medium+
115+
resource_class: xlarge
114116
steps:
115117
- ci/pre-setup
116118
- node/npm-install

package-lock.json

Lines changed: 19 additions & 103 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,26 @@
33
"version": "1.793.0",
44
"description": "BigCommerce Checkout JavaScript SDK",
55
"license": "MIT",
6-
"main": "dist/checkout-sdk.js",
6+
"main": "dist/cjs/checkout-sdk.js",
7+
"module": "dist/esm/checkout-sdk.js",
78
"typings": "dist/checkout-sdk.d.ts",
9+
"exports": {
10+
".": {
11+
"types": "./dist/checkout-sdk.d.ts",
12+
"import": "./dist/esm/checkout-sdk.js",
13+
"require": "./dist/cjs/checkout-sdk.js"
14+
},
15+
"./essential": {
16+
"types": "./dist/checkout-sdk.d.ts",
17+
"import": "./dist/esm/checkout-sdk-essential.js",
18+
"require": "./dist/cjs/checkout-sdk-essential.js"
19+
},
20+
"./integrations": {
21+
"types": "./dist/integrations.d.ts",
22+
"import": "./dist/esm/integrations.js",
23+
"require": "./dist/cjs/integrations.js"
24+
}
25+
},
826
"files": [
927
"dist/",
1028
"docs/"
@@ -32,7 +50,7 @@
3250
"build-cdn": "npx nx run core:build-cdn",
3351
"prebundle": "rm -rf dist",
3452
"bundle": "npx nx run core:build",
35-
"bundle:analyze": "npm run --silent bundle -- --config-name umd --profile --json > webpack-stats.json && webpack-bundle-analyzer webpack-stats.json dist --default-sizes gzip",
53+
"bundle:analyze": "npx nx run core:build-analyze",
3654
"bundle:watch": "export WATCH=true; npx nx run core:build-watch",
3755
"bundle-dts": "npx nx run core:build-dts",
3856
"docs": "npx nx run core:docs",
@@ -53,7 +71,7 @@
5371
},
5472
"dependencies": {
5573
"@bigcommerce/bigpay-client": "^5.28.1",
56-
"@bigcommerce/data-store": "^1.0.1",
74+
"@bigcommerce/data-store": "^1.0.3",
5775
"@bigcommerce/form-poster": "^1.5.0",
5876
"@bigcommerce/memoize": "^1.0.0",
5977
"@bigcommerce/request-sender": "^1.2.4",

packages/adyen-utils/src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import * as adyenV2Mock from './adyenv2/adyenv2.mock';
2+
import * as adyenV3Mock from './adyenv3/adyenv3.mock';
3+
14
export { default as AdyenV2ScriptLoader } from './adyenv2/adyenv2-script-loader';
25
export { default as AdyenV3ScriptLoader } from './adyenv3/adyenv3-script-loader';
36
export * from './types';
4-
export * as adyenV2Mock from './adyenv2/adyenv2.mock';
5-
export * as adyenV3Mock from './adyenv3/adyenv3.mock';
7+
export { adyenV2Mock, adyenV3Mock };
68
export { WithAdyenV3PaymentInitializeOptions } from './adyenv3/adyenv3-initialize-options';
79
export { default as AdyenV3PaymentInitializeOptions } from './adyenv3/adyenv3-initialize-options';
810
export { WithAdyenV2PaymentInitializeOptions } from './adyenv2/adyenv2-initialize-options';

packages/adyen-utils/src/types.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,7 @@ export interface AdyenAdditionalActionCallbacks {
195195

196196
export interface AdyenAdditionalActionErrorResponse {
197197
provider_data: AdyenAdditionalAction;
198-
errors: [
199-
{
200-
code: string;
201-
},
202-
];
198+
errors: [{ code: string }];
203199
}
204200

205201
export interface AdyenAdditionalActionOptions extends AdyenAdditionalActionCallbacks {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"compiler": {
3+
"configType": "tsconfig",
4+
"rootFolder": "."
5+
},
6+
"project": {
7+
"entryPointSourceFile": "../../temp/core/src/bundles/integrations.d.ts"
8+
},
9+
"validationRules": {
10+
"missingReleaseTags": "allow"
11+
},
12+
"apiReviewFile": {
13+
"enabled": false
14+
},
15+
"apiJsonFile": {
16+
"enabled": false
17+
},
18+
"dtsRollup": {
19+
"enabled": true,
20+
"mainDtsRollupPath": "integrations.d.ts"
21+
}
22+
}

0 commit comments

Comments
 (0)