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

UI:Updates packages that have vulnerability #160

Merged
merged 1 commit into from
Feb 12, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"jest": true
},
"rules": {
"prettier/prettier": ["error", { "endOfLine": "auto" }],
"no-console": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off"
},
Expand Down
3 changes: 3 additions & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

#eslint
.eslintcache
20,709 changes: 12,315 additions & 8,394 deletions ui/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@patternfly/patternfly": "^4.80.3",
"@patternfly/react-core": "^4.47.0",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
Expand All @@ -15,20 +16,19 @@
"@types/react-router-dom": "^5.1.6",
"@types/react-syntax-highlighter": "^13.5.0",
"@types/react-test-renderer": "^16.9.3",
"axios": "^0.19.2",
"axios": "^0.21.1",
"fuzzysort": "^1.1.4",
"mobx": "^5.15.6",
"mobx-react": "^6.3.0",
"mobx-state-tree": "^3.17.2",
"moment": "^2.29.1",
"mst-persist": "^0.1.3",
"patternfly": "^3.59.5",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-github-login": "^1.0.3",
"react-markdown": "^5.0.3",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3",
"react-scripts": "^4.0.1",
"react-syntax-highlighter": "^15.3.1",
"remark-gfm": "^1.0.0",
"typescript": "^3.7.5"
Expand Down
10 changes: 10 additions & 0 deletions ui/src/config/constant.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
interface API_CONFIG {
API_URL: string;
GH_CLIENT_ID: string;
}

export declare global {
interface Window {
config: API_CONFIG;
}
}
11 changes: 0 additions & 11 deletions ui/src/config/constants.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
interface API_CONFIG {
API_URL: string;
GH_CLIENT_ID: string;
}

declare global {
interface Window {
config: API_CONFIG;
}
}

window.config = window.config || {
API_URL: 'no API_URL set',
GH_CLIENT_ID: 'no GH_CLIENT_ID set'
Expand Down
6 changes: 2 additions & 4 deletions ui/src/containers/App/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { mount } from 'enzyme';
import renderer from 'react-test-renderer';
import { FakeHub } from '../../api/testutil';
import { createProviderAndStore, createProvider } from '../../store/root';
import LeftPane from '../../components/LeftPane';
Expand All @@ -12,13 +11,13 @@ const { Provider } = createProviderAndStore(api);

describe('App', () => {
it('should render the component correctly and match the snapshot', (done) => {
const app = renderer.create(
const app = mount(
<Provider>
<App />
</Provider>
);

expect(app.toJSON()).toMatchSnapshot();
expect(app.debug()).toMatchSnapshot();
done();
});

Expand All @@ -29,7 +28,6 @@ describe('App', () => {
<App />
</Provider>
);

expect(component.find(LeftPane).length).toEqual(1);
});
});
Loading