Skip to content

Commit ed24ad6

Browse files
committed
Merge remote-tracking branch 'origin/trunk' into HEAD
2 parents 86bd9b1 + 97eea7c commit ed24ad6

File tree

6 files changed

+66
-49
lines changed

6 files changed

+66
-49
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
- checkout
4949
- setup_remote_docker:
5050
docker_layer_caching: true
51+
version: 19.03.13
5152
- run:
5253
name: Lint Dockerfiles
5354
command: ${CI_SCRIPTS} lint-dockerfiles
@@ -82,6 +83,7 @@ jobs:
8283
- checkout
8384
- setup_remote_docker:
8485
docker_layer_caching: true
86+
version: 19.03.13
8587
- run:
8688
name: Build and push production Docker image
8789
command: ${CI_SCRIPTS} docker-build-tag-push . ${DOCKER_REPOSITORY}

CHANGELOG.md

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,53 @@
1-
# v3.2.0
1+
# v4.0.0
22

3-
## Refactors
3+
Example Storefront v4.0.0 adds major features and performance enhancements, and does contain breaking changes since v3.1.0
4+
5+
_This is a reminder that starting with v3.x, all Reaction projects have begun tracking their versions independently, and this release **will** work with the latest releases of all other Reaction projects, even though the major version number may be different._
46

