Skip to content

Commit

Permalink
fix: Commerce Widget Examples App (#2360)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwhardwick authored Oct 31, 2024
1 parent 605aaff commit f81584e
Show file tree
Hide file tree
Showing 23 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Setup playwright
uses: ./.github/actions/setup-playwright

- name: Prepare widgets bundle for @examples/sdk-load-widgets-with-nextjs
- name: Prepare widgets bundle for @examples/commerce-widget-nextjs
run: yarn workspace @imtbl/checkout-widgets prepare:examplewidgets

- name: Test examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ yarn build
Copy over the created widgets bundle to use for testing:

```bash
yarn workspace @examples/sdk-load-widgets-with-nextjs prepare:widgets
yarn workspace @examples/commerce-widget-nextjs prepare:widgets
```

Run tests against the local bundle:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@examples/sdk-load-widgets-with-nextjs",
"name": "@examples/commerce-widget-nextjs",
"version": "0.1.0",
"private": true,
"scripts": {
Expand All @@ -14,7 +14,7 @@
"dependencies": {
"@biom3/react": "^0.25.21",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "1.58.0",
"@imtbl/sdk": "^1.62.0",
"next": "14.2.7",
"react": "^18",
"react-dom": "^18"
Expand Down
2 changes: 1 addition & 1 deletion packages/checkout/widgets-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"d": "rollup --config rollup.config.js",
"lint": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0",
"lint:fix": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0 --fix",
"prepare:examplewidgets": "yarn workspace @examples/sdk-load-widgets-with-nextjs exec mkdir -p tests/utils/local-widgets-js/ && cp $(yarn workspace @imtbl/sdk exec pwd)/dist/browser/checkout/*.js $(yarn workspace @examples/sdk-load-widgets-with-nextjs exec pwd)/tests/utils/local-widgets-js/",
"prepare:examplewidgets": "yarn workspace @examples/commerce-widget-nextjs exec mkdir -p tests/utils/local-widgets-js/ && cp $(yarn workspace @imtbl/sdk exec pwd)/dist/browser/checkout/*.js $(yarn workspace @examples/commerce-widget-nextjs exec pwd)/tests/utils/local-widgets-js/",
"prepare:testwidgets": "yarn workspace @tests/checkout-widgets-nextjs exec mkdir -p tests/utils/local-widgets-js/ && cp $(yarn workspace @imtbl/sdk exec pwd)/dist/browser/checkout/*.js $(yarn workspace @tests/checkout-widgets-nextjs exec pwd)/tests/utils/local-widgets-js/",
"start": "yarn clean && NODE_ENV=development rollup --config rollup.config.js --watch",
"test": "jest test --passWithNoTests",
Expand Down
4 changes: 2 additions & 2 deletions tests/func-tests/checkout/widgets-nextjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ yarn build
Copy over the created widgets bundle to use for testing:

```bash
yarn workspace @examples/sdk-load-widgets-with-nextjs prepare:widgets
yarn workspace @tests/checkout-widgets-nextjs prepare:widgets
```

Run tests against the local bundle:
Expand All @@ -62,5 +62,5 @@ yarn test
We can inject a Checkout Widgets Version Config into the app to validate auto updating.

```bash
INTERCEPT_CHECKOUT_VERSION_CONFIG=1.58.0 yarn workspace @examples/sdk-load-widgets-with-nextjs test
INTERCEPT_CHECKOUT_VERSION_CONFIG=1.58.0 yarn workspace @tests/checkout-widgets-nextjs test
```
60 changes: 30 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4002,6 +4002,26 @@ __metadata:
languageName: node
linkType: hard

"@examples/commerce-widget-nextjs@workspace:examples/checkout/commerce-widget-nextjs":
version: 0.0.0-use.local
resolution: "@examples/commerce-widget-nextjs@workspace:examples/checkout/commerce-widget-nextjs"
dependencies:
"@biom3/react": ^0.25.21
"@ethersproject/providers": ^5.7.2
"@imtbl/sdk": ^1.62.0
"@playwright/test": ^1.45.3
"@types/node": ^20
"@types/react": ^18.3.4
"@types/react-dom": ^18.3.0
eslint: ^8
eslint-config-next: 14.2.7
next: 14.2.7
react: ^18
react-dom: ^18
typescript: ^5.6.2
languageName: unknown
linkType: soft

"@examples/create-bid-with-nextjs@workspace:examples/orderbook/create-bid-with-nextjs":
version: 0.0.0-use.local
resolution: "@examples/create-bid-with-nextjs@workspace:examples/orderbook/create-bid-with-nextjs"
Expand Down Expand Up @@ -4187,26 +4207,6 @@ __metadata:
languageName: unknown
linkType: soft

"@examples/sdk-load-widgets-with-nextjs@workspace:examples/checkout/sdk-load-widgets-with-nextjs":
version: 0.0.0-use.local
resolution: "@examples/sdk-load-widgets-with-nextjs@workspace:examples/checkout/sdk-load-widgets-with-nextjs"
dependencies:
"@biom3/react": ^0.25.21
"@ethersproject/providers": ^5.7.2
"@imtbl/sdk": 1.58.0
"@playwright/test": ^1.45.3
"@types/node": ^20
"@types/react": ^18.3.4
"@types/react-dom": ^18.3.0
eslint: ^8
eslint-config-next: 14.2.7
next: 14.2.7
react: ^18
react-dom: ^18
typescript: ^5.6.2
languageName: unknown
linkType: soft

"@examples/switch-network-with-nextjs@workspace:examples/checkout/sdk-switch-network-with-nextjs":
version: 0.0.0-use.local
resolution: "@examples/switch-network-with-nextjs@workspace:examples/checkout/sdk-switch-network-with-nextjs"
Expand Down Expand Up @@ -5039,9 +5039,9 @@ __metadata:
languageName: unknown
linkType: soft

"@imtbl/sdk@npm:1.58.0":
version: 1.58.0
resolution: "@imtbl/sdk@npm:1.58.0"
"@imtbl/sdk@npm:1.61.0":
version: 1.61.0
resolution: "@imtbl/sdk@npm:1.61.0"
dependencies:
"@0xsequence/abi": ^1.4.3
"@0xsequence/core": ^1.4.3
Expand Down Expand Up @@ -5114,13 +5114,13 @@ __metadata:
optional: true
prisma:
optional: true
checksum: 6f0d031f0db561ce51be24c66b4cd92e1abc3d568bfb279fdfd06ff5848ce2a6bbd4690226bae3ac0a876ed0dc42d1a8c0d3eae108ef6c24995b78a9ee74a490
checksum: 93f3c3198842d5b4d7a44eb2b20091697c1dbc64fcc3e677fd7e8fa77c456611cb189aab874a8b8d4e8df27e83f189affbdfe40291e810f423d8f818da72b0c7
languageName: node
linkType: hard

"@imtbl/sdk@npm:1.61.0":
version: 1.61.0
resolution: "@imtbl/sdk@npm:1.61.0"
"@imtbl/sdk@npm:^1.62.0":
version: 1.62.0
resolution: "@imtbl/sdk@npm:1.62.0"
dependencies:
"@0xsequence/abi": ^1.4.3
"@0xsequence/core": ^1.4.3
Expand Down Expand Up @@ -5193,7 +5193,7 @@ __metadata:
optional: true
prisma:
optional: true
checksum: 93f3c3198842d5b4d7a44eb2b20091697c1dbc64fcc3e677fd7e8fa77c456611cb189aab874a8b8d4e8df27e83f189affbdfe40291e810f423d8f818da72b0c7
checksum: fbeca01d47dce9a04c710bbde042402f638ac18464dd5815eacf2e366146bcd35ebed109e0457fd79aaf67e3348486fe51aaccefc239bf6e693a501dc4cb7c0a
languageName: node
linkType: hard

Expand Down Expand Up @@ -35132,7 +35132,7 @@ __metadata:
resolution: "seaport-core@https://github.com/immutable/seaport-core.git#commit=0633350ec34f21fcede657ff812f11cf7d19144e"
dependencies:
seaport-types: ^0.0.1
checksum: 392bce86bbfc4f7c00b65575b238825f4c696bddf5af08be7aa496862e63879375387fd4400f6e900ffee08d65c1f75cf3adad9c6c41ddcf7a3b0389cd73c3c7
checksum: d8adba0d54106c6fe9370f0775fadef2198e5eab440b36919d1f917705ce2f0a7028e4da021b6df049aa3ca35d7e673a28b78a731130f0ff9fdf7a8bd32e3b94
languageName: node
linkType: hard

Expand Down Expand Up @@ -35176,7 +35176,7 @@ __metadata:
seaport-sol: ^1.5.0
seaport-types: ^0.0.1
solady: ^0.0.84
checksum: f31a7443a50fa1c35ec03ea031743d1d10896653ae443fa15ab8e6f5b4a2ca43f6743d523ae4e1f14df867451e5b2b2130b0bfa58a1085b0bcae3fceb8dfdc9b
checksum: a77e141e4ab5d2c4bb190a38fbb6cda3011fdf5f350b250fbeb4d82ae81cf917a966a2dcb8d9e4fd1bed29e5510ede9b15941b0ac77aeb4272dab94c9f51e7ff
languageName: node
linkType: hard

Expand Down

0 comments on commit f81584e

Please sign in to comment.