Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
fix lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Feb 29, 2020
1 parent d77551e commit 126bd90
Show file tree
Hide file tree
Showing 37 changed files with 49 additions and 59 deletions.
7 changes: 1 addition & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
const path = require('path');

console.log(path.join(__dirname, '/node_modules//(?!lodash-es/.*)'));

module.exports = {
transform: {
'^.+\\.(js|jsx|tsx|ts)$': 'babel-jest'
},
testMatch: ['<rootDir>/src/**/__tests__/**/*.(js|ts)?(x)', '<rootDir>/src/**/?(*.)+(spec|test).(ts|js)?(x)'],
moduleFileExtensions: ['js', 'ts', 'tsx'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
transformIgnorePatterns: [path.join(__dirname, '/node_modules//(?!lodash-es/.*)')]
setupFilesAfterEnv: ['<rootDir>/jest.setup.js']
};
2 changes: 1 addition & 1 deletion packages/fannypack-addon-highlighted-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"jest": "jest"
},
"dependencies": {
"lodash-es": "4.17.15",
"lodash": "4.17.15",
"prism-react-renderer": "0.1.7"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"conditional-wrap": "1.0.0",
"emotion": "10.0.14",
"emotion-theming": "10.0.14",
"lodash-es": "4.17.15",
"lodash": "4.17.15",
"polished": "3.4.1",
"react-input-mask": "2.0.4",
"reakit": "1.0.0-beta.14",
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Box/Box.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Box as ReakitBox, BoxProps as ReakitBoxProps } from 'reakit';
import _get from 'lodash-es/get';
import _get from 'lodash/get';

import { ThemeConfig, CSSProperties } from '../types';
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Box/styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import _get from 'lodash-es/get';
import _get from 'lodash/get';
import { css, cssClass } from '../styled';
import { breakpoint, theme } from '../utils';
import { ThemeConfig } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Box as ReakitBox } from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook, useUniqueId } from '../utils';
import { Box, BoxProps } from '../Box';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Drawer/DrawerDisclosure.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box as ReakitBox } from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { ModalDisclosure, ModalDisclosureProps } from '../Modal';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Hidden/Hidden.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box as ReakitBox, HiddenProps as ReakitHiddenProps, useHidden as useReakitHidden } from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { Box, BoxProps } from '../Box';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Hidden/HiddenDisclosure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
HiddenDisclosureProps as ReakitHiddenDisclosureProps,
useHiddenDisclosure as useReakitHiddenDisclosure
} from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { Box, BoxProps } from '../Box';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Icon/Icon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Box as ReakitBox } from 'reakit';
import _get from 'lodash-es/get';
import _get from 'lodash/get';

import {
useClassName,
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Menu/MenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Box as ReakitBox } from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { Box, BoxProps } from '../Box';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Modal/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box as ReakitBox, DialogProps as ReakitDialogProps, useDialog as useReakitDialog } from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { AnimateProps, Placement } from '../types';
import { useClassName, createComponent, createElement, createHook } from '../utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Modal/ModalBackdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
DialogBackdropProps as ReakitDialogBackdropProps,
useDialogBackdrop as useReakitDialogBackdrop
} from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { Box, BoxProps } from '../Box';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Modal/ModalDisclosure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
DialogDisclosureProps as ReakitDialogDisclosureProps,
useDialogDisclosure as useReakitDialogDisclosure
} from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { Box, BoxProps } from '../Box';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Overlay/Overlay.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box as ReakitBox } from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { Modal, ModalProps } from '../Modal';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Overlay/OverlayDisclosure.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box as ReakitBox } from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { ModalDisclosure, ModalDisclosureProps } from '../Modal';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
PopoverArrowProps as ReakitPopoverArrowProps,
usePopoverArrow as useReakitPopoverArrow
} from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { AnimateProps } from '../types';
import { useClassName, createComponent, createElement, createHook, useUniqueId } from '../utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Popover/PopoverBackdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
PopoverBackdropProps as ReakitPopoverBackdropProps,
usePopoverBackdrop as useReakitPopoverBackdrop
} from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { Box, BoxProps } from '../Box';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Popover/PopoverDisclosure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
PopoverDisclosureProps as ReakitPopoverDisclosureProps,
usePopoverDisclosure as useReakitPopoverDisclosure
} from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { Box, BoxProps } from '../Box';
Expand Down
4 changes: 2 additions & 2 deletions packages/fannypack/src/Rating/Rating.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { Box as ReakitBox } from 'reakit';
import _get from 'lodash-es/get';
import _times from 'lodash-es/times';
import _get from 'lodash/get';
import _times from 'lodash/times';

import { Size } from '../types';
import { useClassName, createComponent, createElement, createHook } from '../utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Rover/Rover.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box as ReakitBox, RoverProps as ReakitRoverProps, useRover as useReakitRover } from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { Box, BoxProps } from '../Box';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Switch/Switch.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Box as ReakitBox } from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook, useUniqueId } from '../utils';
import { Box, BoxProps } from '../Box';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/Tabbable/Tabbable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box as ReakitBox, TabbableProps as ReakitTabbableProps, useTabbable as useReakitTabbable } from 'reakit';
import _omit from 'lodash-es/omit';
import _omit from 'lodash/omit';

