Skip to content

Commit

Permalink
Merge branch 'develop' into feat-aldeed-support-mjs
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Dobbertin <eric@dairystatedesigns.com>
  • Loading branch information
aldeed committed Feb 13, 2019
2 parents 6f28174 + 37e3b7f commit e6a8c2b
Show file tree
Hide file tree
Showing 50 changed files with 4,649 additions and 3,172 deletions.
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: {}
123 changes: 64 additions & 59 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,91 +31,92 @@
]
},
"dependencies": {
"@material-ui/core": "^3.1.0",
"@material-ui/core": "^3.9.2",
"@reactioncommerce/components": "^0.63.0",
"@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",
"apollo-link-ws": "^1.0.12",
"@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": "14.0.2",
"graphql-tag": "2.9.2",
"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 @@ -127,11 +128,15 @@
"!**/vendor/**"
],
"coverageDirectory": "reports/coverage",
"testResultsProcessor": "jest-junit",
"reporters": [
"jest-junit"
],
"roots": [
"./src"
],
"setupTestFrameworkScriptFile": "<rootDir>/tests/setupTests.js",
"setupFilesAfterEnv": [
"<rootDir>/tests/setupTests.js"
],
"transform": {
"\\.(gql|graphql)$": "jest-transform-graphql",
".*": "babel-jest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`basic snapshot 1`] = `
disabled={false}
onBlur={[Function]}
onClick={[Function]}
onContextMenu={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
Expand Down Expand Up @@ -34,7 +35,7 @@ exports[`basic snapshot 1`] = `
</svg>
</span>
<span
className="MuiTouchRipple-root-21"
className="MuiTouchRipple-root-24"
/>
</button>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ exports[`do not show cartpopover 1`] = `
}
<div
className="HiddenCss-mdUp-16"
className="MuiPrivateHiddenCss-mdUp-16"
>
<div
className="SkCartPopover-container-1 SkCartPopover-isContainerHidden-3"
Expand Down Expand Up @@ -197,7 +197,7 @@ exports[`show cartpopover 1`] = `
}
<div
className="HiddenCss-mdUp-16"
className="MuiPrivateHiddenCss-mdUp-16"
>
<div
className="SkCartPopover-container-1 SkCartPopover-isContainerVisible-4"
Expand Down
2 changes: 1 addition & 1 deletion src/components/CheckoutActions/CheckoutActions.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable react/no-multi-comp */
import React, { Fragment, Component } from "react";
import PropTypes from "prop-types";
import { isEqual } from "lodash";
import { observer } from "mobx-react";
import styled from "styled-components";
import isEqual from "lodash.isequal";
import Actions from "@reactioncommerce/components/CheckoutActions/v1";
import ShippingAddressCheckoutAction from "@reactioncommerce/components/ShippingAddressCheckoutAction/v1";
import FulfillmentOptionsCheckoutAction from "@reactioncommerce/components/FulfillmentOptionsCheckoutAction/v1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,21 @@ exports[`basic snapshot 1`] = `
</td>
<td
className="c19 c18"
/>
>
-
</td>
</tr>
<tr>
<td
className="c18"
>
Surcharge
</td>
<td
className="c19 c18"
>
-
</td>
</tr>
<tr>
<td
Expand Down
4 changes: 2 additions & 2 deletions src/components/Entry/__snapshots__/Entry.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ exports[`basic snapshot 1`] = `
className="SkEntry-loginWrapper-1"
>
<h2
className="MuiTypography-root-101 MuiTypography-title-107 MuiTypography-gutterBottom-119"
className="MuiTypography-root-101 MuiTypography-title-107 MuiTypography-gutterBottom-128"
>
Returning Customer
</h2>
Expand Down Expand Up @@ -448,7 +448,7 @@ exports[`basic snapshot 1`] = `
className="SkEntry-guestWrapper-3"
>
<h2
className="MuiTypography-root-101 MuiTypography-title-107 MuiTypography-gutterBottom-119"
className="MuiTypography-root-101 MuiTypography-title-107 MuiTypography-gutterBottom-128"
>
Guest Checkout
</h2>
Expand Down
28 changes: 27 additions & 1 deletion src/components/Link/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,19 @@ class Link extends Component {
className: PropTypes.string,
classes: PropTypes.object,
href: PropTypes.string,
isUrlAbsolute: PropTypes.bool,
linkItem: PropTypes.object,
onClick: PropTypes.func,
params: PropTypes.object,
route: PropTypes.string,
shouldOpenInNewWindow: PropTypes.bool,
to: PropTypes.string
}

static defaultProps = {
onClick: () => { }
isUrlAbsolute: false,
onClick: () => { },
shouldOpenInNewWindow: false
}

@track(() => ({
Expand All @@ -60,14 +65,35 @@ class Link extends Component {
classes,
className,
href,
isUrlAbsolute,
onClick,
params,
route,
shouldOpenInNewWindow,
tracking, // eslint-disable-line
to,
...props
} = this.props;

// If link is an absolute link, or if link should open in new window,
// then directly us an `a` tag, insted of the `NextLink` component
if (isUrlAbsolute || shouldOpenInNewWindow) {
return (
<a
className={classNames(classes.anchor, className)}
href={href}
onClick={this.handleClick}
onKeyDown={this.handleKeyDown}
tabIndex={0}
target={shouldOpenInNewWindow ? "_blank" : ""}
>
{children}
</a>
);
}

// If link is a relative and should open in the same window,
// use `NextLink` component
if (enableSPARouting === false) {
const { urls: { as } } = routes.findAndGetUrls(route || to || href, params);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ exports[`basic snapshot 1`] = `
className="MuiButtonBase-root-102 SkMediaGalleryItem-root-101"
onBlur={[Function]}
onClick={[Function]}
onContextMenu={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
Expand Down Expand Up @@ -90,6 +91,7 @@ exports[`basic snapshot 1`] = `
className="MuiButtonBase-root-102 SkMediaGalleryItem-root-101"
onBlur={[Function]}
onClick={[Function]}
onContextMenu={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ exports[`basic snapshot 1`] = `
className="MuiButtonBase-root-2 SkMediaGalleryItem-root-1"
onBlur={[Function]}
onClick={[Function]}
onContextMenu={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
Expand Down
19 changes: 4 additions & 15 deletions src/components/MiniCart/MiniCart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import { MuiThemeProvider } from "@material-ui/core/styles";
import theme from "custom/reactionTheme";
import { MockedProvider } from "react-apollo/test-utils";
import { Provider } from "mobx-react";
import shopQuery from "containers/shop/shop.gql";
import anonymousCartByCartIdQuery from "containers/cart/queries.gql";
import primaryShopIdQuery from "containers/common-gql/primaryShopId.gql";
import primaryShopQuery from "containers/common-gql/primaryShop.gql";
import MiniCart from "./MiniCart";

const shop = {
Expand All @@ -21,24 +20,14 @@ const shop = {
const mocks = [
{
request: {
query: primaryShopIdQuery
},
result: {
data: {
primaryShopId: shop._id
}
}
},
{
request: {
query: shopQuery,
query: primaryShopQuery,
variables: {
shopId: shop._id
language: "en"
}
},
result: {
data: {
shop
primaryShop: shop
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`basic snapshot 1`] = `
disabled={false}
onBlur={[Function]}
onClick={[Function]}
onContextMenu={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
Expand Down
Loading

0 comments on commit e6a8c2b

Please sign in to comment.