Skip to content

Commit

Permalink
Merge pull request #512 from reactioncommerce/release-v2.0.0-rc.10
Browse files Browse the repository at this point in the history
Release v2.0.0 rc.10
  • Loading branch information
spencern authored Mar 7, 2019
2 parents 23c127a + ef1eef8 commit a16315b
Show file tree
Hide file tree
Showing 104 changed files with 5,833 additions and 4,627 deletions.
18 changes: 18 additions & 0 deletions .circleci/bin/calibre-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -e

URL=$1
LOCATION=$2

# Run One Off Test
./../node_modules/calibre/bin/linux/calibre test create $URL --location=$LOCATION

# Run Snapshot
# California Snapshot Only (Be more generic as we add more site locations to track)
if [ $LOCATION = "California" ]
then
./../node_modules/calibre/bin/linux/calibre site create-snapshot --site reaction-core-"$(echo $LOCATION | tr '[A-Z]' '[a-z]')"
else
echo "No Snapshot Configured for Location"
fi
29 changes: 29 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,32 @@ jobs:
command: |
./node_modules/.bin/blc ${STAGING_URL} -ro -filter=3 -e
test-metrics:
<<: *defaults
steps:
- checkout
- run:
name: Install Calibre CLI
command: |
cd ~
sudo npm install calibre
- run:
name: California
command: |
.circleci/bin/calibre-deploy.sh ${STAGING_URL} California
- run:
name: North Virginia
command: |
.circleci/bin/calibre-deploy.sh ${STAGING_URL} NorthVirginia
- run:
name: London
command: |
.circleci/bin/calibre-deploy.sh ${STAGING_URL} London
- run:
name: Frankfurt
command: |
.circleci/bin/calibre-deploy.sh ${STAGING_URL} Frankfurt
snyk-security:
<<: *defaults
steps:
Expand Down Expand Up @@ -276,6 +302,9 @@ workflows:
context: reaction-validation
requires:
- docker-build
- test-metrics:
requires:
- deploy-to-ecs
- snyk-security:
context: reaction-validation
requires:
Expand Down
9 changes: 2 additions & 7 deletions .snyk
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.12.0
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
'npm:chownr:20180731':
- '*':
reason: This vulnerability only affects packages used in development, such as webpack, more details at https://github.com/isaacs/chownr/issues/14#issuecomment-421662375
expires: 2019-01-31T00:00:00.000Z
version: v1.13.3
patch: {}
ignore: {}
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
# v2.0.0-rc.10

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.

This version should be used with `v2.0.0-rc.10` of https://github.com/reactioncommerce/reaction

# Improvements

### Dev Utilities