import { useClassName, createComponent, createElement, createHook } from '../utils';
import { Box, BoxProps } from '../Box';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/theme/Icon.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-ignore
import _get from 'lodash-es/get';
import _get from 'lodash/get';
import * as faInfoCircle from '@fortawesome/free-solid-svg-icons/faInfoCircle';
import * as faChevronDown from '@fortawesome/free-solid-svg-icons/faChevronDown';
import * as faChevronLeft from '@fortawesome/free-solid-svg-icons/faChevronLeft';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/theme/palette.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-ignore
import _get from 'lodash-es/get';
import _get from 'lodash/get';

import { PaletteThemeConfig } from '../types';
import { darken, lighten, shade, generateColorVariants, generateTextVariants } from '../utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/utils/createComponent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import _get from 'lodash-es/get';
import _get from 'lodash/get';
import { useDefaultProps } from './useDefaultProps';

export function createComponent<P>(
Expand Down
6 changes: 3 additions & 3 deletions packages/fannypack/src/utils/createHook.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import _get from 'lodash-es/get';
import _merge from 'lodash-es/merge';
import _omit from 'lodash-es/omit';
import _get from 'lodash/get';
import _merge from 'lodash/merge';
import _omit from 'lodash/omit';

import { useDefaultProps } from './useDefaultProps';

Expand Down
4 changes: 2 additions & 2 deletions packages/fannypack/src/utils/cssProps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _omit from 'lodash-es/omit';
import _pick from 'lodash-es/pick';
import _omit from 'lodash/omit';
import _pick from 'lodash/pick';

export function isCSSProp(prop) {
return Object.keys(cssProps).includes(prop);
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/utils/fieldAdaptors.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import _get from 'lodash-es/get';
import _get from 'lodash/get';

import { bindFns } from './bindFns';

Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/utils/palette.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-ignore
import _get from 'lodash-es/get';
import _get from 'lodash/get';

import { lighten, tint, readableColor, shade } from './colors';

Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/utils/theme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { theme as _theme } from 'styled-tools';
import _get from 'lodash-es/get';
import _get from 'lodash/get';
import { ThemeConfig } from '../types';
import { css } from '../styled';
import { isFunction } from './isFunction';
Expand Down
2 changes: 1 addition & 1 deletion packages/fannypack/src/utils/useClassName.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import buildClassNames from 'classnames';
import _uniq from 'lodash-es/uniq';
import _uniq from 'lodash/uniq';

import { ThemeContext } from '../styled';

Expand Down
8 changes: 4 additions & 4 deletions packages/fannypack/src/utils/useDefaultProps.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react';
import _get from 'lodash-es/get';
import _merge from 'lodash-es/merge';
import _omitBy from 'lodash-es/omitBy';
import _isUndefined from 'lodash-es/isUndefined';
import _get from 'lodash/get';
import _merge from 'lodash/merge';
import _omitBy from 'lodash/omitBy';
import _isUndefined from 'lodash/isUndefined';

import { ThemeContext } from '../styled';

Expand Down
4 changes: 2 additions & 2 deletions packages/fannypack/src/utils/useStyle.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import _get from 'lodash-es/get';
import _kebabCase from 'lodash-es/kebabCase';
import _get from 'lodash/get';
import _kebabCase from 'lodash/kebabCase';

import { ThemeContext, css } from '../styled';
import { border, borderRadius, breakpoint, fontSize, palette, space, fontWeight } from './theme';
Expand Down
2 changes: 1 addition & 1 deletion packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"emotion-server": "10.0.14",
"extract-react-types-loader": "0.3.8",
"fs-extra": "8.1.0",
"lodash-es": "4.17.15",
"lodash": "4.17.15",
"md-node-inject": "1.0.0",
"playroom": "0.15.1",
"pretty-proptypes": "0.6.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/components/Theme.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { Box, Button, Code, Hidden, Text } from 'fannypack';
import HighlightedCode, { highlightedCodeStyles } from 'fannypack-addon-highlighted-code';
import _set from 'lodash-es/set';
import _set from 'lodash/set';

export default function Theme(props) {
const { component: Component, children, overrides, highlightAttribute, injectOverrides = true, ...restProps } = props;
Expand Down
15 changes: 5 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15798,11 +15798,6 @@ lockfile@^1.0.4:
dependencies:
signal-exit "^3.0.2"

[email protected]:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78"
integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==

lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
Expand Down Expand Up @@ -15976,6 +15971,11 @@ lodash.uniq@^4.5.0:
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=

[email protected], lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.15:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==

lodash@^4.11.1, lodash@^4.17.14, lodash@^4.3.0:
version "4.17.14"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba"
Expand All @@ -15986,11 +15986,6 @@ lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.13.tgz#0bdc3a6adc873d2f4e0c4bac285df91b64fc7b93"
integrity sha512-vm3/XWXfWtRua0FkUyEHBZy8kCPjErNBT9fJx8Zvs+U6zjqPbTUOpkaoum3O5uiA8sm+yNMHXfYkTUHFoMxFNA==

lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.15:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==

log-symbols@^2.1.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
Expand Down

0 comments on commit 126bd90

Please sign in to comment.