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

[E.cash] - Updated Lodash Dependency to Fix Vulnerability #1947

Merged
merged 6 commits into from
Mar 24, 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
2 changes: 1 addition & 1 deletion STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ So, if a new language feature isn't something we have agreed to support it's off
Here are a couple of things we would ask that you *avoid* to help maintain consistency in our codebase:

- **Async/Await** - Use the native `Promise` instead
- **Optional Chaining** - Use `lodash.get` to fetch a nested value instead
- **Optional Chaining** - Use `lodash/get` to fetch a nested value instead

# React Coding Standards

Expand Down
26 changes: 3 additions & 23 deletions package-lock.json

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

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@
"expensify-common": "git+https://github.com/Expensify/expensify-common.git#b89c2c591a2f76ae1a3d8a4a2e2d5e5159d65edc",
"file-loader": "^6.0.0",
"html-entities": "^1.3.1",
"lodash.get": "^4.4.2",
"lodash.has": "^4.5.2",
"lodash.orderby": "^4.6.0",
"lodash.transform": "^4.6.0",
"lodash": "4.17.21",
"metro-config": "^0.64.0",
"moment": "^2.27.0",
"moment-timezone": "^0.5.31",
Expand Down
2 changes: 1 addition & 1 deletion src/CONFIG.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import {Platform} from 'react-native';
import Config from 'react-native-config';
import getPlatform from './libs/getPlatform/index';
Expand Down
2 changes: 1 addition & 1 deletion src/Expensify.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import PropTypes from 'prop-types';
import React, {PureComponent} from 'react';
import {View} from 'react-native';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Network.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'underscore';
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import Onyx from 'react-native-onyx';
import HttpUtils from './HttpUtils';
import ONYXKEYS from '../ONYXKEYS';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Notification/PushNotification/index.native.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from 'underscore';
import {AppState} from 'react-native';
import {UrbanAirship, EventType} from 'urbanairship-react-native';
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import NotificationType from './NotificationType';

const notificationEventActionMap = {};
Expand Down
4 changes: 2 additions & 2 deletions src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable no-continue */
import _ from 'underscore';
import Onyx from 'react-native-onyx';
import lodashGet from 'lodash.get';
import lodashOrderBy from 'lodash.orderby';
import lodashGet from 'lodash/get';
import lodashOrderBy from 'lodash/orderBy';
import Str from 'expensify-common/lib/str';
import {getDefaultAvatar} from './actions/PersonalDetails';
import ONYXKEYS from '../ONYXKEYS';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Performance.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'underscore';
import lodashTransform from 'lodash.transform';
import lodashTransform from 'lodash/transform';

/**
* Deep diff between two objects. Useful for figuring out what changed about an object from one render to the next so
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/NameValuePair.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _ from 'underscore';
import Onyx from 'react-native-onyx';
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import * as API from '../API';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/PersonalDetails.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'underscore';
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import Onyx from 'react-native-onyx';
import Str from 'expensify-common/lib/str';
import ONYXKEYS from '../../ONYXKEYS';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/Report.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import moment from 'moment';
import _ from 'underscore';
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import ExpensiMark from 'expensify-common/lib/ExpensiMark';
import Onyx from 'react-native-onyx';
import ONYXKEYS from '../../ONYXKEYS';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/User.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'underscore';
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import Onyx from 'react-native-onyx';
import ONYXKEYS from '../../ONYXKEYS';
import * as API from '../API';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/translate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import Str from 'expensify-common/lib/str';
import Log from './Log';
import Config from '../CONFIG';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/SetPasswordPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import PropTypes from 'prop-types';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import styles from '../styles/styles';
import ExpensifyCashLogo from '../../assets/images/expensify-cash.svg';
import {setPassword} from '../libs/actions/Session';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import {View, Pressable} from 'react-native';
import PropTypes from 'prop-types';
import {withOnyx} from 'react-native-onyx';
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import styles from '../../styles/styles';
import ONYXKEYS from '../../ONYXKEYS';
import themeColors from '../../styles/themes/default';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import {View, TouchableOpacity} from 'react-native';
import _ from 'underscore';
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import {withOnyx} from 'react-native-onyx';
import styles from '../../../styles/styles';
import themeColors from '../../../styles/themes/default';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from 'react-native';
import PropTypes from 'prop-types';
import _ from 'underscore';
import lodashGet from 'lodash.get';
import lodashGet from 'lodash/get';
import {withOnyx} from 'react-native-onyx';
import Text from '../../../components/Text';
import UnreadActionIndicator from '../../../components/UnreadActionIndicator';
Expand Down