Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.0.0 rc.12 #547

Merged
merged 52 commits into from
Jul 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bbd2a89
chore: ignore snyk js-yaml vulns for 30 days
focusaurus Apr 9, 2019
e1bc08b
Merge pull request #523 from reactioncommerce/chore-snyk-ignore-js-yaml
nnnnat Apr 9, 2019
ff75d28
chore: configure prettier arrowParens to match eslint
focusaurus Apr 3, 2019
8b58329
style: autoformat serverAuth.js with prettier
focusaurus Apr 3, 2019
d1e7347
fix: always send a response to logout requests
focusaurus Apr 3, 2019
e6f8264
chore: Temp bump circleci cache. Update snyk.
focusaurus Apr 3, 2019
7a47443
chore: whitespace in package.json to bypass docker layer cache in
focusaurus Apr 3, 2019
3d83c56
Merge pull request #520 from reactioncommerce/fix-pete-519-logout-err…
impactmass Apr 9, 2019
51a1e0f
docs: Fix minor typo on README.md
stefancruz Apr 19, 2019
be9aac4
Merge pull request #525 from aldaircruz/patch-1
nnnnat Apr 22, 2019
fd7d48e
feat: remove unused fields from GQL query
aldeed May 3, 2019
54ee6d3
Merge pull request #527 from reactioncommerce/feat-aldeed-remove-unus…
kieckhafer May 7, 2019
b800e36
fix: prettier config was in the wrong place
focusaurus May 31, 2019
48d1668
chore: update yarn.lock to resolve snyk js-yaml vuln
focusaurus May 31, 2019
969d6a3
Merge pull request #531 from reactioncommerce/chore-update-deps-for-s…
spencern May 31, 2019
0d092f7
Merge pull request #532 from reactioncommerce/fix-prettier-jest-oops
kieckhafer May 31, 2019
e8f883d
chore: bulk change all caret semver ranges to tilde
focusaurus Jun 3, 2019
8c1b48c
chore: bump a few deps that our range was behind on
focusaurus Jun 3, 2019
1efc1d9
Merge pull request #534 from reactioncommerce/chore-pete-semver-patch-x
focusaurus Jun 3, 2019
a9fcde2
test out npx change
jeffcorpuz Jun 3, 2019
22c2f07
pin 2.0.2 version for calibre
jeffcorpuz Jun 3, 2019
93314ad
Merge pull request #535 from reactioncommerce/fix-calibre-step
focusaurus Jun 3, 2019
3bc49be
chore(license): match license from LICENSE.md and README
Jun 7, 2019
5999e57
Merge pull request #536 from reactioncommerce/509-match-package-license
nnnnat Jun 7, 2019
a02c29a
docs(README): add instructions on how to run starterkit against a pro…
Jun 7, 2019
0102e03
docs(README): start not startlocal
Jun 7, 2019
0e7728e
Merge pull request #537 from reactioncommerce/docs-readme-docker
nnnnat Jun 7, 2019
ed839bc
chore: change pinned deps to ~ ranges
focusaurus Jun 11, 2019
e47cf06
Merge pull request #538 from reactioncommerce/chore-pete-semver-tilde…
aldeed Jun 12, 2019
aca8007
docs(README): fix Docker/debugger command
machikoyasuda Jun 15, 2019
14e72bf
Merge pull request #539 from reactioncommerce/machikoyasuda-patch-1
focusaurus Jun 17, 2019
61722ea
chore: only run snyk when package.json changes
focusaurus Jun 18, 2019
3e4ccee
Merge pull request #541 from reactioncommerce/chore-ci-snyk
spencern Jun 19, 2019
619af8d
fix: de-duplicate styled-components package
willopez Jun 27, 2019
66e09b9
Merge pull request #542 from reactioncommerce/willopez-dedup-styled-c…
aldeed Jun 28, 2019
8a93435
docs: remove production warning
spencern Jun 27, 2019
9d2df2d
Merge pull request #543 from reactioncommerce/spencer-docs-remove-pro…
spencern Jun 28, 2019
7fd2571
chore: rename project to example-storefront, updated to use graphql-b…
nnnnat Jun 28, 2019
c65bc3d
docs: update project name in static-assets.md.
nnnnat Jun 28, 2019
198de8b
docs: update project name in static-assets.md.
nnnnat Jun 28, 2019
d79eeb9
Merge branch 'chore-476-nnnnat-rename-project' of github.com:/reactio…
nnnnat Jul 1, 2019
c353837
Merge branch 'develop' into chore-476-nnnnat-rename-project
nnnnat Jul 1, 2019
93a8d48
Merge pull request #544 from reactioncommerce/chore-476-nnnnat-rename…
willopez Jul 1, 2019
e31a4d5
removes fossa status from readme
Jul 1, 2019
9bc0150
Merge pull request #545 from reactioncommerce/remove_fossa_readme
nnnnat Jul 1, 2019
c8ffaa7
update CHANGELOG, bump version to rc 12
jeffcorpuz Jul 1, 2019
9308eef
Merge pull request #546 from reactioncommerce/chore-update-changelog-…
jeffcorpuz Jul 1, 2019
3203ac0
Merge pull request #546 from reactioncommerce/chore-update-changelog-…
jeffcorpuz Jul 1, 2019
114167f
Merge branch 'release-v.2.0.0-rc.12' of https://github.com/reactionco…
jeffcorpuz Jul 1, 2019
71a2d19
chore: resolve merge conflicts in CHANGELOG and package.json
spencern Jul 1, 2019
a62a07b
chore: Update changelog to match release notes
spencern Jul 2, 2019
3bf5cb0
chore: update changelog to include notes about GraphQL API change
spencern Jul 2, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/bin/calibre-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ URL=$1
LOCATION=$2

