Repository navigation
[uplift] fix: remove lodash types from published declarations - #3163
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: edb7abf The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
🟢 Approval recommended
The declaration-type cleanup has no active review issues.
No open issues 🎉
What changed in this PR
Removes lodash type references from six packages’ published declarations, addressing consumer TypeScript errors as part of the #3093 types uplift without changing throttle behavior.
Changes:
- Adds local throttle types and wrappers in five container packages.
- Gives
VictorySharedEvents.getBasePropsFromChildrenan explicitRecord<string, any>return type. - Removes lodash declaration-error allowances from package checks and adds a patch changeset.
| File | Description |
|---|---|
scripts/pack-check.mjs |
Removes allowances for lodash declaration errors. |
packages/victory-zoom-container/src/zoom-helpers.ts |
Locally types throttled mouse-move and wheel handlers. |
packages/victory-voronoi-container/src/voronoi-helpers.ts |
Locally types the throttled mouse-move handler. |
packages/victory-shared-events/src/victory-shared-events.tsx |
Adds an explicit child base-props return type. |
packages/victory-selection-container/src/selection-helpers.tsx |
Locally types the throttled mouse-move handler. |
packages/victory-cursor-container/src/cursor-helpers.tsx |
Locally types the throttled mouse-move handler. |
packages/victory-brush-container/src/brush-helpers.ts |
Locally types the throttled global mouse-move handler. |
.changeset/lodash-declaration-types.md |
Records patch releases for all six affected packages. |
Review effort: Balanced
Merged
Open
ryan-roemer
pushed a commit
that referenced
this pull request
Nov 12, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## victory-core@38.1.0 ### Minor Changes - [#3166](#3166) [`c47d8ca`](c47d8ca) - The primitives `Circle`, `Line`, `Path`, `Rect`, `Text` and `TSpan` accept their element's SVG attributes in TypeScript, such as `<Line x1={25} y1={270} />`, `<Path d="..." />` and `<Circle cx={1} cy={2} r={3} />` ([#3122](#3122)). These worked at runtime but failed to type-check. Where a Victory prop shares a name with an SVG attribute (`origin`, `role`, `style`, `id`, `tabIndex`, `rx`, ...), Victory's type is kept; `name`, which the primitives don't write to the element, stays out. `VictoryPrimitiveShapeProps` takes an optional element type (`VictoryPrimitiveShapeProps<SVGLineElement>`). New exported types: `TSpanProps` (the props of `TSpan`) and `VictoryPrimitiveSvgProps`. ### Patch Changes - [#3165](#3165) [`3ba0908`](3ba0908) - `DataGetterPropType` (the type of `x`, `y`, `y0` and `sortKey`) accepts accessors that return a `Date`, such as `x={(d) => new Date(d.date)}`. These worked at runtime but failed to type-check (TS2769). - [#3164](#3164) [`1e3997f`](1e3997f) - Fix type errors in published declarations under `skipLibCheck: false`. `createContainer` and `makeCreateContainerFunction` now have explicit return types (TS2344 before), with the same props as before. `ErrorBar`'s props are `ErrorBarProps` instead of `any` (`typeof ErrorBar.default`, TS2339 before). Code that passed `ErrorBar` undeclared props, or wrongly typed ones, compiled only because of this and now fails to type-check. `Axis.getTicks` returns `number[] | string[] | Date[]`: it returns `Date`s for date `tickValues`, which its inferred `number[] | string[]` left out (also `VictoryAxis`'s inferred `ticks`). - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-area@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-axis@38.1.0 ### Patch Changes - [#3164](#3164) [`1e3997f`](1e3997f) - Fix type errors in published declarations under `skipLibCheck: false`. `createContainer` and `makeCreateContainerFunction` now have explicit return types (TS2344 before), with the same props as before. `ErrorBar`'s props are `ErrorBarProps` instead of `any` (`typeof ErrorBar.default`, TS2339 before). Code that passed `ErrorBar` undeclared props, or wrongly typed ones, compiled only because of this and now fails to type-check. `Axis.getTicks` returns `number[] | string[] | Date[]`: it returns `Date`s for date `tickValues`, which its inferred `number[] | string[]` left out (also `VictoryAxis`'s inferred `ticks`). - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-bar@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-box-plot@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-brush-container@38.1.0 ### Patch Changes - [#3163](#3163) [`e1909f7`](e1909f7) - Type declarations no longer reference lodash's types, which consumers don't have (`@types/lodash` isn't a dependency): they resolved to `any`, or failed with TS7016 under `skipLibCheck: false`. The throttled helper handlers (`BrushHelpers.onGlobalMouseMove`, `onMouseMove`, `ZoomHelpers.onWheel`, ...) are now typed with their call signature, `cancel()` and `flush()`, and `VictorySharedEvents`'s `getBaseProps`/`getBasePropsFromChildren` return `Record<string, any>`. ## victory-candlestick@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-canvas@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-create-container@38.1.0 ### Patch Changes - [#3164](#3164) [`1e3997f`](1e3997f) - Fix type errors in published declarations under `skipLibCheck: false`. `createContainer` and `makeCreateContainerFunction` now have explicit return types (TS2344 before), with the same props as before. `ErrorBar`'s props are `ErrorBarProps` instead of `any` (`typeof ErrorBar.default`, TS2339 before). Code that passed `ErrorBar` undeclared props, or wrongly typed ones, compiled only because of this and now fails to type-check. `Axis.getTicks` returns `number[] | string[] | Date[]`: it returns `Date`s for date `tickValues`, which its inferred `number[] | string[]` left out (also `VictoryAxis`'s inferred `ticks`). ## victory-cursor-container@38.1.0 ### Patch Changes - [#3163](#3163) [`e1909f7`](e1909f7) - Type declarations no longer reference lodash's types, which consumers don't have (`@types/lodash` isn't a dependency): they resolved to `any`, or failed with TS7016 under `skipLibCheck: false`. The throttled helper handlers (`BrushHelpers.onGlobalMouseMove`, `onMouseMove`, `ZoomHelpers.onWheel`, ...) are now typed with their call signature, `cancel()` and `flush()`, and `VictorySharedEvents`'s `getBaseProps`/`getBasePropsFromChildren` return `Record<string, any>`. ## victory-errorbar@38.1.0 ### Patch Changes - [#3164](#3164) [`1e3997f`](1e3997f) - Fix type errors in published declarations under `skipLibCheck: false`. `createContainer` and `makeCreateContainerFunction` now have explicit return types (TS2344 before), with the same props as before. `ErrorBar`'s props are `ErrorBarProps` instead of `any` (`typeof ErrorBar.default`, TS2339 before). Code that passed `ErrorBar` undeclared props, or wrongly typed ones, compiled only because of this and now fails to type-check. `Axis.getTicks` returns `number[] | string[] | Date[]`: it returns `Date`s for date `tickValues`, which its inferred `number[] | string[]` left out (also `VictoryAxis`'s inferred `ticks`). - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-histogram@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-legend@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-line@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-pie@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-polar-axis@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-scatter@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-selection-container@38.1.0 ### Patch Changes - [#3163](#3163) [`e1909f7`](e1909f7) - Type declarations no longer reference lodash's types, which consumers don't have (`@types/lodash` isn't a dependency): they resolved to `any`, or failed with TS7016 under `skipLibCheck: false`. The throttled helper handlers (`BrushHelpers.onGlobalMouseMove`, `onMouseMove`, `ZoomHelpers.onWheel`, ...) are now typed with their call signature, `cancel()` and `flush()`, and `VictorySharedEvents`'s `getBaseProps`/`getBasePropsFromChildren` return `Record<string, any>`. ## victory-shared-events@38.1.0 ### Patch Changes - [#3163](#3163) [`e1909f7`](e1909f7) - Type declarations no longer reference lodash's types, which consumers don't have (`@types/lodash` isn't a dependency): they resolved to `any`, or failed with TS7016 under `skipLibCheck: false`. The throttled helper handlers (`BrushHelpers.onGlobalMouseMove`, `onMouseMove`, `ZoomHelpers.onWheel`, ...) are now typed with their call signature, `cancel()` and `flush()`, and `VictorySharedEvents`'s `getBaseProps`/`getBasePropsFromChildren` return `Record<string, any>`. ## victory-voronoi@38.1.0 ### Patch Changes - [#3160](#3160) [`37c7a74`](37c7a74) - Build type declarations with `@types/react` 19. Refs from `useCanvasContext()` (`canvasRef`) and `useVictoryContainer()` (`localContainerRef`) are now typed `RefObject<HTMLCanvasElement | null>` and `RefObject<HTMLDivElement | null>` (no change on `@types/react` 18; correct on 19). Inferred `ReactElement` return types of some render methods now use `unknown` props instead of `any`, and class component types no longer list the legacy `refs` property. Code type-checks the same on `@types/react` 18 and 19. ## victory-voronoi-container@38.1.0 ### Patch Changes - [#3163](#3163) [`e1909f7`](e1909f7) - Type declarations no longer reference lodash's types, which consumers don't have (`@types/lodash` isn't a dependency): they resolved to `any`, or failed with TS7016 under `skipLibCheck: false`. The throttled helper handlers (`BrushHelpers.onGlobalMouseMove`, `onMouseMove`, `ZoomHelpers.onWheel`, ...) are now typed with their call signature, `cancel()` and `flush()`, and `VictorySharedEvents`'s `getBaseProps`/`getBasePropsFromChildren` return `Record<string, any>`. ## victory-zoom-container@38.1.0 ### Patch Changes - [#3163](#3163) [`e1909f7`](e1909f7) - Type declarations no longer reference lodash's types, which consumers don't have (`@types/lodash` isn't a dependency): they resolved to `any`, or failed with TS7016 under `skipLibCheck: false`. The throttled helper handlers (`BrushHelpers.onGlobalMouseMove`, `onMouseMove`, `ZoomHelpers.onWheel`, ...) are now typed with their call signature, `cancel()` and `flush()`, and `VictorySharedEvents`'s `getBaseProps`/`getBasePropsFromChildren` return `Record<string, any>`. ## victory@38.1.0 No changes in this release. ## victory-brush-line@38.1.0 No changes in this release. ## victory-chart@38.1.0 No changes in this release. ## victory-group@38.1.0 No changes in this release. ## victory-stack@38.1.0 No changes in this release. ## victory-tooltip@38.1.0 No changes in this release. ## victory-vendor@38.1.0 No changes in this release. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3093 (Phase 4 types batch, item 2).
import("lodash")types (DebouncedFuncLeading,Dictionary) inferred from lodash calls;@types/lodashisn't a dependency, so consumers gotany, or TS7016 withskipLibCheck: false.Throttled<T>type (same shape: call signature,cancel(),flush()) via a typedthrottleLeadingwrapper. Local, not exported from victory-core, since lodash is to be removed (Remove dependency onlodash#2711).VictorySharedEvents:getBasePropsFromChildrenreturnsRecord<string, any>.pack:check: removed the lodash TS7016 entries fromALLOWED_DECLARATION_ERRORS.