diff --git a/apps/storybook/package.json b/apps/storybook/package.json index aa5fc46fa..b7e77b9bf 100644 --- a/apps/storybook/package.json +++ b/apps/storybook/package.json @@ -19,7 +19,7 @@ "@react-three/fiber": "8.15.12", "d3-format": "3.1.0", "greenlet": "1.1.0", - "lodash": "4.17.21", + "lodash-es": "4.17.21", "ndarray": "1.0.19", "normalize.css": "8.0.1", "react": "18.2.0", @@ -36,7 +36,7 @@ "@storybook/react": "7.6.4", "@storybook/react-vite": "7.6.4", "@types/d3-format": "~3.0.4", - "@types/lodash": "~4.14.202", + "@types/lodash-es": "~4.17.12", "@types/ndarray": "1.0.14", "@types/node": "^20.10.5", "@types/react": "^18.2.45", diff --git a/apps/storybook/src/AxialSelectToZoom.stories.tsx b/apps/storybook/src/AxialSelectToZoom.stories.tsx index 3992cb058..42ddce84e 100644 --- a/apps/storybook/src/AxialSelectToZoom.stories.tsx +++ b/apps/storybook/src/AxialSelectToZoom.stories.tsx @@ -13,7 +13,7 @@ import { Zoom, } from '@h5web/lib'; import type { Meta, StoryObj } from '@storybook/react'; -import { range } from 'lodash'; +import { range } from 'lodash-es'; import FillHeight from './decorators/FillHeight'; diff --git a/apps/storybook/src/DataCurve.stories.tsx b/apps/storybook/src/DataCurve.stories.tsx index c5371449f..d67dc5d13 100644 --- a/apps/storybook/src/DataCurve.stories.tsx +++ b/apps/storybook/src/DataCurve.stories.tsx @@ -10,7 +10,7 @@ import { } from '@h5web/lib'; import { assertDefined } from '@h5web/shared/guards'; import type { Meta, StoryObj } from '@storybook/react'; -import { range } from 'lodash'; +import { range } from 'lodash-es'; import { useState } from 'react'; import FillHeight from './decorators/FillHeight'; diff --git a/apps/storybook/src/ErrorBars.stories.tsx b/apps/storybook/src/ErrorBars.stories.tsx index dd8f53cd9..2e34ea259 100644 --- a/apps/storybook/src/ErrorBars.stories.tsx +++ b/apps/storybook/src/ErrorBars.stories.tsx @@ -8,7 +8,7 @@ import { import { assertDefined } from '@h5web/shared/guards'; import { ScaleType } from '@h5web/shared/vis-models'; import type { Meta, StoryObj } from '@storybook/react'; -import { range } from 'lodash'; +import { range } from 'lodash-es'; import FillHeight from './decorators/FillHeight'; diff --git a/apps/storybook/src/Glyphs.stories.tsx b/apps/storybook/src/Glyphs.stories.tsx index 6059e5614..aa0632331 100644 --- a/apps/storybook/src/Glyphs.stories.tsx +++ b/apps/storybook/src/Glyphs.stories.tsx @@ -9,7 +9,7 @@ import { import { assertDefined } from '@h5web/shared/guards'; import { ScaleType } from '@h5web/shared/vis-models'; import type { Meta, StoryObj } from '@storybook/react'; -import { range } from 'lodash'; +import { range } from 'lodash-es'; import FillHeight from './decorators/FillHeight'; diff --git a/apps/storybook/src/HeatmapMesh.stories.tsx b/apps/storybook/src/HeatmapMesh.stories.tsx index 2419faeb5..dbe442660 100644 --- a/apps/storybook/src/HeatmapMesh.stories.tsx +++ b/apps/storybook/src/HeatmapMesh.stories.tsx @@ -10,7 +10,7 @@ import { assertDefined } from '@h5web/shared/guards'; import { ScaleType } from '@h5web/shared/vis-models'; import { COLOR_SCALE_TYPES, toTypedNdArray } from '@h5web/shared/vis-utils'; import type { Meta, StoryObj } from '@storybook/react'; -import { range } from 'lodash'; +import { range } from 'lodash-es'; import ndarray from 'ndarray'; import { LinearFilter, NearestFilter } from 'three'; diff --git a/apps/storybook/src/Line.stories.tsx b/apps/storybook/src/Line.stories.tsx index c5ae71373..0629550d8 100644 --- a/apps/storybook/src/Line.stories.tsx +++ b/apps/storybook/src/Line.stories.tsx @@ -8,7 +8,7 @@ import { import { assertDefined } from '@h5web/shared/guards'; import { ScaleType } from '@h5web/shared/vis-models'; import type { Meta, StoryObj } from '@storybook/react'; -import { range } from 'lodash'; +import { range } from 'lodash-es'; import FillHeight from './decorators/FillHeight'; diff --git a/apps/storybook/src/TiledHeatmapMesh/checkerboard-api.ts b/apps/storybook/src/TiledHeatmapMesh/checkerboard-api.ts index 7d3586b98..38316fe4c 100644 --- a/apps/storybook/src/TiledHeatmapMesh/checkerboard-api.ts +++ b/apps/storybook/src/TiledHeatmapMesh/checkerboard-api.ts @@ -1,7 +1,7 @@ import type { Size } from '@h5web/lib'; import { getLayerSizes, TilesApi } from '@h5web/lib'; import greenlet from 'greenlet'; -import { clamp } from 'lodash'; +import { clamp } from 'lodash-es'; import type { NdArray } from 'ndarray'; import ndarray from 'ndarray'; import { createFetchStore } from 'react-suspense-fetch'; diff --git a/apps/storybook/src/TiledHeatmapMesh/mandlebrot-api.ts b/apps/storybook/src/TiledHeatmapMesh/mandlebrot-api.ts index a4ee5ac4c..7c5292a3a 100644 --- a/apps/storybook/src/TiledHeatmapMesh/mandlebrot-api.ts +++ b/apps/storybook/src/TiledHeatmapMesh/mandlebrot-api.ts @@ -2,7 +2,7 @@ import type { Size } from '@h5web/lib'; import { getLayerSizes, TilesApi } from '@h5web/lib'; import type { Domain } from '@h5web/shared/vis-models'; import greenlet from 'greenlet'; -import { clamp } from 'lodash'; +import { clamp } from 'lodash-es'; import type { NdArray } from 'ndarray'; import ndarray from 'ndarray'; import { createFetchStore } from 'react-suspense-fetch'; diff --git a/packages/app/package.json b/packages/app/package.json index 2c671b89b..d02110e66 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -54,7 +54,7 @@ "@react-three/fiber": "8.15.12", "axios": "1.6.2", "d3-format": "3.1.0", - "lodash": "4.17.21", + "lodash-es": "4.17.21", "ndarray": "1.0.19", "ndarray-ops": "1.2.2", "react-error-boundary": "4.0.11", @@ -73,7 +73,7 @@ "@testing-library/react": "14.1.2", "@testing-library/user-event": "14.5.1", "@types/d3-format": "~3.0.4", - "@types/lodash": "~4.14.202", + "@types/lodash-es": "~4.17.12", "@types/ndarray": "1.0.14", "@types/node": "^20.10.5", "@types/react": "^18.2.45", diff --git a/packages/app/src/dimension-mapper/AxisMapper.tsx b/packages/app/src/dimension-mapper/AxisMapper.tsx index 7d4556b91..83a378da7 100644 --- a/packages/app/src/dimension-mapper/AxisMapper.tsx +++ b/packages/app/src/dimension-mapper/AxisMapper.tsx @@ -1,7 +1,7 @@ import { ToggleGroup } from '@h5web/lib'; import type { AxisMapping } from '@h5web/shared/nexus-models'; import type { Axis } from '@h5web/shared/vis-models'; -import { isNumber } from 'lodash'; +import { isNumber } from 'lodash-es'; import styles from './DimensionMapper.module.css'; import type { DimensionMapping } from './models'; diff --git a/packages/app/src/dimension-mapper/DimensionMapper.tsx b/packages/app/src/dimension-mapper/DimensionMapper.tsx index 212ebad53..e1d12b3a6 100644 --- a/packages/app/src/dimension-mapper/DimensionMapper.tsx +++ b/packages/app/src/dimension-mapper/DimensionMapper.tsx @@ -1,5 +1,5 @@ import type { AxisMapping } from '@h5web/shared/nexus-models'; -import { isNumber } from 'lodash'; +import { isNumber } from 'lodash-es'; import AxisMapper from './AxisMapper'; import styles from './DimensionMapper.module.css'; diff --git a/packages/app/src/dimension-mapper/utils.ts b/packages/app/src/dimension-mapper/utils.ts index 87f94f91f..108053d03 100644 --- a/packages/app/src/dimension-mapper/utils.ts +++ b/packages/app/src/dimension-mapper/utils.ts @@ -1,5 +1,5 @@ import type { Axis } from '@h5web/shared/vis-models'; -import { isNumber } from 'lodash'; +import { isNumber } from 'lodash-es'; export function isAxis(elem: number | Axis): elem is Axis { return !isNumber(elem); diff --git a/packages/app/src/metadata-viewer/MetadataViewer.tsx b/packages/app/src/metadata-viewer/MetadataViewer.tsx index 6e0d8dd71..017d0796e 100644 --- a/packages/app/src/metadata-viewer/MetadataViewer.tsx +++ b/packages/app/src/metadata-viewer/MetadataViewer.tsx @@ -1,7 +1,7 @@ import { isAbsolutePath, isDataset } from '@h5web/shared/guards'; import { EntityKind } from '@h5web/shared/hdf5-models'; import { buildEntityPath } from '@h5web/shared/hdf5-utils'; -import { capitalize } from 'lodash'; +import { capitalize } from 'lodash-es'; import { memo, Suspense } from 'react'; import { ErrorBoundary } from 'react-error-boundary'; diff --git a/packages/app/src/vis-packs/core/hooks.ts b/packages/app/src/vis-packs/core/hooks.ts index 846094c32..f59ce45c3 100644 --- a/packages/app/src/vis-packs/core/hooks.ts +++ b/packages/app/src/vis-packs/core/hooks.ts @@ -7,7 +7,7 @@ import type { Value, } from '@h5web/shared/hdf5-models'; import type { NumArray } from '@h5web/shared/vis-models'; -import { castArray } from 'lodash'; +import { castArray } from 'lodash-es'; import type { NdArray, TypedArray } from 'ndarray'; import { useMemo } from 'react'; diff --git a/packages/app/src/vis-packs/core/line/config.tsx b/packages/app/src/vis-packs/core/line/config.tsx index d17840a74..2667b593c 100644 --- a/packages/app/src/vis-packs/core/line/config.tsx +++ b/packages/app/src/vis-packs/core/line/config.tsx @@ -3,7 +3,7 @@ import { isDefined } from '@h5web/shared/guards'; import type { AxisScaleType } from '@h5web/shared/vis-models'; import { ScaleType } from '@h5web/shared/vis-models'; import { useMap } from '@react-hookz/web'; -import { omit } from 'lodash'; +import { omit } from 'lodash-es'; import { createContext, useContext, useState } from 'react'; import type { StoreApi } from 'zustand'; import { createStore, useStore } from 'zustand'; diff --git a/packages/app/src/vis-packs/core/utils.ts b/packages/app/src/vis-packs/core/utils.ts index 87a6f0b67..087bec756 100644 --- a/packages/app/src/vis-packs/core/utils.ts +++ b/packages/app/src/vis-packs/core/utils.ts @@ -3,7 +3,7 @@ import type { ArrayValue, NumericLikeType } from '@h5web/shared/hdf5-models'; import { DTypeClass } from '@h5web/shared/hdf5-models'; import type { Axis, Domain, NumArray } from '@h5web/shared/vis-models'; import { createArrayFromView } from '@h5web/shared/vis-utils'; -import { isNumber } from 'lodash'; +import { isNumber } from 'lodash-es'; import type { NdArray, TypedArray } from 'ndarray'; import ndarray from 'ndarray'; diff --git a/packages/app/src/vis-packs/nexus/containers/NxScatterContainer.tsx b/packages/app/src/vis-packs/nexus/containers/NxScatterContainer.tsx index 809c87aeb..3c8670013 100644 --- a/packages/app/src/vis-packs/nexus/containers/NxScatterContainer.tsx +++ b/packages/app/src/vis-packs/nexus/containers/NxScatterContainer.tsx @@ -3,7 +3,7 @@ import { assertGroup, assertNumDims, } from '@h5web/shared/guards'; -import { isEqual } from 'lodash'; +import { isEqual } from 'lodash-es'; import { useScatterConfig } from '../../core/scatter/config'; import MappedScatterVis from '../../core/scatter/MappedScatterVis'; diff --git a/packages/app/src/vis-packs/nexus/containers/NxSpectrumContainer.tsx b/packages/app/src/vis-packs/nexus/containers/NxSpectrumContainer.tsx index 9f9696c8e..38d87f95b 100644 --- a/packages/app/src/vis-packs/nexus/containers/NxSpectrumContainer.tsx +++ b/packages/app/src/vis-packs/nexus/containers/NxSpectrumContainer.tsx @@ -1,6 +1,6 @@ import { ScaleType } from '@h5web/lib'; import { assertGroup, isAxisScaleType } from '@h5web/shared/guards'; -import { isEqual } from 'lodash'; +import { isEqual } from 'lodash-es'; import DimensionMapper from '../../../dimension-mapper/DimensionMapper'; import { useDimMappingState } from '../../../dimension-mapper/hooks'; diff --git a/packages/lib/package.json b/packages/lib/package.json index eb8579c7e..e195b5181 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -64,7 +64,7 @@ "d3-interpolate": "3.0.1", "d3-scale": "4.0.2", "d3-scale-chromatic": "3.0.0", - "lodash": "4.17.21", + "lodash-es": "4.17.21", "ndarray": "1.0.19", "ndarray-ops": "1.2.2", "react-aria-menubutton": "7.0.3", @@ -85,7 +85,7 @@ "@types/d3-interpolate": "~3.0.4", "@types/d3-scale": "~4.0.8", "@types/d3-scale-chromatic": "~3.0.3", - "@types/lodash": "~4.14.202", + "@types/lodash-es": "~4.17.12", "@types/ndarray": "~1.0.14", "@types/node": "^20.10.5", "@types/react": "^18.2.45", diff --git a/packages/lib/src/interactions/hooks.ts b/packages/lib/src/interactions/hooks.ts index acd3e15b8..3a7c0be89 100644 --- a/packages/lib/src/interactions/hooks.ts +++ b/packages/lib/src/interactions/hooks.ts @@ -1,6 +1,6 @@ import { useEventListener, useSyncedRef, useToggle } from '@react-hookz/web'; import { useThree } from '@react-three/fiber'; -import { castArray } from 'lodash'; +import { castArray } from 'lodash-es'; import { useCallback, useEffect, useRef, useState } from 'react'; import { Vector3 } from 'three'; diff --git a/packages/lib/src/interactions/interaction.ts b/packages/lib/src/interactions/interaction.ts index 02311d06f..9c79ed1f1 100644 --- a/packages/lib/src/interactions/interaction.ts +++ b/packages/lib/src/interactions/interaction.ts @@ -1,4 +1,4 @@ -import { castArray } from 'lodash'; +import { castArray } from 'lodash-es'; import type { ModifierKey } from 'react'; import type { InteractionConfig } from './models'; diff --git a/packages/lib/src/vis/heatmap/utils.ts b/packages/lib/src/vis/heatmap/utils.ts index ed0035803..c1acc0742 100644 --- a/packages/lib/src/vis/heatmap/utils.ts +++ b/packages/lib/src/vis/heatmap/utils.ts @@ -1,7 +1,7 @@ import type { Domain, NumArray } from '@h5web/shared/vis-models'; import { ScaleType } from '@h5web/shared/vis-models'; import { getDims, toTypedNdArray } from '@h5web/shared/vis-utils'; -import { range } from 'lodash'; +import { range } from 'lodash-es'; import type { NdArray } from 'ndarray'; import ndarray from 'ndarray'; import type { MagnificationTextureFilter } from 'three'; diff --git a/packages/lib/src/vis/matrix/HeaderCells.tsx b/packages/lib/src/vis/matrix/HeaderCells.tsx index 54f71d8c7..5d1eadb6d 100644 --- a/packages/lib/src/vis/matrix/HeaderCells.tsx +++ b/packages/lib/src/vis/matrix/HeaderCells.tsx @@ -1,4 +1,4 @@ -import { range } from 'lodash'; +import { range } from 'lodash-es'; import { useContext } from 'react'; import { SettingsContext } from './context'; diff --git a/packages/lib/src/vis/scaleGamma.ts b/packages/lib/src/vis/scaleGamma.ts index 2ef617547..0d991f52d 100644 --- a/packages/lib/src/vis/scaleGamma.ts +++ b/packages/lib/src/vis/scaleGamma.ts @@ -7,7 +7,7 @@ import type { ScalePower, UnknownReturnType, } from 'd3-scale'; -import { isNumber } from 'lodash'; +import { isNumber } from 'lodash-es'; import type { ScaleGammaConfig } from './models'; diff --git a/packages/lib/src/vis/tiles/Tile.tsx b/packages/lib/src/vis/tiles/Tile.tsx index 2e8209d7e..c43909298 100644 --- a/packages/lib/src/vis/tiles/Tile.tsx +++ b/packages/lib/src/vis/tiles/Tile.tsx @@ -1,5 +1,5 @@ import type { ThreeEvent } from '@react-three/fiber'; -import { throttle } from 'lodash'; +import { throttle } from 'lodash-es'; import { memo } from 'react'; import type { MagnificationTextureFilter } from 'three'; import { Vector2 } from 'three'; diff --git a/packages/lib/src/vis/tiles/TiledHeatmapMesh.tsx b/packages/lib/src/vis/tiles/TiledHeatmapMesh.tsx index 4969f9365..16ea08201 100644 --- a/packages/lib/src/vis/tiles/TiledHeatmapMesh.tsx +++ b/packages/lib/src/vis/tiles/TiledHeatmapMesh.tsx @@ -1,4 +1,4 @@ -import { clamp, range } from 'lodash'; +import { clamp, range } from 'lodash-es'; import { useRef } from 'react'; import type { Group } from 'three'; diff --git a/packages/lib/src/vis/utils.ts b/packages/lib/src/vis/utils.ts index 8c1f90ffe..1d0ddff0e 100644 --- a/packages/lib/src/vis/utils.ts +++ b/packages/lib/src/vis/utils.ts @@ -22,7 +22,7 @@ import { } from '@visx/scale'; import { range, tickStep } from 'd3-array'; import type { ScaleLinear, ScaleThreshold } from 'd3-scale'; -import { clamp } from 'lodash'; +import { clamp } from 'lodash-es'; import type { IUniform } from 'three'; import { BufferAttribute } from 'three'; diff --git a/packages/shared/package.json b/packages/shared/package.json index e0f10e4f4..692bb9ec6 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -28,14 +28,14 @@ }, "peerDependencies": { "d3-format": "3.1.0", - "lodash": "4.17.21", + "lodash-es": "4.17.21", "ndarray": "1.0.19", "ndarray-ops": "1.2.2", "react": ">=18" }, "devDependencies": { "@types/d3-format": "~3.0.4", - "@types/lodash": "~4.14.202", + "@types/lodash-es": "~4.17.12", "@types/ndarray": "~1.0.14", "@types/ndarray-ops": "~1.2.7", "@types/node": "^20.10.5", @@ -43,7 +43,7 @@ "d3-format": "3.1.0", "eslint": "8.56.0", "eslint-config-galex": "4.5.2", - "lodash": "4.17.21", + "lodash-es": "4.17.21", "ndarray": "1.0.19", "ndarray-ops": "1.2.2", "react": "18.2.0", diff --git a/packages/shared/src/guards.ts b/packages/shared/src/guards.ts index 90477e549..158bfed08 100644 --- a/packages/shared/src/guards.ts +++ b/packages/shared/src/guards.ts @@ -1,4 +1,4 @@ -import { isTypedArray as isTypedArrayLodash } from 'lodash'; +import { isTypedArray as isTypedArrayLodash } from 'lodash-es'; import type { Data, NdArray, TypedArray } from 'ndarray'; import type { diff --git a/packages/shared/src/mock-values.ts b/packages/shared/src/mock-values.ts index 148ecdfed..51e2506e7 100644 --- a/packages/shared/src/mock-values.ts +++ b/packages/shared/src/mock-values.ts @@ -1,4 +1,4 @@ -import { range } from 'lodash'; +import { range } from 'lodash-es'; import type { NdArray } from 'ndarray'; import ndarray from 'ndarray'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 26dce3110..ca758b0f5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -144,7 +144,7 @@ importers: greenlet: specifier: 1.1.0 version: 1.1.0 - lodash: + lodash-es: specifier: 4.17.21 version: 4.17.21 ndarray: @@ -190,9 +190,9 @@ importers: '@types/d3-format': specifier: ~3.0.4 version: 3.0.4 - '@types/lodash': - specifier: ~4.14.202 - version: 4.14.202 + '@types/lodash-es': + specifier: ~4.17.12 + version: 4.17.12 '@types/ndarray': specifier: 1.0.14 version: 1.0.14 @@ -244,7 +244,7 @@ importers: d3-format: specifier: 3.1.0 version: 3.1.0 - lodash: + lodash-es: specifier: 4.17.21 version: 4.17.21 ndarray: @@ -296,9 +296,9 @@ importers: '@types/d3-format': specifier: ~3.0.4 version: 3.0.4 - '@types/lodash': - specifier: ~4.14.202 - version: 4.14.202 + '@types/lodash-es': + specifier: ~4.17.12 + version: 4.17.12 '@types/ndarray': specifier: 1.0.14 version: 1.0.14 @@ -459,7 +459,7 @@ importers: d3-scale-chromatic: specifier: 3.0.0 version: 3.0.0 - lodash: + lodash-es: specifier: 4.17.21 version: 4.17.21 ndarray: @@ -517,9 +517,9 @@ importers: '@types/d3-scale-chromatic': specifier: ~3.0.3 version: 3.0.3 - '@types/lodash': - specifier: ~4.14.202 - version: 4.14.202 + '@types/lodash-es': + specifier: ~4.17.12 + version: 4.17.12 '@types/ndarray': specifier: ~1.0.14 version: 1.0.14 @@ -601,9 +601,9 @@ importers: '@types/d3-format': specifier: ~3.0.4 version: 3.0.4 - '@types/lodash': - specifier: ~4.14.202 - version: 4.14.202 + '@types/lodash-es': + specifier: ~4.17.12 + version: 4.17.12 '@types/ndarray': specifier: ~1.0.14 version: 1.0.14 @@ -625,7 +625,7 @@ importers: eslint-config-galex: specifier: 4.5.2 version: 4.5.2(eslint@8.56.0)(tailwindcss@3.3.6) - lodash: + lodash-es: specifier: 4.17.21 version: 4.17.21 ndarray: @@ -5037,6 +5037,12 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/lodash-es@4.17.12: + resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} + dependencies: + '@types/lodash': 4.14.202 + dev: true + /@types/lodash@4.14.202: resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==} @@ -10261,6 +10267,9 @@ packages: p-locate: 5.0.0 dev: true + /lodash-es@4.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + /lodash.clamp@4.0.3: resolution: {integrity: sha512-HvzRFWjtcguTW7yd8NJBshuNaCa8aqNFtnswdT7f/cMd/1YKy5Zzoq4W/Oxvnx9l7aeY258uSdDfM793+eLsVg==} dev: false