# Run One Off Test
./../node_modules/calibre/bin/linux/calibre test create $URL --location=$LOCATION
npx calibre@2.0.2 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]')"
npx calibre@2.0.2 site create-snapshot --site reaction-core-"$(echo $LOCATION | tr '[A-Z]' '[a-z]')"
else
echo "No Snapshot Configured for Location"
fi
63 changes: 63 additions & 0 deletions .circleci/bin/should-run-snyk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/env bash

# Please Use Google Shell Style: https://google.github.io/styleguide/shell.xml

# ---- Start unofficial bash strict mode boilerplate
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -o errexit # always exit on error
set -o errtrace # trap errors in functions as well
set -o pipefail # don't ignore exit codes when piping output
set -o posix # more strict failures in subshells
# set -x # enable debugging

IFS=$'\n\t'
# ---- End unofficial bash strict mode boilerplate

validate_env() {
declare -a missing
for var in "$@"; do
if [[ -z "${!var}" ]]; then
echo "⚠️ ERROR: Missing required environment variable: ${var}" 1>&2
missing+=("${var}")
fi
done
if [[ -n "${missing[*]}" ]]; then
exit 1
fi
}

main() {
validate_env CIRCLE_COMPARE_URL DOCKER_REPOSITORY
if [[ -z "${CIRCLE_PULL_REQUEST}" ]]; then
echo "NO: Not a PR. Skipping Snyk."
exit
fi
# Determine PR number from pull request link
CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"
PATH="${PATH}:${CIRCLE_WORKING_DIRECTORY}/node_modules/.bin"
if [[ -v CIRCLE_PR_NUMBER ]] && [ -n ${CIRCLE_PR_NUMBER} ]; then
# Get PR from github API
url="https://api.github.com/repos/${DOCKER_REPOSITORY}/pulls/${CIRCLE_PR_NUMBER}"
# Determine target/base branch from API response
TARGET_BRANCH=$(curl --silent --location --fail --show-error "${url}" |
jq -r '.base.ref')
fi
if [[ -z "${TARGET_BRANCH}" || ${TARGET_BRANCH} == "null" ]]; then
echo "NO: Not a PR. Skipping Snyk."
exit
fi
# If target branch does not exist or is master, run snyk tests
if [[ ${TARGET_BRANCH} == "master" ]] || [[ -z "${TARGET_BRANCH/[ ]*\n/}" ]]; then
echo "YES: always run when targeting master"
exit
fi
# If package.json is different from the base branch, run snyk
if git diff "$(basename "${CIRCLE_COMPARE_URL}")" package.json | grep -q diff; then
echo "YES: package.json different. Running Snyk."
exit
fi
echo "NO: package.json identical to target branch. Skipping Snyk."
exit
}

