Skip to content

Commit a16315b

Browse files
authored
Merge pull request #512 from reactioncommerce/release-v2.0.0-rc.10
Release v2.0.0 rc.10
2 parents 23c127a + ef1eef8 commit a16315b

File tree

104 files changed

+5833
-4627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+5833
-4627
lines changed

.circleci/bin/calibre-deploy.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
URL=$1
6+
LOCATION=$2
7+
8+
# Run One Off Test
9+
./../node_modules/calibre/bin/linux/calibre test create $URL --location=$LOCATION
10+
11+
# Run Snapshot
12+
# California Snapshot Only (Be more generic as we add more site locations to track)
13+
if [ $LOCATION = "California" ]
14+
then
15+
./../node_modules/calibre/bin/linux/calibre site create-snapshot --site reaction-core-"$(echo $LOCATION | tr '[A-Z]' '[a-z]')"
16+
else
17+
echo "No Snapshot Configured for Location"
18+
fi

.circleci/config.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,32 @@ jobs:
231231
command: |
232232
./node_modules/.bin/blc ${STAGING_URL} -ro -filter=3 -e
233233
234+
test-metrics:
235+
<<: *defaults
236+
steps:
237+
- checkout
238+
- run:
239+
name: Install Calibre CLI
240+
command: |
241+
cd ~
242+
sudo npm install calibre
243+
- run:
244+
name: California
245+
command: |
246+
.circleci/bin/calibre-deploy.sh ${STAGING_URL} California
247+
- run:
248+
name: North Virginia
249+
command: |
250+
.circleci/bin/calibre-deploy.sh ${STAGING_URL} NorthVirginia
251+
- run:
252+
name: London
253+
command: |
254+
.circleci/bin/calibre-deploy.sh ${STAGING_URL} London
255+
- run:
256+
name: Frankfurt
257+
command: |
258+
.circleci/bin/calibre-deploy.sh ${STAGING_URL} Frankfurt
259+
234260
snyk-security:
235261
<<: *defaults
236262
steps:
@@ -276,6 +302,9 @@ workflows:
276302
context: reaction-validation
277303
requires:
278304
- docker-build
305+
- test-metrics:
306+
requires:
307+
- deploy-to-ecs
279308
- snyk-security:
280309
context: reaction-validation
281310
requires:

