Skip to content

Commit

Permalink
chore: use lodash-es instead of lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
DavieReid committed Dec 12, 2023
1 parent a3da083 commit adb6d31
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion jest.config.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const moduleNameMapper = {
'<rootDir>/__mocks__/file-stub.js',
'@jpmorganchase/mosaic-components': '<rootDir>/packages/components/dist/index.js',
'@jpmorganchase/mosaic-store': '<rootDir>/packages/store/dist/index.js',
'@jpmorganchase/mosaic-theme': '<rootDir>/packages/theme/dist/index.js'
'@jpmorganchase/mosaic-theme': '<rootDir>/packages/theme/dist/index.js',
'^lodash-es$': 'lodash'
};

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"clsx": "^2.0.0",
"deepmerge": "^2.0.1",
"hoist-non-react-statics": "^3.3.2",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"prism-react-renderer": "^1.1.1",
"react-live": "^2.2.3",
"react-markdown": "^6.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/SecondaryNavbar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import classnames from 'clsx';
import findLastIndex from 'lodash/findLastIndex';
import { findLastIndex } from 'lodash-es';
import { config } from '@jpmorganchase/mosaic-theme';

import { TabsBase, TabsMenu, TabMenuItemType, TabsLinkItem } from '../TabsBase';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/useSize.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useLayoutEffect, useEffect } from 'react';
import throttle from 'lodash/throttle';
import { throttle } from 'lodash-es';

const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;

Expand Down
2 changes: 1 addition & 1 deletion packages/content-editor-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"gray-matter": "^4.0.3",
"lexical": "^0.11.1",
"react-split": "^2.0.14",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"md5": "*",
"yup": "^0.32.9",
"zustand": "^4.1.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { $convertToMarkdownString } from '@lexical/markdown';
import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin';
import type { EditorState } from 'lexical';
import debounce from 'lodash/debounce';
import { debounce } from 'lodash-es';

import transformers from '../transformers';
import { useContentEditor } from '../index';
Expand Down
2 changes: 1 addition & 1 deletion packages/layouts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@vanilla-extract/css": "^1.6.0",
"@vanilla-extract/sprinkles": "^1.3.0",
"clsx": "^2.0.0",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"next": "^13.4.1",
"react-transition-group": "^4.4.5"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/layouts/src/hooks/useIsLoading.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState, useEffect } from 'react';
import { useRouter } from 'next/router';
import debounce from 'lodash/debounce';
import { debounce } from 'lodash-es';

// Unexported type from next/dist/shared/lib/mitt.d.ts
declare type Handler = (...evts: any[]) => void;
Expand Down
2 changes: 1 addition & 1 deletion packages/open-api-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"swagger-ui-react": "^5.0.0",
"clsx": "^2.0.0",
"deepmerge": "^2.0.1",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"react-live": "^2.2.3",
"react-markdown": "^6.0.2",
"use-memo-one": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/site-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"fuse.js": "^6.6.2",
"https-proxy-agent": "^5.0.1",
"jwt-decode": "^3.1.2",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"next": "^13.4.1",
"next-mdx-remote": "^4.2.1",
"node-cookie": "^2.1.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
import throttle from 'lodash/throttle';
import { throttle } from 'lodash-es';
import { Caption1, useSize } from '@jpmorganchase/mosaic-components';

import { TableOfContentsItem } from './TableOfContentsItem';
Expand Down
2 changes: 1 addition & 1 deletion packages/site-components/src/utils/createMDXScope.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { recipes } from '@jpmorganchase/mosaic-theme';
import { useColorMode } from '@jpmorganchase/mosaic-store';
import flowImpl from 'lodash/flow';
import { flow as flowImpl } from 'lodash-es';

type SortViewByDate = (view: Array<{ [key: string]: string }>) => Array<{ [key: string]: string }>;
type SortValueCallback = (item: { [key: string]: string }) => string;
Expand Down
2 changes: 1 addition & 1 deletion packages/site-middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"acorn-jsx": "^5.0.0",
"deepmerge": "^4.2.2",
"jwt-decode": "^3.1.2",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"next": "^13.4.1",
"next-mdx-remote": "^4.2.1",
"node-cookie": "^2.1.2",
Expand Down

1 comment on commit adb6d31

@vercel
Copy link

@vercel vercel bot commented on adb6d31 Dec 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mosaic – ./

mosaic-mosaic-dev-team.vercel.app
mosaic-git-main-mosaic-dev-team.vercel.app

Please sign in to comment.