5-
- refactor: Configure `react-testing-library` and remove unnecessary testing dependencies [#686](https://github.com/reactioncommerce/example-storefront/pull/686)
7+
## BREAKING CHANGES
68

7-
This is a major update that introduces the following refactors in PR [#667](https://github.com/reactioncommerce/example-storefront/pull/667)
9+
- React hooks are introduced, and replace many HOC's, which have been removed: `withAddressBook`, `withAddressValidation`, `withAvailablePaymentMethods`, `withCart`, `withCatalogItemProduct`, `withOrder`, `withOrders`, `withShop`, `withTag`, `withViewer`.
810
- Use React hooks for various parts of the application including orders, cart, shop, translations and more. This refactor remove various HOC that added unnecessary complexity to the app.
9-
- React context is now used and all previous uses of MobX have been removed. Using React context greatly simplifies local states management.
10-
- Simple translation helpers have been added to support multi-lingual shops. See the `useTranslation` React hook for more details.
11-
- Next.js has been update to use version 9.4.1, which includes support for [SSG](https://nextjs.org/blog/next-9-3#next-gen-static-site-generation-ssg-support)(Static Site Generation). By default product pages are re-regenerated every two minutes. Further, various other features, such as dynamic routes and API routes are now used, either a dynamic route or API
12-
as appropriate.
13-
- Various components form the Reaction component library have been removed in favor of using the new Reaction Catalyst design system. This is a stepping stone towards consolidating styling solutions use use only one.
11+
- MobX has been removed, and React context is now used in its place.
12+
- Next.js has been update to use version 9.4.1, which includes support for [SSG](https://nextjs.org/blog/next-9-3#next-gen-static-site-generation-ssg-support)(Static Site Generation). By default product pages are re-regenerated every two minutes. Further, various other features, such as dynamic routes and API routes are now used, either a dynamic route or API.
13+
- Various components from the Reaction component library have been removed in favor of using the new Reaction Catalyst design system. This is a stepping stone towards consolidating styling solutions use use only one.
14+
15+
## Refactors
16+
17+
- refactor: Storefront v2 ([#667](https://github.com/reactioncommerce/example-storefront/pull/667))
18+
- refactor: Revalidate index page, require instant revalidation if no shop is present during build ([#698](https://github.com/reactioncommerce/example-storefront/pull/698))
19+
- refactor: Return Not found if either product or shop are missing ([#696](https://github.com/reactioncommerce/example-storefront/pull/696))
20+
- refactor: Use CANONICAL_URL for sitemap route ([#690](https://github.com/reactioncommerce/example-storefront/pull/690))
21+
22+
## Fixes
23+
24+
- fix: Fix for 2 vulnerabilities ([#727](https://github.com/reactioncommerce/example-storefront/pull/727))
25+
- fix: don't execute unnecessary requests for anonymous cart on initial load ([#705](https://github.com/reactioncommerce/example-storefront/pull/705))
26+
- fix: Set _isMounted to true after component mounted ([#700](https://github.com/reactioncommerce/example-storefront/pull/700))
27+
- fix: docker production build ([#693](https://github.com/reactioncommerce/example-storefront/pull/693))
28+
- fix: fix broken unit test ([#682](https://github.com/reactioncommerce/example-storefront/pull/682))
29+
- fix: runtime build issues ([#685](https://github.com/reactioncommerce/example-storefront/pull/685))
30+
31+
## Chores
32+
33+
- chore(deps): Bump elliptic from 6.5.2 to 6.5.3 ([#717](https://github.com/reactioncommerce/example-storefront/pull/717))
34+
- chore: Bump lodash from 4.17.15 to 4.17.19 ([#706](https://github.com/reactioncommerce/example-storefront/pull/706))
35+
- chore: update README and CHANGELOG to reflect recent updates ([#687](https://github.com/reactioncommerce/example-storefront/pull/687))
36+
- chore: Setup react-testing-library and some clean up ([#686](https://github.com/reactioncommerce/example-storefront/pull/686))
37+
- chore: fix various eslint errors and warnings ([#684](https://github.com/reactioncommerce/example-storefront/pull/684))
38+
39+
## Contributors
1440

41+
Thanks to @janus-reith for contributing to this release! 🎉
1542

1643
# v3.1.0
1744

1845
This release of `example-storefront` is designed to work with v3.x of the Reaction API.
1946

2047
### Chores
2148

22-
- chore: bump https-proxy-agent from 2.2.2 to 2.2.4 ([#669](http://github.com/reactioncommerce/reaction-admin/pull/669))
23-
- chore: switch to 3.0.0 Docker tag ([#659](http://github.com/reactioncommerce/reaction-admin/pull/659))
49+
- chore: bump https-proxy-agent from 2.2.2 to 2.2.4 ([#669](http://github.com/reactioncommerce/example-storefront/pull/669))
50+
- chore: switch to 3.0.0 Docker tag ([#659](http://github.com/reactioncommerce/example-storefront/pull/659))
2451

2552
# v3.0.0
2653

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ networks:
1313

1414
services:
1515
web:
16-
image: reactioncommerce/example-storefront:3.1.0
16+
image: reactioncommerce/example-storefront:4.0.0
1717
env_file:
1818
- ./.env
1919
networks:

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "example-storefront",
3-
"version": "3.1.0",
3+
"version": "4.0.0",
44
"description": "The Example Storefront serves as a reference for implementing a web based storefront using the Reaction Commerce GraphQL API.",
55
"keywords": [],
66
"author": {
@@ -54,12 +54,12 @@
5454
"envalid": "~4.2.0",
5555
"express": "~4.16.4",
5656
"graphql": "~14.1.1",
57-
"graphql-request": "^1.8.2",
57+
"graphql-request": "^2.0.0",
5858
"graphql-tag": "~2.10.1",
5959
"isomorphic-unfetch": "^3.0.0",
6060
"js-cookie": "~2.2.0",
6161
"keymirror": "~0.1.1",
62-
"lodash": "~4.17.19",
62+
"lodash": "~4.17.20",
6363
"mdi-material-ui": "~5.9.0",
6464
"next": "9.4.1",
6565
"passport": "~0.4.0",

pages/_document.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { ServerStyleSheet as StyledComponentSheets } from "styled-components";
44
import { ServerStyleSheets as MaterialUiServerStyleSheets } from "@material-ui/styles";
55
import favicons from "custom/favicons";
66
import theme from "custom/reactionTheme";
7-
import analyticsProviders from "../custom/analytics";
7+
import definedPaymentMethods from "custom/paymentMethods";
8+
import analyticsProviders from "custom/analytics";
89

910
/**
1011
* For details about the styled-components SSR code in this file, see https://www.styled-components.com/docs/advanced#nextjs
@@ -36,12 +37,14 @@ class HTMLDocument extends Document {
3637
...analyticsProviders.map((provider) => ({
3738
type: "text/javascript",
3839
innerHTML: provider.renderScript()
39-
})),
40-
{
41-
type: "text/javascript",
42-
src: "https://js.stripe.com/v3/"
43-
}
40+
}))
4441
];
42+
definedPaymentMethods
43+
.some((method) => method.name === "stripe_card")
44+
&& scripts.push({
45+
type: "text/javascript",
46+
src: "https://js.stripe.com/v3/"
47+
});
4548

4649
return (
4750
<Html lang="en">

yarn.lock

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3693,14 +3693,6 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7:
36933693
safe-buffer "^5.0.1"
36943694
sha.js "^2.4.8"
36953695

3696-
cross-fetch@2.2.2:
3697-
version "2.2.2"
3698-
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.2.tgz#a47ff4f7fc712daba8f6a695a11c948440d45723"
3699-
integrity sha1-pH/09/xxLauo9qaVoRyUhEDUVyM=
3700-
dependencies:
3701-
node-fetch "2.1.2"
3702-
whatwg-fetch "2.0.4"
3703-
37043696
cross-fetch@3.0.4:
37053697
version "3.0.4"
37063698
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.4.tgz#7bef7020207e684a7638ef5f2f698e24d9eb283c"
@@ -4360,9 +4352,9 @@ element-resize-detector@1.1.13:
43604352
batch-processor "^1.0.0"
43614353

43624354
elliptic@^6.0.0, elliptic@^6.5.2:
4363-
version "6.5.2"
4364-
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762"
4365-
integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==
4355+
version "6.5.3"
4356+
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6"
4357+
integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==
43664358
dependencies:
43674359
bn.js "^4.4.0"
43684360
brorand "^1.0.1"
@@ -5390,12 +5382,10 @@ graphlib@^2.1.1, graphlib@^2.1.5:
53905382
dependencies:
53915383
lodash "^4.17.15"
53925384

5393-
graphql-request@^1.8.2:
5394-
version "1.8.2"
5395-
resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-1.8.2.tgz#398d10ae15c585676741bde3fc01d5ca948f8fbe"
5396-
integrity sha512-dDX2M+VMsxXFCmUX0Vo0TopIZIX4ggzOtiCsThgtrKR4niiaagsGTDIHj3fsOMFETpa064vzovI+4YV4QnMbcg==
5397-
dependencies:
5398-
cross-fetch "2.2.2"
5385+
graphql-request@^2.0.0:
5386+
version "2.0.0"
5387+
resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-2.0.0.tgz#8dd12cf1eb2ce0c80f4114fd851741e091134862"
5388+
integrity sha512-Ww3Ax+G3l2d+mPT8w7HC9LfrKjutnCKtnDq7ZZp2ghVk5IQDjwAk3/arRF1ix17Ky15rm0hrSKVKxRhIVlSuoQ==
53995389

54005390
graphql-tag@^2.10.2, graphql-tag@~2.10.1:
54015391
version "2.10.3"
@@ -7249,11 +7239,16 @@ lodash.uniqueid@~4.0.1:
72497239
resolved "https://registry.yarnpkg.com/lodash.uniqueid/-/lodash.uniqueid-4.0.1.tgz#3268f26a7c88e4f4b1758d679271814e31fa5b26"
72507240
integrity sha1-MmjyanyI5PSxdY1nknGBTjH6WyY=
72517241

7252-
lodash@^4, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@~4.17.19:
7242+
lodash@^4, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0:
72537243
version "4.17.19"
72547244
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
72557245
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
72567246

7247+
lodash@~4.17.20:
7248+
version "4.17.20"
7249+
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
7250+
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
7251+
72577252
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
72587253
version "1.4.0"
72597254
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
@@ -7751,11 +7746,6 @@ nice-try@^1.0.4:
77517746
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
77527747
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
77537748

7754-
node-fetch@2.1.2:
7755-
version "2.1.2"
7756-
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5"
7757-
integrity sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=
7758-
77597749
node-fetch@2.6.0, node-fetch@^2.2.0:
77607750
version "2.6.0"
77617751
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
@@ -11602,11 +11592,6 @@ whatwg-encoding@^1.0.5:
1160211592
dependencies:
1160311593
iconv-lite "0.4.24"
1160411594

11605-
whatwg-fetch@2.0.4:
11606-
version "2.0.4"
11607-
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f"
11608-
integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==
11609-
1161011595
whatwg-fetch@3.0.0, whatwg-fetch@>=0.10.0:
1161111596
version "3.0.0"
1161211597
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb"

0 commit comments

Comments
 (0)