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

chore(*): update dependencies #33

Merged
merged 6 commits into from Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3,215 changes: 1,643 additions & 1,572 deletions package-lock.json

Large diffs are not rendered by default.

88 changes: 46 additions & 42 deletions package.json
Expand Up @@ -23,31 +23,31 @@
},
"license": "MIT",
"dependencies": {
"@fnando/sparkline": "^0.3.5",
"@material-ui/core": "^1.5.0",
"@material-ui/icons": "^2.0.2",
"@fnando/sparkline": "^0.3.10",
"@material-ui/core": "^3.1.2",
"@material-ui/icons": "^3.0.1",
"animated-scrollto": "^1.1.0",
"axios": "^0.18.0",
"axios-cache-adapter": "^2.0.0",
"axios-mock-adapter": "^1.14.1",
"axios-retry": "^3.0.2",
"classnames": "^2.2.5",
"downshift": "^1.31.9",
"axios-cache-adapter": "^2.1.1",
"axios-mock-adapter": "^1.15.0",
"axios-retry": "^3.1.1",
"classnames": "^2.2.6",
"downshift": "^2.2.3",
"highlight.js": "^9.12.0",
"hoist-non-react-statics": "^2.5.0",
"invariant": "^2.2.3",
"hoist-non-react-statics": "^3.0.1",
"invariant": "^2.2.4",
"js-md5": "^0.7.3",
"mdn-polyfills": "^5.5.0",
"prop-types": "^15.6.1",
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-markdown": "^3.3.0",
"react-router-dom": "^4.2.2",
"mdn-polyfills": "^5.12.0",
"prop-types": "^15.6.2",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-markdown": "^3.6.0",
"react-router-dom": "^4.3.1",
"react-scripts": "1.1.4",
"recompose": "^0.26.0",
"recompose": "^0.30.0",
"relative-date": "^1.1.3",
"semver-match": "^0.1.1",
"warning": "^3.0.0"
"warning": "^4.0.2"
},
"scripts": {
"start": "react-scripts --require ./bin/expand-metadatas.js start",
Expand All @@ -73,11 +73,10 @@
"cy:start-server-and-test": "npx start-server-and-test serve :5000 cy:run",
"cy:start-server-and-test:travis": "npx start-server-and-test serve :5000 cy:run:travis",
"test:precommit": "npm test",
"serve": "npx serve --clipless --port 5000 build",
"serve": "npx serve --no-clipboard --listen 5000 build",
"eject": "react-scripts eject",
"lint": "npx eslint .",
"pretty": "npx prettier --write '**/*.{js,jsx,json,css,scss}'",
"precommit": "lint-staged && npm run lint && npm run test:precommit",
"proxy-apis-deprecated": "echo 'DEPRECATED' && node ./bin/cors-anywhere.js",
"record-http-mocks": "cross-env REACT_APP_NPM_REGISTRY_API_BASE_URL=https://registry.npmjs.org node ./bin/record-http-mocks.js",
"generate-changelog": "./bin/generate-changelog.js"
Expand All @@ -88,39 +87,44 @@
"git add"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && npm run lint && npm run test:precommit"
}
},
"devDependencies": {
"babel-polyfill": "^6.26.0",
"commander": "^2.15.1",
"commander": "^2.18.0",
"cors-anywhere": "^0.4.1",
"cross-env": "^5.1.4",
"cross-env": "^5.2.0",
"cypress": "^3.1.0",
"cypress-testing-library": "^2.2.0",
"dom-testing-library": "^2.5.0",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"enzyme-to-json": "^3.3.1",
"cypress-testing-library": "^2.2.2",
"dom-testing-library": "^3.8.1",
"enzyme": "^3.6.0",
"enzyme-adapter-react-16": "^1.5.0",
"enzyme-to-json": "^3.3.4",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-config-prettier": "^2.10.0",
"eslint-plugin-cypress": "^2.0.1",
"eslint-plugin-prettier": "^2.6.0",
"esm": "^3.0.14",
"eslint-plugin-prettier": "^2.7.0",
"esm": "^3.0.84",
"express": "^4.16.3",
"fs-extra": "^5.0.0",
"generate-changelog": "^1.7.1",
"gh-pages": "^1.1.0",
"git-rev-sync": "^1.11.1",
"gh-pages": "^2.0.0",
"git-rev-sync": "^1.12.0",
"github-url-from-git": "^1.5.0",
"http-proxy-middleware": "^0.18.0",
"husky": "^0.14.3",
"jest-dom": "^1.0.0",
"lint-staged": "^7.0.0",
"moment": "^2.22.0",
"nock": "^9.2.3",
"npm-run-all": "^4.1.2",
"http-proxy-middleware": "^0.19.0",
"husky": "^1.1.0",
"jest-dom": "^1.12.1",
"lint-staged": "^7.3.0",
"moment": "^2.22.2",
"nock": "^9.6.1",
"npm-run-all": "^4.1.3",
"prettier": "1.11.1",
"react-testing-library": "^3.1.3",
"serve": "^6.5.3",
"start-server-and-test": "^1.4.1"
"react-testing-library": "^5.1.0",
"serve": "^10.0.2",
"start-server-and-test": "^1.7.4"
},
"proxy": {
"/api/npm-registry": {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Header.js
Expand Up @@ -23,6 +23,8 @@ const styles = theme => ({
flexGrow: 1
},
logo: {
width: 48,
height: 48,
backgroundImage: `url(${npmLogo})`,
backgroundSize: 45,
backgroundPosition: "2px 2px",
Expand Down
5 changes: 3 additions & 2 deletions src/components/Search.js
Expand Up @@ -300,7 +300,8 @@ class Search extends Component {
}
goToPackage(item.package.name);
}}
render={({
>
{({
selectedItem,
getInputProps,
getItemProps,
Expand Down Expand Up @@ -465,7 +466,7 @@ class Search extends Component {
/>
</div>
)}
/>
</Downshift>
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/__tests__/Gravatar.spec.js
Expand Up @@ -42,7 +42,7 @@ describe("/components/Footer", () => {
/>
);
expect(getByAltText("avatar").src).toBe(
"https://s.gravatar.com/avatar/4aa426e56a82cdab72b0c3a11cfa3982?s=30"
"https://s.gravatar.com/avatar/4aa426e56a82cdab72b0c3a11cfa3982"
);
});
});
Expand Down
25 changes: 18 additions & 7 deletions src/components/__tests__/WindowInfos.spec.js
Expand Up @@ -50,9 +50,9 @@ describe("/components/WindowInfos", () => {
const { queryByTestId } = renderWithProvider(
<div data-testid="child">Hello world!</div>
);
// use queryByTestId with toBeInTheDOM
expect(queryByTestId("child")).toBeInTheDOM();
expect(queryByTestId("not-a-child")).not.toBeInTheDOM();
// use queryByTestId with toContainElement
expect(queryByTestId("child")).toBeInstanceOf(HTMLElement);
expect(queryByTestId("not-a-child")).not.toBeInstanceOf(HTMLElement);
});
});
describe("withWindowInfos/render", () => {
Expand Down Expand Up @@ -110,19 +110,18 @@ describe("/components/WindowInfos", () => {
});
});
describe("ConnectedWindowInfos/render", () => {
it("render prop should render with defaults", () => {
// skipped because we need to specify a window width in test env now
it.skip("render prop should render with defaults", () => {
const { getByTestId } = renderWithProvider(
<ConnectedWindowInfos render={myRenderProp} />
);
expect(getByTestId("width")).toHaveTextContent("960");
expect(getByTestId("height")).toHaveTextContent("640");
});
it("render prop should update on window resize", async () => {
it("render prop should update on window resize - width 1200", async () => {
const { getByTestId, container } = renderWithProvider(
<ConnectedWindowInfos render={myRenderProp} />
);
expect(getByTestId("width")).toHaveTextContent("960");
expect(getByTestId("height")).toHaveTextContent("640");
global.window.resizeTo(1200, 800); // declared in src/setupTest.js
await timeout(Provider.defaultProps.debounceTime); // wait 500ms (the resize event is debounced)
renderWithProvider(<ConnectedWindowInfos render={myRenderProp} />, {
Expand All @@ -131,5 +130,17 @@ describe("/components/WindowInfos", () => {
expect(getByTestId("width")).toHaveTextContent("1200");
expect(getByTestId("height")).toHaveTextContent("800");
});
it("render prop should update on window resize - width 960", async () => {
const { getByTestId, container } = renderWithProvider(
<ConnectedWindowInfos render={myRenderProp} />
);
global.window.resizeTo(960, 800); // declared in src/setupTest.js
await timeout(Provider.defaultProps.debounceTime); // wait 500ms (the resize event is debounced)
renderWithProvider(<ConnectedWindowInfos render={myRenderProp} />, {
container
}); // update the render of the component
expect(getByTestId("width")).toHaveTextContent("960");
expect(getByTestId("height")).toHaveTextContent("800");
});
});
});
2 changes: 1 addition & 1 deletion src/setupTests.js
Expand Up @@ -12,7 +12,7 @@ import Adapter from "enzyme-adapter-react-16";

/**
* Gives access to the following jest custom matchers:
* - toBeInTheDOM
* - toContainElement
* - toHaveTextContent
* - toHaveAttribute
* - toHaveClass
Expand Down