Skip to content

Commit

Permalink
Fix npm audit CI check (#1196)
Browse files Browse the repository at this point in the history
* fix: npm audit

* fix: refactor missing line
  • Loading branch information
Aggelos Arvanitakis authored Jul 20, 2020
1 parent d6638ba commit 7f23df0
Show file tree
Hide file tree
Showing 22 changed files with 50 additions and 46 deletions.
35 changes: 20 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@types/faker": "^4.1.12",
"@types/history": "^4.7.5",
"@types/linkifyjs": "^2.1.3",
"@types/lodash-es": "^4.17.3",
"@types/lodash": "^4.14.157",
"@types/qrcode.react": "^1.0.0",
"@types/react": "^16.9.19",
"@types/react-dom": "^16.9.5",
Expand Down Expand Up @@ -117,7 +117,7 @@
"graphql": "^14.6.0",
"history": "^4.10.1",
"linkifyjs": "^2.1.9",
"lodash-es": "^4.17.15",
"lodash": "^4.17.19",
"pouncejs": "^0.45.2",
"qrcode.react": "^1.0.0",
"query-string": "^6.10.1",
Expand Down
1 change: 0 additions & 1 deletion web/__tests__/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ module.exports = {
// This is the only way for jest to detect our custom webpack aliases
moduleNameMapper: {
'\\.(jpg|jpeg|png|svg)$': '<rootDir>/__mocks__/file.ts',
'^lodash-es/(.*)': 'lodash/$1',
'^Assets/(.*)': '<rootDir>/../src/assets/$1',
'^Components/(.*)': '<rootDir>/../src/components/$1',
'^Generated/(.*)': '<rootDir>/../__generated__/$1',
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/fields/Editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import React from 'react';
import Editor, { EditorProps } from 'Components/Editor';
import { FieldConfig } from 'formik';
import debounce from 'lodash-es/debounce';
import debounce from 'lodash/debounce';
import { Box, FormError } from 'pouncejs';
import useFastField from 'Hooks/useFastField';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import React from 'react';
import { Alert, Heading, SideSheet, useSnackbar, Box, SideSheetProps } from 'pouncejs';
import pick from 'lodash-es/pick';
import pick from 'lodash/pick';
import { Destination, DestinationConfigInput, DestinationTypeEnum } from 'Generated/schema';
import { BaseDestinationFormValues } from 'Components/forms/BaseDestinationForm';
import SNSDestinationForm from 'Components/forms/SnsDestinationForm';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import React from 'react';
import { Formik, Field, Form } from 'formik';
import { Box, Button, SimpleGrid } from 'pouncejs';
import mapValues from 'lodash-es/mapValues';
import map from 'lodash-es/map';
import mapValues from 'lodash/mapValues';
import map from 'lodash/map';
import FormikTextInput from 'Components/fields/TextInput';
import FormikTextArea from 'Components/fields/TextArea';
import FormikCombobox from 'Components/fields/ComboBox';
Expand Down
4 changes: 2 additions & 2 deletions web/src/helpers/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import {
CHECK_IF_HASH_REGEX,
SOURCE_LABEL_REGEX,
} from 'Source/constants';
import mapValues from 'lodash-es/mapValues';
import sum from 'lodash-es/sum';
import mapValues from 'lodash/mapValues';
import sum from 'lodash/sum';
import { ErrorResponse } from 'apollo-link-error';
import { ApolloError } from '@apollo/client';

Expand Down
2 changes: 1 addition & 1 deletion web/src/hooks/useFormSessionRestoration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
import React from 'react';
import { useFormikContext } from 'formik';
import debounce from 'lodash-es/debounce';
import debounce from 'lodash/debounce';
import storage from 'Helpers/storage';

export interface UseFormSessionRestorationProps {
Expand Down
2 changes: 1 addition & 1 deletion web/src/hooks/useUrlParams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import React from 'react';
import useRouter from 'Hooks/useRouter';
import queryString from 'query-string';
import omitBy from 'lodash-es/omitBy';
import omitBy from 'lodash/omitBy';

const queryStringOptions = {
arrayFormat: 'bracket' as const,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import React from 'react';
import { Flex, theme } from 'pouncejs';
import sum from 'lodash-es/sum';
import sum from 'lodash/sum';
import { capitalize, countPoliciesBySeverityAndStatus } from 'Helpers/utils';
import map from 'lodash-es/map';
import map from 'lodash/map';
import { OrganizationReportBySeverity } from 'Generated/schema';
import BarChart from 'Components/charts/BarChart';
import ChartSummary from 'Components/charts/ChartSummary';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import React from 'react';
import { capitalize, countPoliciesBySeverityAndStatus } from 'Helpers/utils';
import map from 'lodash-es/map';
import sum from 'lodash-es/sum';
import map from 'lodash/map';
import sum from 'lodash/sum';
import { OrganizationReportBySeverity } from 'Generated/schema';
import { theme, Flex } from 'pouncejs';
import BarChart from 'Components/charts/BarChart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import React from 'react';
import { countPoliciesBySeverityAndStatus } from 'Helpers/utils';
import sum from 'lodash-es/sum';
import sum from 'lodash/sum';
import { OrganizationReportBySeverity } from 'Generated/schema';
import { Flex } from 'pouncejs';
import BarChart from 'Components/charts/BarChart';
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/ListAlerts/ListAlerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import useInfiniteScroll from 'Hooks/useInfiniteScroll';
import useRequestParamsWithoutPagination from 'Hooks/useRequestParamsWithoutPagination';
import TablePlaceholder from 'Components/TablePlaceholder';
import ErrorBoundary from 'Components/ErrorBoundary';
import isEmpty from 'lodash-es/isEmpty';
import isEmpty from 'lodash/isEmpty';
import withSEO from 'Hoc/withSEO';
import { useListAlerts } from './graphql/listAlerts.generated';
import ListAlertsTable from './ListAlertsTable';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import FormikTextInput from 'Components/fields/TextInput';
import useRequestParamsWithoutPagination from 'Hooks/useRequestParamsWithoutPagination';
import { Box, Button, Card, Collapse, Flex } from 'pouncejs';
import ErrorBoundary from 'Components/ErrorBoundary';
import isEmpty from 'lodash-es/isEmpty';
import isNumber from 'lodash-es/isNumber';
import pick from 'lodash-es/pick';
import isEmpty from 'lodash/isEmpty';
import isNumber from 'lodash/isNumber';
import pick from 'lodash/pick';
import FormikMultiCombobox from 'Components/fields/MultiComboBox';

const severityOptions = Object.values(SeverityEnum);
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/ListPolicies/ListPolicies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { ListPoliciesInput, SortDirEnum, ListPoliciesSortFieldsEnum } from 'Gene
import { TableControlsPagination } from 'Components/utils/TableControls';
import useRequestParamsWithPagination from 'Hooks/useRequestParamsWithPagination';
import ErrorBoundary from 'Components/ErrorBoundary';
import isEmpty from 'lodash-es/isEmpty';
import isEmpty from 'lodash/isEmpty';
import withSEO from 'Hoc/withSEO';
import ListPoliciesTable from './ListPoliciesTable';
import ListPoliciesActions from './ListPoliciesActions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import useRequestParamsWithPagination from 'Hooks/useRequestParamsWithPagination
import { Box, Button, Card, Collapse, Flex } from 'pouncejs';
import CreateButton from 'Pages/ListPolicies/CreateButton';
import ErrorBoundary from 'Components/ErrorBoundary';
import isEmpty from 'lodash-es/isEmpty';
import pick from 'lodash-es/pick';
import isEmpty from 'lodash/isEmpty';
import pick from 'lodash/pick';

const severityOptions = Object.values(SeverityEnum);
const statusOptions = Object.values(ComplianceStatusEnum);
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/ListResources/ListResources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
extractErrorMessage,
} from 'Helpers/utils';
import useRequestParamsWithPagination from 'Hooks/useRequestParamsWithPagination';
import isEmpty from 'lodash-es/isEmpty';
import isEmpty from 'lodash/isEmpty';
import withSEO from 'Hoc/withSEO';
import ErrorBoundary from 'Components/ErrorBoundary';
import ListResourcesActions from './ListResourcesActions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import FormikTextInput from 'Components/fields/TextInput';
import FormikCombobox from 'Components/fields/ComboBox';
import FormikMultiCombobox from 'Components/fields/MultiComboBox';
import ErrorBoundary from 'Components/ErrorBoundary';
import pick from 'lodash-es/pick';
import pick from 'lodash/pick';
import useRequestParamsWithPagination from 'Hooks/useRequestParamsWithPagination';
import isEmpty from 'lodash-es/isEmpty';
import isEmpty from 'lodash/isEmpty';
import { useListAccountIds } from './graphql/listAccountIds.generated';

const statusOptions = Object.values(ComplianceStatusEnum);
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/ListRules/ListRules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { convertObjArrayValuesToCsv, extractErrorMessage, encodeParams } from 'H
import { ListRulesInput, SortDirEnum, ListRulesSortFieldsEnum } from 'Generated/schema';
import { TableControlsPagination } from 'Components/utils/TableControls';
import useRequestParamsWithPagination from 'Hooks/useRequestParamsWithPagination';
import isEmpty from 'lodash-es/isEmpty';
import isEmpty from 'lodash/isEmpty';
import ErrorBoundary from 'Components/ErrorBoundary';
import withSEO from 'Hoc/withSEO';
import ListRulesTable from './ListRulesTable';
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/ListRules/ListRulesActions/ListRulesActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import { Box, Button, Card, Collapse, Flex } from 'pouncejs';
import CreateButton from 'Pages/ListRules/CreateButton';
import ErrorBoundary from 'Components/ErrorBoundary';
import useRequestParamsWithPagination from 'Hooks/useRequestParamsWithPagination';
import isEmpty from 'lodash-es/isEmpty';
import pick from 'lodash-es/pick';
import isEmpty from 'lodash/isEmpty';
import pick from 'lodash/pick';

const severityOptions = Object.values(SeverityEnum);

Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/PolicyDetails/PolicyDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
convertObjArrayValuesToCsv,
extractErrorMessage,
} from 'Helpers/utils';
import pick from 'lodash-es/pick';
import pick from 'lodash/pick';
import { DEFAULT_SMALL_PAGE_SIZE } from 'Source/constants';
import useRequestParamsWithPagination from 'Hooks/useRequestParamsWithPagination';
import withSEO from 'Hoc/withSEO';
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/ResourceDetails/ResourceDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
TableControlsPagination,
TableControlsComplianceFilter,
} from 'Components/utils/TableControls';
import pick from 'lodash-es/pick';
import pick from 'lodash/pick';
import ErrorBoundary from 'Components/ErrorBoundary';
import withSEO from 'Hoc/withSEO';
import { DEFAULT_SMALL_PAGE_SIZE } from 'Source/constants';
Expand Down

0 comments on commit 7f23df0

Please sign in to comment.