main "$@"
43 changes: 22 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ defaults: &defaults
# - DOCKER_REPOSITORY: "202687395681.dkr.ecr.us-west-2.amazonaws.com/reactioncommerce/reaction-next-starterkit"
- DOCKER_NAMESPACE: "reactioncommerce"
- DOCKER_NAME: "reaction-next-starterkit"
- GLOBAL_CACHE_VERSION: “v3”

docker:
- image: circleci/node:8-stretch
Expand Down Expand Up @@ -235,11 +236,6 @@ jobs:
<<: *defaults
steps:
- checkout
- run:
name: Install Calibre CLI
command: |
cd ~
sudo npm install calibre
- run:
name: California
command: |
Expand All @@ -260,6 +256,7 @@ jobs:
snyk-security:
<<: *defaults
steps:
- checkout
- setup_remote_docker
- attach_workspace:
at: docker-cache
Expand All @@ -268,25 +265,30 @@ jobs:
command: |
docker load < docker-cache/docker-image.tar
- run:
name: Snyk
name: Snyk Security
# Snyk doesn't look up the directory tree for node_modules as
# NodeJS does so we have to take some extra measures to test in the
# Docker image. Copy package.json up a directory so that it is a
# sibling to node_modules, then run snyk test.
command: |
# Snyk doesn't look up the directory tree for node_modules as
# NodeJS does so we have to take some extra measures to test in the
# Docker image. Copy package.json up a directory so that it is a
# sibling to node_modules, then run snyk test.
docker run \
--env-file docker-cache/.env \
-e "SNYK_TOKEN=$SNYK_TOKEN" \
--name reactionapp_next_starterkit \
-w /usr/local/src \
"$DOCKER_REPOSITORY:$CIRCLE_SHA1" \
sh -c "cp reaction-app/package.json ./ && cp reaction-app/.snyk ./ && snyk test"
answer=$(./.circleci/bin/should-run-snyk.sh)
if [[ "${answer}" =~ "^YES" ]] ; then
docker run \
--env-file docker-cache/.env \
--env "SNYK_TOKEN" \
--name reactionapp_next_starterkit \
--workdir /usr/local/src \
"$DOCKER_REPOSITORY:$CIRCLE_SHA1" \
sh -c "cp reaction-app/package.json ./ && cp reaction-app/.snyk ./ && snyk test"
else
echo "Skipping snyk: ${answer}"
fi
workflows:
version: 2
build_and_test:
jobs:
- docker-build-nonprod-and-lint:
context: reaction-build-read
context: reaction-build-read
- docker-build:
context: reaction-build-read
- docker-push:
Expand All @@ -303,7 +305,7 @@ workflows:
requires:
- docker-build
- test-metrics:
requires:
requires:
- deploy-to-ecs
- snyk-security:
context: reaction-validation
Expand All @@ -316,6 +318,5 @@ workflows:
branches:
only: /^develop$/
- e2e-test:
requires:
requires:
- deploy-to-ecs