- We have made it easier to debug and troubleshoot issues in our Docker image:
(#504)

### General

- We added a new new profile address book page (#499)
- We added support for GraphQL Subscriptions (#492)
- We added the ability to get sitemap data from GQL API and make it available on sitemap\*.xml routes (#488)
- We added the ability to have surcharges attached to an order (#499)

# Breaking Changes

### Multiple Payment Support

- 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)

## Feature

- feat: performance metrics integration with calibre (#508)
- feat: add dev utilities to the docker image (#504)
- feat: new Profile Address page (#499)
- feat: add graphql subscription support (#492)
- feat: setup sitemap routes to get data from GQL server (#488)
- feat: display order surcharges in UI (#449)

## Fixes

- fix: add enhancements to sitemap route handling (#497)
- fix: updated dependencies and snyk policies (#496)

## Refactor

- refactor: update checkout to support multiple payments (#477)
- refactor: navigation data comes from new NavigationTree (#472)

## Chore

- chore: update typography variants based on MUI warning (#506)
- chore: updated config for modules and tree shaking (#495)

## Docs

- docs(tags): update tag docs to include sitemap, isVisible (#505)

# v2.0.0-rc.9
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.

Expand Down
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,21 @@ LABEL maintainer="Reaction Commerce <[email protected]>" \
com.reactioncommerce.docker.git.sha1=$GIT_SHA1 \
com.reactioncommerce.docker.license=$LICENSE

# Get versions to pin with this command:
# apk list bash curl less vim | cut -d " " -f 1 | sed 's/-/=/' | xargs
RUN apk --no-cache add bash curl less vim
SHELL ["/bin/bash", "-o", "pipefail", "-o", "errexit", "-u", "-c"]

# Because Docker Compose uses a volume for node_modules and volumes are owned
# by root by default, we have to initially create node_modules here with correct owner.
# Without this Yarn cannot write packages into node_modules later, when running in a container.
RUN mkdir -p "/usr/local/src/node_modules" && chown node "/usr/local/src" && chown node "/usr/local/src/node_modules"
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"
RUN mkdir -p "/usr/local/src/node_modules"; chown node "/usr/local/src"; chown node "/usr/local/src/node_modules"
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"

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

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

RUN set -ex; \
if [ "$BUILD_ENV" = "production" ]; then \
RUN if [ "$BUILD_ENV" = "production" ]; then \
yarn build; \
fi;

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ To run eslint
docker-compose run --rm web eslint src
```

### Debugging the server with chrome devtools

You can use the chrome devtools to debug the code running in the node.js application server while it's running inside docker.
- 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`
- Open chrome and browse to `chrome://inspect`. Find the process under **Remote Target** and click **inspect**.
### Yarn Commands
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.
Expand Down
12 changes: 10 additions & 2 deletions docs/tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

## Tag Listing Page (TLP)

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

A TLP can have its own display title, metadata in the page's `<head>`, slug and URL.
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.

Each TLP can have its own:
- name (required)
- slug (required)
- display title
- hero image
- metadata fields in the page's `<head>`
- list of featured products, by product ID

### How to store custom metadata for the TLP

Expand Down
129 changes: 69 additions & 60 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reaction-next-starterkit",
"version": "2.0.0-rc.9",
"version": "2.0.0-rc.10",
"description": "",
"main": "index.js",
"keywords": [],
Expand All @@ -10,6 +10,7 @@
"url": "https://reactioncommerce.com"
},
"license": "GPL-3.0",
"sideEffects": false,
"scripts": {
"dev": "NODE_ENV=development node ./src/server.js",
"build": "yarn run build-clean && NODE_ENV=production IS_BUILDING_NEXTJS=1 next build src",
Expand All @@ -30,89 +31,92 @@
]
},
"dependencies": {
"@material-ui/core": "^3.1.0",
"@reactioncommerce/components": "0.60.1",
"@reactioncommerce/components-context": "^1.1.0",
"@segment/snippet": "^4.3.1",
"apollo-cache-inmemory": "^1.1.11",
"apollo-client": "^2.2.7",
"apollo-link": "^1.2.2",
"apollo-link-context": "^1.0.8",
"apollo-link-error": "^1.0.9",
"apollo-link-http": "^1.5.4",
"@material-ui/core": "^3.9.2",
"@reactioncommerce/components": "^0.63.0",
"@reactioncommerce/components-context": "^1.2.0",
"@segment/snippet": "^4.4.0",
"apollo-cache-inmemory": "^1.4.2",
"apollo-client": "^2.4.12",
"apollo-link": "^1.2.8",
"apollo-link-context": "^1.0.14",
"apollo-link-error": "^1.1.7",
"apollo-link-http": "^1.5.11",
"apollo-link-ws": "^1.0.14",
"body-parser": "^1.18.2",
"chalk": "^2.3.2",
"classnames": "^2.2.5",
"chalk": "^2.4.2",
"classnames": "^2.2.6",
"compression": "^1.7.3",
"cookie-parser": "^1.4.3",
"cookie-session": "^2.0.0-beta.3",
"envalid": "^4.1.4",
"envalid": "^4.2.0",
"express": "^4.16.4",
"graphql": "^0.13.2",
"graphql-tag": "^2.8.0",
"graphql": "14.1.1",
"graphql-tag": "2.10.1",
"isomorphic-fetch": "^2.2.1",
"js-cookie": "^2.2.0",
"keymirror": "^0.1.1",
"lodash.isequal": "^4.5.0",
"mdi-material-ui": "^5.4.0",
"mobx": "^4.1.1",
"mobx-react": "^5.0.0",
"lodash": "^4.17.11",
"mdi-material-ui": "^5.9.0",
"mobx": "^4.9.2",
"mobx-react": "^5.4.3",
"next": "^7.0.2",
"next-routes": "^1.4.2",
"passport": "^0.4.0",
"passport-oauth2": "^1.4.0",
"prop-types": "^15.6.2",
"react": "16.4.2",
"react-apollo": "^2.1.3",
"react": "16.7.0",
"react-apollo": "^2.4.1",
"react-container-query": "^0.11.0",
"react-dom": "16.4.2",
"react-dom": "16.7.0",
"react-helmet": "^5.2.0",
"react-stripe-elements": "^2.0.1",
"react-tracking": "^5.4.1",
"react-jss": "^8.6.1",
"react-stripe-elements": "^2.0.3",
"react-tracking": "^5.6.0",
"reacto-form": "^0.0.2",
"styled-components": "^3.4.9"
"styled-components": "^3.4.10",
"subscriptions-transport-ws": "^0.9.15"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/node": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@reactioncommerce/eslint-config": "^1.7.0",
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/node": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.3.0",
"@babel/plugin-proposal-decorators": "^7.3.0",
"@babel/plugin-proposal-export-namespace-from": "^7.2.0",
"@babel/plugin-proposal-function-sent": "^7.2.0",
"@babel/plugin-proposal-json-strings": "^7.2.0",
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
"@babel/plugin-proposal-throw-expressions": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-syntax-import-meta": "^7.2.0",
"@babel/preset-env": "^7.3.1",
"@reactioncommerce/eslint-config": "^1.9.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^8.2.2",
"babel-jest": "^23.6.0",
"babel-plugin-dynamic-import-node": "^2.1.0",
"babel-plugin-module-resolver": "^3.1.1",
"babel-plugin-styled-components": "^1.7.1",
"babel-eslint": "^8.2.6",
"babel-jest": "^24.0.0",
"babel-plugin-dynamic-import-node": "^2.2.0",
"babel-plugin-module-resolver": "^3.1.3",
"babel-plugin-styled-components": "^1.10.0",
"broken-link-checker": "^0.7.8",
"chai": "^4.1.2",
"chai": "^4.2.0",
"chai-cheerio": "^1.0.0",
"cheerio": "^1.0.0-rc.2",
"enzyme": "^3.6.0",
"enzyme-adapter-react-16": "^1.5.0",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.8.0",
"eslint": "^4.19.1",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-jest": "^21.15.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-react": "^7.7.0",
"jest": "^23.6.0",
"jest-junit": "^3.6.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jest": "^21.27.2",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-react": "^7.12.4",
"jest": "^24.0.0",
"jest-junit": "^6.2.1",
"jest-styled-components": "^6.3.1",
"jest-transform-graphql": "2.1.0",
"mocha": "^5.2.0",
"react-test-renderer": "^16.3.1",
"rimraf": "^2.6.2",
"snyk": "^1.73.0"
"react-test-renderer": "^16.7.0",
"rimraf": "^2.6.3",
"snyk": "^1.126.0"
},
"jest": {
"collectCoverage": true,
Expand All @@ -124,11 +128,16 @@
"!**/vendor/**"
],
"coverageDirectory": "reports/coverage",
"testResultsProcessor": "jest-junit",
"reporters": [
"default",
"jest-junit"
],
"roots": [
"./src"
],
"setupTestFrameworkScriptFile": "<rootDir>/tests/setupTests.js",
"setupFilesAfterEnv": [
"<rootDir>/tests/setupTests.js"
],
"transform": {
"\\.(gql|graphql)$": "jest-transform-graphql",
".*": "babel-jest"
Expand Down
Loading

0 comments on commit a16315b

Please sign in to comment.