.snyk

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
2-
version: v1.12.0
3-
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
4-
ignore:
5-
'npm:chownr:20180731':
6-
- '*':
7-
reason: This vulnerability only affects packages used in development, such as webpack, more details at https://github.com/isaacs/chownr/issues/14#issuecomment-421662375
8-
expires: 2019-01-31T00:00:00.000Z
2+
version: v1.13.3
93
patch: {}
4+
ignore: {}

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1+
# v2.0.0-rc.10
2+
3+
This is our second release candidate for this project. This project should be considered `pre-release` until we've released the final 2.0.0 version.
4+
5+
This version should be used with `v2.0.0-rc.10` of https://github.com/reactioncommerce/reaction
6+
7+
# Improvements
8+
9+
### Dev Utilities
10+
11+
- We have made it easier to debug and troubleshoot issues in our Docker image:
12+
(#504)
13+
14+
### General
15+
16+
- We added a new new profile address book page (#499)
17+
- We added support for GraphQL Subscriptions (#492)
18+
- We added the ability to get sitemap data from GQL API and make it available on sitemap\*.xml routes (#488)
19+
- We added the ability to have surcharges attached to an order (#499)
20+
21+
# Breaking Changes
22+
23+
### Multiple Payment Support
24+
25+
- All of the individual `placeOrder*` GraphQL mutations provided by the built-in payment plugins are removed and replaced with a single `placeOrder` mutation which supports multiple payments. Any custom payment method plugins will break due to the removal of `createOrder` internal mutation. Look at all changes. (https://github.com/reactioncommerce/reaction/pull/4908)
26+
27+
## Feature
28+
29+
- feat: performance metrics integration with calibre (#508)
30+
- feat: add dev utilities to the docker image (#504)
31+
- feat: new Profile Address page (#499)
32+
- feat: add graphql subscription support (#492)
33+
- feat: setup sitemap routes to get data from GQL server (#488)
34+
- feat: display order surcharges in UI (#449)
35+
36+
## Fixes
37+
38+
- fix: add enhancements to sitemap route handling (#497)
39+
- fix: updated dependencies and snyk policies (#496)
40+
41+
## Refactor
42+
43+
- refactor: update checkout to support multiple payments (#477)
44+
- refactor: navigation data comes from new NavigationTree (#472)
45+
46+
## Chore
47+
48+
- chore: update typography variants based on MUI warning (#506)
49+
- chore: updated config for modules and tree shaking (#495)
50+
51+
## Docs
52+
53+
- docs(tags): update tag docs to include sitemap, isVisible (#505)
54+
155
# v2.0.0-rc.9
256
This is our first release candidate for this project - we're going to be synchronizing releases across the differents parts of the Reaction Commerce ecosystem, so that's why we're starting with rc.8. This project should be considered `pre-release` until we've released the final 2.0.0 version.
357

Dockerfile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,21 @@ LABEL maintainer="Reaction Commerce <[email protected]>" \
5454
com.reactioncommerce.docker.git.sha1=$GIT_SHA1 \
5555
com.reactioncommerce.docker.license=$LICENSE
5656

57+
# Get versions to pin with this command:
58+
# apk list bash curl less vim | cut -d " " -f 1 | sed 's/-/=/' | xargs
59+
RUN apk --no-cache add bash curl less vim
60+
SHELL ["/bin/bash", "-o", "pipefail", "-o", "errexit", "-u", "-c"]
61+
5762
# Because Docker Compose uses a volume for node_modules and volumes are owned
5863
# by root by default, we have to initially create node_modules here with correct owner.
5964
# Without this Yarn cannot write packages into node_modules later, when running in a container.
60-
RUN mkdir -p "/usr/local/src/node_modules" && chown node "/usr/local/src" && chown node "/usr/local/src/node_modules"
61-
RUN mkdir -p "/usr/local/src/reaction-app/node_modules" && chown node "/usr/local/src/reaction-app" && chown node "/usr/local/src/reaction-app/node_modules"
65+
RUN mkdir -p "/usr/local/src/node_modules"; chown node "/usr/local/src"; chown node "/usr/local/src/node_modules"
66+
RUN mkdir -p "/usr/local/src/reaction-app/node_modules"; chown node "/usr/local/src/reaction-app"; chown node "/usr/local/src/reaction-app/node_modules"
6267

6368
# Same for Yarn cache folder. Without this Yarn will warn that it's going to use
6469
# a fallback cache dir instead because the one in config is not writable.
65-
RUN mkdir -p "/home/node/.cache/yarn" && chown node "/home/node/.cache/yarn"
66-
RUN mkdir -p "/home/node/.cache/yarn-offline-mirror" && chown node "/home/node/.cache/yarn-offline-mirror"
70+
RUN mkdir -p "/home/node/.cache/yarn"; chown node "/home/node/.cache/yarn"
71+
RUN mkdir -p "/home/node/.cache/yarn-offline-mirror"; chown node "/home/node/.cache/yarn-offline-mirror"
6772

6873
WORKDIR $APP_SOURCE_DIR/..
6974
COPY --chown=node package.json yarn.lock $APP_SOURCE_DIR/../
@@ -74,8 +79,7 @@ COPY --chown=node package.json yarn.lock $APP_SOURCE_DIR/../
7479
# The project directory will be mounted during development. Therefore, we'll
7580
# install dependencies into an external directory (one level up.) This works
7681
# because Node traverses up the fs to find node_modules.
77-
RUN set -ex; \
78-
if [ "$BUILD_ENV" = "production" ]; then \
82+
RUN if [ "$BUILD_ENV" = "production" ]; then \
7983
yarn install \
8084
--frozen-lockfile \
8185
--ignore-scripts \
@@ -107,8 +111,7 @@ COPY --chown=node . $APP_SOURCE_DIR
107111
# our tools use "/home/node" as the HOME dir.
108112
USER node
109113

110-
RUN set -ex; \
111-
if [ "$BUILD_ENV" = "production" ]; then \
114+
RUN if [ "$BUILD_ENV" = "production" ]; then \
112115
yarn build; \
113116
fi;
114117

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ To run eslint
9898
docker-compose run --rm web eslint src
9999
```
100100

101+
### Debugging the server with chrome devtools
102+
103+
You can use the chrome devtools to debug the code running in the node.js application server while it's running inside docker.
104+
105+
- run `docker-compose run --rm --publish 9229:9229 --publish 4000:4000 -e NODE_ENV=development web babel-node --inspect=0.0.0.0:9229 ./src/server.js`
106+
- Open chrome and browse to `chrome://inspect`. Find the process under **Remote Target** and click **inspect**.
107+
101108
### Yarn Commands
102109
103110
Yarn & NPM should run inside the Docker container. We've taken steps to ensure that the node_modules are placed into a cacheable location. If you run Yarn locally, the node_modules are written directly to the project directory and take precedence over those from the Docker build.

docs/tags.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22

33
## Tag Listing Page (TLP)
44

5-
A Tag Listing Page (TLP) lists all the products with a specific tag in a grid layout.
5+
A Tag Listing Page (TLP) lists products with a specific tag in a grid layout.
66

7-
A TLP can have its own display title, metadata in the page's `<head>`, slug and URL.
7+
A TLP can be visible to the public, when `isVisible` is true, or hidden, when `isVisible` is false. When `isVisible` is false, the TLP will not render in a browser and will not be part of the Site Map.
8+
9+
Each TLP can have its own:
10+
- name (required)
11+
- slug (required)
12+
- display title
13+
- hero image
14+
- metadata fields in the page's `<head>`
15+
- list of featured products, by product ID
816

917
### How to store custom metadata for the TLP
1018

package.json

Lines changed: 69 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "reaction-next-starterkit",
3-
"version": "2.0.0-rc.9",
3+
"version": "2.0.0-rc.10",
44
"description": "",
55
"main": "index.js",
66
"keywords": [],
@@ -10,6 +10,7 @@
1010
"url": "https://reactioncommerce.com"
1111
},
1212
"license": "GPL-3.0",
13+
"sideEffects": false,
1314
"scripts": {
1415
"dev": "NODE_ENV=development node ./src/server.js",
1516
"build": "yarn run build-clean && NODE_ENV=production IS_BUILDING_NEXTJS=1 next build src",
@@ -30,89 +31,92 @@
3031
]
3132
},
3233
"dependencies": {
33-
"@material-ui/core": "^3.1.0",
34-
"@reactioncommerce/components": "0.60.1",
35-
"@reactioncommerce/components-context": "^1.1.0",
36-
"@segment/snippet": "^4.3.1",
37-
"apollo-cache-inmemory": "^1.1.11",
38-
"apollo-client": "^2.2.7",
39-
"apollo-link": "^1.2.2",
40-
"apollo-link-context": "^1.0.8",
41-
"apollo-link-error": "^1.0.9",
42-
"apollo-link-http": "^1.5.4",
34+
"@material-ui/core": "^3.9.2",
35+
"@reactioncommerce/components": "^0.63.0",
36+
"@reactioncommerce/components-context": "^1.2.0",
37+
"@segment/snippet": "^4.4.0",
38+
"apollo-cache-inmemory": "^1.4.2",
39+
"apollo-client": "^2.4.12",
40+
"apollo-link": "^1.2.8",
41+
"apollo-link-context": "^1.0.14",
42+
"apollo-link-error": "^1.1.7",
43+
"apollo-link-http": "^1.5.11",
44+
"apollo-link-ws": "^1.0.14",
4345
"body-parser": "^1.18.2",
44-
"chalk": "^2.3.2",
45-
"classnames": "^2.2.5",
46+
"chalk": "^2.4.2",
47+
"classnames": "^2.2.6",
4648
"compression": "^1.7.3",
4749
"cookie-parser": "^1.4.3",
4850
"cookie-session": "^2.0.0-beta.3",
49-
"envalid": "^4.1.4",
51+
"envalid": "^4.2.0",
5052
"express": "^4.16.4",
51-
"graphql": "^0.13.2",
52-
"graphql-tag": "^2.8.0",
53+
"graphql": "14.1.1",
54+
"graphql-tag": "2.10.1",
5355
"isomorphic-fetch": "^2.2.1",
5456
"js-cookie": "^2.2.0",
5557
"keymirror": "^0.1.1",
56-
"lodash.isequal": "^4.5.0",
57-
"mdi-material-ui": "^5.4.0",
58-
"mobx": "^4.1.1",
59-
"mobx-react": "^5.0.0",
58+
"lodash": "^4.17.11",
59+
"mdi-material-ui": "^5.9.0",
60+
"mobx": "^4.9.2",
61+
"mobx-react": "^5.4.3",
6062
"next": "^7.0.2",
6163
"next-routes": "^1.4.2",
6264
"passport": "^0.4.0",
6365
"passport-oauth2": "^1.4.0",
6466
"prop-types": "^15.6.2",
65-
"react": "16.4.2",
66-
"react-apollo": "^2.1.3",
67+
"react": "16.7.0",
68+
"react-apollo": "^2.4.1",
6769
"react-container-query": "^0.11.0",
68-
"react-dom": "16.4.2",
70+
"react-dom": "16.7.0",
6971
"react-helmet": "^5.2.0",
70-
"react-stripe-elements": "^2.0.1",
71-
"react-tracking": "^5.4.1",
72+
"react-jss": "^8.6.1",
73+
"react-stripe-elements": "^2.0.3",
74+
"react-tracking": "^5.6.0",
7275
"reacto-form": "^0.0.2",
73-
"styled-components": "^3.4.9"
76+
"styled-components": "^3.4.10",
77+
"subscriptions-transport-ws": "^0.9.15"
7478
},
7579
"devDependencies": {
76-
"@babel/cli": "^7.0.0",
77-
"@babel/core": "^7.0.0",
78-
"@babel/node": "^7.0.0",
79-
"@babel/plugin-proposal-class-properties": "^7.0.0",
80-
"@babel/plugin-proposal-decorators": "^7.0.0",
81-
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
82-
"@babel/plugin-proposal-function-sent": "^7.0.0",
83-
"@babel/plugin-proposal-json-strings": "^7.0.0",
84-
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
85-
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
86-
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
87-
"@babel/plugin-syntax-import-meta": "^7.0.0",
88-
"@babel/preset-env": "^7.0.0",
89-
"@reactioncommerce/eslint-config": "^1.7.0",
80+
"@babel/cli": "^7.2.3",
81+
"@babel/core": "^7.2.2",
82+
"@babel/node": "^7.2.2",
83+
"@babel/plugin-proposal-class-properties": "^7.3.0",
84+
"@babel/plugin-proposal-decorators": "^7.3.0",
85+
"@babel/plugin-proposal-export-namespace-from": "^7.2.0",
86+
"@babel/plugin-proposal-function-sent": "^7.2.0",
87+
"@babel/plugin-proposal-json-strings": "^7.2.0",
88+
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
89+
"@babel/plugin-proposal-throw-expressions": "^7.2.0",
90+
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
91+
"@babel/plugin-syntax-import-meta": "^7.2.0",
92+
"@babel/preset-env": "^7.3.1",
93+
"@reactioncommerce/eslint-config": "^1.9.0",
9094
"babel-core": "^7.0.0-bridge.0",
91-
"babel-eslint": "^8.2.2",
92-
"babel-jest": "^23.6.0",
93-
"babel-plugin-dynamic-import-node": "^2.1.0",
94-
"babel-plugin-module-resolver": "^3.1.1",
95-
"babel-plugin-styled-components": "^1.7.1",
95+
"babel-eslint": "^8.2.6",
96+
"babel-jest": "^24.0.0",
97+
"babel-plugin-dynamic-import-node": "^2.2.0",
98+
"babel-plugin-module-resolver": "^3.1.3",
99+
"babel-plugin-styled-components": "^1.10.0",
96100
"broken-link-checker": "^0.7.8",
97-
"chai": "^4.1.2",
101+
"chai": "^4.2.0",
98102
"chai-cheerio": "^1.0.0",
99103
"cheerio": "^1.0.0-rc.2",
100-
"enzyme": "^3.6.0",
101-
"enzyme-adapter-react-16": "^1.5.0",
104+
"enzyme": "^3.8.0",
105+
"enzyme-adapter-react-16": "^1.8.0",
102106
"eslint": "^4.19.1",
103-
"eslint-plugin-import": "^2.10.0",
104-
"eslint-plugin-jest": "^21.15.0",
105-
"eslint-plugin-jsx-a11y": "^6.0.3",
106-
"eslint-plugin-promise": "^3.7.0",
107-
"eslint-plugin-react": "^7.7.0",
108-
"jest": "^23.6.0",
109-
"jest-junit": "^3.6.0",
107+
"eslint-plugin-import": "^2.16.0",
108+
"eslint-plugin-jest": "^21.27.2",
109+
"eslint-plugin-jsx-a11y": "^6.2.1",
110+
"eslint-plugin-promise": "^3.8.0",
111+
"eslint-plugin-react": "^7.12.4",
112+
"jest": "^24.0.0",
113+
"jest-junit": "^6.2.1",
110114
"jest-styled-components": "^6.3.1",
111115
"jest-transform-graphql": "2.1.0",
112116
"mocha": "^5.2.0",
113-
"react-test-renderer": "^16.3.1",
114-
"rimraf": "^2.6.2",
115-
"snyk": "^1.73.0"
117+
"react-test-renderer": "^16.7.0",
118+
"rimraf": "^2.6.3",
119+
"snyk": "^1.126.0"
116120
},
117121
"jest": {
118122
"collectCoverage": true,
@@ -124,11 +128,16 @@
124128
"!**/vendor/**"
125129
],
126130
"coverageDirectory": "reports/coverage",
127-
"testResultsProcessor": "jest-junit",
131+
"reporters": [
132+
"default",
133+
"jest-junit"
134+
],
128135
"roots": [
129136
"./src"
130137
],
131-
"setupTestFrameworkScriptFile": "<rootDir>/tests/setupTests.js",
138+
"setupFilesAfterEnv": [
139+
"<rootDir>/tests/setupTests.js"
140+
],
132141
"transform": {
133142
"\\.(gql|graphql)$": "jest-transform-graphql",
134143
".*": "babel-jest"

0 commit comments

Comments
 (0)