6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
CANONICAL_URL=http://localhost:4000
ENABLE_SPA_ROUTING=true
EXTERNAL_GRAPHQL_URL=http://localhost:3000/graphql-alpha
INTERNAL_GRAPHQL_URL=http://reaction.api.reaction.localhost:3000/graphql-alpha
EXTERNAL_GRAPHQL_URL=http://localhost:3000/graphql-beta
INTERNAL_GRAPHQL_URL=http://reaction.api.reaction.localhost:3000/graphql-beta
NODE_ENV=development
OAUTH2_ADMIN_PORT=4445
OAUTH2_AUTH_URL=http://localhost:4444/oauth2/auth
OAUTH2_CLIENT_ID=reaction-next-starterkit
OAUTH2_CLIENT_ID=example-storefront
OAUTH2_CLIENT_SECRET=CHANGEME
OAUTH2_HOST=hydra.auth.reaction.localhost
OAUTH2_IDP_HOST_URL=http://reaction.api.reaction.localhost:3000/
Expand Down
2 changes: 1 addition & 1 deletion .graphqlrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"request": {
"url": "http://localhost:3000/graphql-alpha"
"url": "http://localhost:3000/graphql-beta"
}
}
3 changes: 1 addition & 2 deletions .snyk
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.13.3
version: v1.13.4
patch: {}
ignore: {}
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
# v2.0.0-rc.12
This is our fourth release candidate for this project. While this project is technically still `pre-release` until we've released the final 2.0.0 version, it's the most stable version of Reaction Commerce, and we recommend starting new projects with it at this point. See https://github.com/reactioncommerce/example-storefront/issues/487#issuecomment-507468894 for more detail on this.

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

## Highlights
We have [renamed](https://github.com/reactioncommerce/example-storefront/pull/544) this project from `reaction-next-starterkit` to `example-storefront` to better convey the intent behind our creating it. We’re also [updating our docs](https://github.com/reactioncommerce/reaction-docs/pull/829) to clarify this change.

The GraphQL API in [reaction v2.0.0-rc.12](https://github.com/reactioncommerce/reaction/pull/5259) has been changed from `/graphql-alpha` to `graphql-beta` to indicate the increased stability of the API. We think there are still some breaking changes to come in the next 3-6 months to the GraphQL API which is why we're keeping the `-beta` suffix for now. As you find bugs with that API, please file issues in the [reaction](https://github.com/reactioncommerce/reaction/issues) repo.

# Improvements

## Feature

- feat: always send a response to logout requests (#520)
- feat: add Orders to Account Profile (#507)

## Fix

- fix: de-duplicate styled-components package (#542)
- fix: only run snyk when package.json changes (#541)
- fix: change calibre ci step to use npx (#535)
- fix: prettier config was in the wrong place (#532)
- feat: remove unused fields from GQL query (#527)
- fix: Update component theming example remove blocking code to allow starterkit to start (#514)

## Chore

- chore: removes fossa status from readme (#545)
- chore: rename project to example-storefront (#544)
- chore: fix debugger command in README (#539)
- chore: change pinned deps to ~ ranges (#538)
- chore: match license from LICENSE.md and README (#536)
- chore: Switch to semver ~1.2.3 style ranges (#534)
- chore: update yarn.lock to resolve snyk js-yaml vuln (#531)
- chore: ignore snyk js-yaml vuln for 30 days (#523)

## Docs

- docs: remove production warning (#543)
- docs: add instructions on how to run starterkit w/ prod API (#537)
- docs: Fix minor typo on [README.md](http://readme.md) (#525)

# v2.0.0-rc.11

This is our third release candidate for this project. This project should be considered `pre-release` until we've released the final 2.0.0 version.
Expand Down
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM node:10-alpine

ARG NAME=reaction-next-starterkit
ARG NAME=example-storefront
ARG DESCRIPTION=""
ARG URL=https://github.com/reactioncommerce/reaction-next-starterkit
ARG DOC_URL=https://github.com/reactioncommerce/reaction-next-starterkit
ARG VCS_URL=https://github.com/reactioncommerce/reaction-next-starterkit
ARG URL=https://github.com/reactioncommerce/example-storefront
ARG DOC_URL=https://github.com/reactioncommerce/example-storefront
ARG VCS_URL=https://github.com/reactioncommerce/example-storefront
ARG VCS_REF
ARG VENDOR
ARG BUILD_DATE
Expand Down Expand Up @@ -54,7 +54,6 @@ LABEL maintainer="Reaction Commerce <engineering@reactioncommerce.com>" \
com.reactioncommerce.docker.git.sha1=$GIT_SHA1 \
com.reactioncommerce.docker.license=$LICENSE

# 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"]

Expand Down
Loading