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 v3.0.0 #658

Merged
merged 62 commits into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
870a580
feat: updated ENV for 3.0
aldeed Oct 28, 2019
8cdf696
docs: add step to readme
aldeed Oct 28, 2019
18a5dd2
feat: update logout for reaction-identity
aldeed Oct 28, 2019
3cf3be1
feat: remove deprecated currentQuantity field
aldeed Oct 28, 2019
4006ee1
Merge branch 'develop' into release-v3.0.0
aldeed Oct 30, 2019
ab85e0a
fix: fixes for currentQuantity removal
aldeed Oct 30, 2019
f992424
chore: fix lint
aldeed Oct 30, 2019
8a5f7c2
Merge branch 'develop' into release-v3.0.0
aldeed Nov 6, 2019
2d87a05
Merge pull request #614 from reactioncommerce/master
kieckhafer Nov 14, 2019
f2b6c98
refactor: use cartToken for APIs
trojanh Nov 23, 2019
7c9d82b
fix: update withTag query for breaking API param changes
aldeed Dec 3, 2019
86fc8ed
fix: add missing static fn to avoid errors
aldeed Dec 3, 2019
2c7d663
Merge pull request #621 from reactioncommerce/fix-aldeed-tags-api-params
mikemurray Dec 3, 2019
6fb8c1c
fix: made bin/setup always run from the desired path
rosshadden Dec 4, 2019
87da2c8
Merge pull request #622 from reactioncommerce/fix-bin-setup
rosshadden Dec 4, 2019
574b8ba
Merge pull request #616 from trojanh/refactor-4642-make-token-consistent
willopez Dec 6, 2019
af4456f
Merge remote-tracking branch 'origin/develop' into release-v3.0.0
rosshadden Dec 9, 2019
b222d9c
chore: use published image for docker-compose
aldeed Dec 9, 2019
e5836de
chore: tell Git to ignore docker-compose.override.yml
aldeed Dec 9, 2019
d0d6068
chore: release v3.0.0-alpha
rosshadden Dec 9, 2019
d2590c8
Merge pull request #623 from reactioncommerce/chore-use-published-ima…
aldeed Dec 10, 2019
2fa8844
fix: update param name which was missed
kieckhafer Dec 12, 2019
8e1d450
fix: update token to cartToken
kieckhafer Dec 12, 2019
bb5d7c0
Merge pull request #625 from reactioncommerce/fix-kieckhafer-cartToken
kieckhafer Dec 12, 2019
1f16fc2
chore: updated version
rosshadden Dec 13, 2019
552ab26
Merge pull request #624 from reactioncommerce/release-v3.0.0-alpha
rosshadden Dec 13, 2019
7465ff9
fix: handle OAUTH2_IDP_HOST_URL with no ending slash
aldeed Dec 13, 2019
6d80109
fix: show UI when no shop
aldeed Dec 13, 2019
e72cf5b
fix: more helpful logging of 400 errors
aldeed Dec 13, 2019
052a330
feat: auto-create Hydra client on startup
aldeed Dec 13, 2019
ac0d967
Merge pull request #628 from reactioncommerce/feat-aldeed-auto-create…
aldeed Dec 16, 2019
9686984
Merge branch 'release-v3.0.0' into fix-aldeed-626-logout-url
willopez Dec 16, 2019
748aa60
Merge pull request #627 from reactioncommerce/fix-aldeed-626-logout-url
mikemurray Dec 17, 2019
168055f
Merge branch 'develop' into release-v3.0.0
kieckhafer Dec 20, 2019
4d40de1
chore: update CHANGELOG and package.json for v3.0.0-alpha.2
kieckhafer Dec 20, 2019
d440385
Merge pull request #635 from reactioncommerce/release-v3.0.0-alpha.2
rosshadden Dec 23, 2019
84452ce
feat: implement change password flow
aldeed Dec 30, 2019
83e28f9
feat: use standard OpenID logout flow
aldeed Dec 30, 2019
138282f
chore: fix lint
aldeed Dec 30, 2019
8b3210f
Merge pull request #637 from reactioncommerce/feat-aldeed-change-pass…
willopez Dec 31, 2019
5e7cbf8
fix: used `command` instead of `eval`, which correctly handles specia…
rosshadden Dec 31, 2019
88746fe
Merge pull request #639 from reactioncommerce/fix-special-characters-…
aldeed Jan 2, 2020
6a22ca4
chore: release v3.0.0-alpha.3
rosshadden Jan 9, 2020
6bb50d9
Merge pull request #640 from reactioncommerce/chore-release-3.0.0-alp…
rosshadden Jan 10, 2020
f95887e
chore: update version numbers and changelog for v3.0.0-beta
kieckhafer Jan 17, 2020
698cf21
Update CHANGELOG.md
kieckhafer Jan 17, 2020
389ddde
Merge pull request #644 from reactioncommerce/release-v3.0.0-beta
kieckhafer Jan 18, 2020
0fb7d9b
feat: remove `-beta` from GraphQL paths
aldeed Jan 22, 2020
6c3d3dd
chore: copy changes from 2.x/trunk
aldeed Jan 24, 2020
e352a7c
Merge pull request #650 from reactioncommerce/chore-2.x-changes
mikemurray Jan 24, 2020
47a7708
Merge pull request #646 from reactioncommerce/feat-aldeed-gql-no-beta
mikemurray Jan 24, 2020
d5f8c85
Use Lambda webhook for automated PR creation and merging into reactio…
griggheo Jan 27, 2020
e4ff593
remove old job from workflow
griggheo Jan 27, 2020
8c390a9
Merge pull request #651 from reactioncommerce/lambda-webhook-for-gito…
griggheo Jan 28, 2020
a04c1b4
chore: reconfigure docker-compose networks
aldeed Jan 30, 2020
dc9a689
Merge pull request #653 from reactioncommerce/chore-dc-network-rename
aldeed Jan 31, 2020
359fd9e
fix: update query with required shopIds array
kieckhafer Feb 2, 2020
3fd4cd5
Merge pull request #656 from reactioncommerce/fix-kieckhafer-profileO…
aldeed Feb 3, 2020
7cda4b7
chore: beta/2 release
kieckhafer Feb 4, 2020
54e27f3
Merge pull request #657 from reactioncommerce/release-v3.0.0-beta.2
kieckhafer Feb 4, 2020
11ba2ec
chore: update changelog and package.json for v3.0.0
kieckhafer Feb 6, 2020
07e77c7
Merge branch 'trunk' into release-v3.0.0
kieckhafer Feb 6, 2020
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
17 changes: 7 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# in all future steps.
#
# Assumes that the Docker image is published to Docker Hub.
version: 2
version: 2.1

orbs:
webhook: eddiewebb/webhook@volatile

# The following stanza defines a map named defaults with a variable that may be
# inserted using the YAML merge (<<: *) key later in the file to save some
Expand All @@ -13,9 +16,8 @@ defaults: &defaults
- CI_SCRIPTS: "npx --quiet --package @reactioncommerce/ci-scripts@1.9.1"
- DOCKER_REPOSITORY: "reactioncommerce/example-storefront"
- DOCKER_NAME: "example-storefront"
- GITOPS_PR_WEBHOOK: "https://w603b5hwp1.execute-api.us-east-1.amazonaws.com/dev/pullrequests"
- GLOBAL_CACHE_VERSION: “v3”
- SERVICE: "reaction-storefront"
- REACTION_GITOPS_REVIEWERS: "wistonk,griggheo"
docker:
- image: circleci/node:12-stretch

Expand Down Expand Up @@ -83,6 +85,8 @@ jobs:
- run:
name: Build and push production Docker image
command: ${CI_SCRIPTS} docker-build-tag-push . ${DOCKER_REPOSITORY}
- webhook/notify:
endpoint: "${GITOPS_PR_WEBHOOK}"

create-gitops-pull-request:
<<: *defaults
Expand Down Expand Up @@ -111,10 +115,3 @@ workflows:
- dockerfile-lint
- eslint
- test-unit
- create-gitops-pull-request:
context: reaction-gitops
requires:
- docker-build-push
filters:
branches:
only: /^trunk$/
15 changes: 8 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
CANONICAL_URL=http://localhost:4000
ENABLE_SPA_ROUTING=true
EXTERNAL_GRAPHQL_URL=http://localhost:3000/graphql-beta
INTERNAL_GRAPHQL_URL=http://reaction.api.reaction.localhost:3000/graphql-beta
EXTERNAL_GRAPHQL_URL=http://localhost:3000/graphql
INTERNAL_GRAPHQL_URL=http://api.reaction.localhost:3000/graphql
OAUTH2_ADMIN_PORT=4445
OAUTH2_ADMIN_URL=http://hydra.reaction.localhost:4445
OAUTH2_AUTH_URL=http://localhost:4444/oauth2/auth
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/
OAUTH2_LOGOUT_URL=http://localhost:3000/account/logout
OAUTH2_REDIRECT_URL=http://localhost:4000/callback
OAUTH2_TOKEN_URL=http://hydra.auth.reaction.localhost:4444/oauth2/token
OAUTH2_PUBLIC_LOGOUT_URL=http://localhost:4444/oauth2/sessions/logout
OAUTH2_HOST=hydra.reaction.localhost
OAUTH2_IDP_PUBLIC_CHANGE_PASSWORD_URL=http://localhost:4100/account/change-password?email=EMAIL&from=FROM
OAUTH2_IDP_HOST_URL=http://identity.reaction.localhost:4100
OAUTH2_TOKEN_URL=http://hydra.reaction.localhost:4444/oauth2/token
PORT=4000
SEGMENT_ANALYTICS_SKIP_MINIMIZE=true
SEGMENT_ANALYTICS_WRITE_KEY=ENTER_KEY_HERE
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ src/.next/*
build
/reports

package-lock.json
docker-compose.override.yml
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-beta"
"url": "http://localhost:3000/graphql"
}
}
50 changes: 49 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,56 @@
# v3.0.0

This is the v3.0.0 release of `example-storefront`, designed to work with v3.0.0 of the Reaction API.

## Features

- feat: remove `-beta` from GraphQL paths [#646](https://github.com/reactioncommerce/example-storefront/pull/646)
- feat: Use Lambda webhook for automated PR creation and merging into reaction-gitops [#651](https://github.com/reactioncommerce/example-storefront/pull/651)
- feat: implemented change password flow and standard OpenID logout flow [#637](https://github.com/reactioncommerce/example-storefront/pull/637)
- feat: auto-create Hydra client on startup [#628](https://github.com/reactioncommerce/example-storefront/pull/628)

## Fixes

- fix: update query with required shopIds array [#656](https://github.com/reactioncommerce/example-storefront/pull/656)
- fixes: made `bin/setup` handle special characters in variables [#639](https://github.com/reactioncommerce/example-storefront/pull/639)
- fix: params for withTag API query [#621](https://github.com/reactioncommerce/example-storefront/pull/621)
- fix: handle OAUTH2_IDP_HOST_URL with no ending slash and missing shop [#627](https://github.com/reactioncommerce/example-storefront/pull/627)

## Chores

- chore: reconfigure docker-compose networks [#653](https://github.com/reactioncommerce/example-storefront/pull/653)
- chore: copy changes from 2.x/trunk [#650](https://github.com/reactioncommerce/example-storefront/pull/650)
- chore: use published image for docker-compose [#623](https://github.com/reactioncommerce/example-storefront/pull/623)

## Refactors

- refactor: Update token name `cartToken` [#616](https://github.com/reactioncommerce/example-storefront/pull/616)

## Notes

*These changes were originally tested and released in our alpha and beta releases*

- [v3.0.0-beta.2](https://github.com/reactioncommerce/example-storefront/releases/tag/v3.0.0-beta.2)
- [v3.0.0-beta](https://github.com/reactioncommerce/example-storefront/releases/tag/v3.0.0-beta)
- [v3.0.0-alpha.3](https://github.com/reactioncommerce/example-storefront/releases/tag/v3.0.0-alpha.3)
- [v3.0.0-alpha.2](https://github.com/reactioncommerce/example-storefront/releases/tag/v3.0.0-alpha.2)
- [v3.0.0-alpha](https://github.com/reactioncommerce/example-storefront/releases/tag/v3.0.0-alpha)

*The following Reaction projects are being released one time in coordination as v3.0.0*

- [Reaction API](https://github.com/reactioncommerce/reaction)
- [Reaction Hydra](https://github.com/reactioncommerce/reaction-hydra)
- [Reaction Identity](https://github.com/reactioncommerce/reaction-identity)
- [Reaction Admin (beta)](https://github.com/reactioncommerce/reaction-admin)
- [Example Storefront](https://github.com/reactioncommerce/example-storefront)
- [Reaction Development Platform](https://github.com/reactioncommerce/reaction-development-platform)

*After this release, Reaction releases will no longer be coordinated across all projects - we'll release each project independently, as needed. This means version numbers will no longer be in sync. The newest versions of each project will work together.*

# v2.9.1

Example Storefront v2.9.1 is a patch update to keep this project in sync with [Reaction v2.9.1](https://github.com/reactioncommerce/reaction) and [reaction-hydra v2.9.1](https://github.com/reactioncommerce/reaction-hydra)


## Fixes

- fix: login from storefront [#633](https://github.com/reactioncommerce/example-storefront/pull/633)
Expand Down
29 changes: 13 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,16 @@ This example storefront is built with [Next.js](https://nextjs.org/), [React](ht

Follow the [Reaction Platform docs](https://docs.reactioncommerce.com/docs/installation-reaction-platform) to install and run all the services necessary to run the storefront:

| Directory: Service | URL |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------ |
| [`reaction`](https://github.com/reactioncommerce/reaction): GraphQL API | [localhost:3000/graphql-beta](localhost:3000/graphql-beta) |
| [`reaction`](https://github.com/reactioncommerce/reaction): GraphiQL developer tool | [localhost:3000/graphql-beta](localhost:3000/graphql-beta) |
| [`reaction`](https://github.com/reactioncommerce/reaction): Operator UI | [localhost:3000](localhost:3000) |
| [`reaction`](https://github.com/reactioncommerce/reaction): MongoDB | [localhost:27017](localhost:27017) |
| [`reaction-hydra`](https://github.com/reactioncommerce/reaction-hydra): Authentication | [localhost:4444](localhost:4444) |
| [`example-storefront`](https://github.com/reactioncommerce/example-storefront): Storefront | [localhost:4000](localhost:4000) |

**Note**: The storefront has redirects so if you open any of the following URLs, you'll be redirected to the GraphiQL developer tool:
- [localhost:4000/graphql]()
- [localhost:4000/graphql-beta]()
- [localhost:4000/graphiql]()
| Directory: Service | URL |
|-----------------------------------------------------------------------------------------------|--------------------------------------------------|
| [`reaction`](https://github.com/reactioncommerce/reaction): GraphQL API | [localhost:3000/graphql](localhost:3000/graphql) |
| [`reaction`](https://github.com/reactioncommerce/reaction): GraphQL Playground developer tool | [localhost:3000/graphql](localhost:3000/graphql) |
| [`reaction`](https://github.com/reactioncommerce/reaction): Reaction Admin | [localhost:4080](localhost:4080) |
| [`reaction`](https://github.com/reactioncommerce/reaction): MongoDB | [localhost:27017](localhost:27017) |
| [`reaction-hydra`](https://github.com/reactioncommerce/reaction-hydra): Authentication | [localhost:4444](localhost:4444) |
| [`example-storefront`](https://github.com/reactioncommerce/example-storefront): Storefront | [localhost:4000](localhost:4000) |

**Note**: The storefront has redirects so that if you open [http://localhost:4000/graphql](http://localhost:4000/graphql), you'll be redirected to the GraphQL Playground.

## Configuration

Expand Down Expand Up @@ -78,7 +75,7 @@ docker-compose up -d && docker-compose logs -f

### Run in development against a production API

Change the `INTERNAL_GRAPHQL_URL` in `.env` to the production API URL. The URL should end in `/graphql-beta`, like: `https://my-website.com/graphql-beta`. Save the `.env` file and restart the application with:
Change the `INTERNAL_GRAPHQL_URL` in `.env` to the production API URL. The URL should end in `/graphql`, like: `https://my-website.com/graphql`. Save the `.env` file and restart the application with:

```sh
docker-compose run --rm --service-ports web yarn start
Expand Down Expand Up @@ -152,7 +149,7 @@ Sometimes we need to test the [Example Storefront Component Library](https://git
1. After the build is done, `cd` into the new `dist` folder it just built and run `yarn link` to allow the library to be installed into the storefront. This will link `@reactioncommerce/components`
1. Inside the `example-storefront` repo, temporarily rename your `.yarnrc` file to anything else (i.e. `.yarnrc-temp`)
1. Run `yarn install` and then the command `yarn link "@reactioncommerce/components"` to set the local version as an override of the published npm version
1. Inside your `.env` file, change `INTERNAL_GRAPHQL_URL` to equal `http://localhost:3030/graphql-beta`, the same as the `EXTERNAL_GRAPHQL_URL`
1. Inside your `.env` file, change `INTERNAL_GRAPHQL_URL` to equal `http://localhost:3000/graphql`, the same as the `EXTERNAL_GRAPHQL_URL`
1. Start the storefront locally by running the command `export $(cat .env | xargs) && yarn dev`
1. Your storefront should now be running at `localhost:4000`
- If you see errors about not being able to find peer dependency packages, that seems to be an issues with yarn linking. You can just temporarily `yarn add` each of those packages in the component library `package/dist` folder. (This folder is gitignored anyway.)
Expand Down Expand Up @@ -191,7 +188,7 @@ docker build -t reaction-storefront .
Then, to start the app on your machine, make sure the Reaction API container is already running and enter:

```sh
docker run -it --name storefront -p 4000:4000 --env-file .env --network api.reaction.localhost reaction-storefront
docker run -it --name storefront -p 4000:4000 --env-file .env --network reaction.localhost reaction-storefront
```

_**NOTE:** You can replace the number before the colon in `4000:4000` with a different localhost port you'd like the application to run at._
Expand Down
78 changes: 0 additions & 78 deletions bin/create-hydra-client.js

This file was deleted.

8 changes: 4 additions & 4 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
env_file=${__dir}/../.env
env_example_file=${__dir}/../.env.example
cd "$(dirname "${BASH_SOURCE[0]}")/.."
env_file=./.env
env_example_file=./.env.example

function main {
set -e
Expand All @@ -17,7 +17,7 @@ function add_new_env_vars {
export IFS=$'\n'
for var in $(cat "${env_example_file}"); do
key="${var%%=*}" # get var key
var=$(eval echo "$var") # generate dynamic values
var=$(command echo "$var") # generate dynamic values

# If .env doesn't contain this env key, add it
if ! $(grep -qLE "^$key=" "${env_file}"); then
Expand Down
6 changes: 3 additions & 3 deletions bin/start
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ IFS="$(printf "\n\t")"

cd "$(dirname "$0")/.."
yarn install
printf "Creating hydra client…"
printf "Waiting for Hydra service... "
./bin/wait-for.sh "${OAUTH2_HOST}:${OAUTH2_ADMIN_PORT}"
./bin/create-hydra-client.js
yarn dev
printf "Hydra service found!\n"
yarn start:dev
27 changes: 27 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This docker-compose file is used to run the project in Docker for development.
# The local files are mounted into the created container.
#
# Usage:
# ln -s docker-compose.dev.yml docker-compose.override.yml
# docker-compose up [-d]
#
# To go back to running the published image:
# rm docker-compose.override.yml

version: '3.4'

services:
web:
image: reactioncommerce/node-dev:10.16.3-v2
command: "./bin/start"
volumes:
- .:/usr/local/src/app
- web-yarn:/home/node/.cache/yarn
# Do not link in node_modules from the host
# This allows IDEs to run lint etc with native add-ons for host OS
# Without interfering with native add-ons in container
- empty_node_modules:/usr/local/src/app/node_modules

volumes:
web-yarn:
empty_node_modules:
32 changes: 9 additions & 23 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,23 @@
# This docker-compose file is used to run the Example Storefront in Docker for development.
# The local files are mounted into the created container.
# This docker-compose file is used to run the project's published image
#
# Usage: docker-compose up [-d]
#
# See comment in docker-compose.dev.yml if you want to run for development.

version: '3.4'

networks:
api:
reaction:
external:
name: api.reaction.localhost
auth.reaction.localhost:
external:
name: auth.reaction.localhost
name: reaction.localhost

services:
web:
image: reactioncommerce/node-dev:10.16.3-v2
image: reactioncommerce/example-storefront:release-v3.0.0
env_file:
- ./.env
networks:
api:
aliases:
- storefront
auth.reaction.localhost:
default:
reaction:
ports:
- 4000:4000
volumes:
- web-yarn:/home/node/.cache/yarn
- .:/usr/local/src/app
# Do not link in node_modules from the host
# This allows IDEs to run lint etc with native add-ons for host OS
# Without interfering with native add-ons in container
- empty_node_modules:/usr/local/src/app/node_modules

volumes:
web-yarn:
empty_node_modules:
5 changes: 0 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,3 @@ docker-compose run --rm web adr new "Implement the Torpedos"

- [Testing](testing.md)
- [Patterns](testing.md#patterns)

## Tools and Utilities

- [Tools to help with development](utilities.md)
- [GraphiQL App installation and setup](utilities.md#graphiql-app)
Loading