Skip to content

refactor: add es-toolkit#3652

Open
tegan-temporal wants to merge 3 commits into
mainfrom
es-toolkit
Open

refactor: add es-toolkit#3652
tegan-temporal wants to merge 3 commits into
mainfrom
es-toolkit

Conversation

@tegan-temporal

@tegan-temporal tegan-temporal commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Consolidates several small third-party utility packages and hand-rolled helpers onto es-toolkit. Note: es-toolkit was already present in the tree as a transitive dependency (via @storybook/addon-svelte-csf, at 1.43.0); this PR promotes it to a direct dependency (^1.49.0) — it's imported by bundled/published frontend code, matching the classification of the just-*/kebab-case packages it replaces — and dedupes the version.

  • Dropped lodash, just-debounce, just-throttle, kebab-case; added es-toolkit.
  • lodash/isEmptyes-toolkit/compat isEmpty (oidc-server dev util; server-only)
  • just-debounce → es-toolkit debounce
  • just-throttle → es-toolkit throttle
  • kebab-case → es-toolkit kebabCase (cleaner output; only affects a fallback id in search.svelte, no test depends on the old leading-dash format)
  • Local omit → es-toolkit omit (array-key signature; 5 call sites)
  • Search-attribute decode reduce-with-spread → mapValues (also removes an O(n²) accumulator spread) in workflow-execution.ts and standalone-activity-workers.svelte
  • Deleted dead unique util and the now-unused local omit util (+ their tests

Bundle impact

Full production build compared before/after: net-neutral — raw JS +253 B, gzipped −92 B. Tree-shaking pulls only the used functions.

Testing

  • pnpm check → 0 errors
  • pnpm test -- --run → all passing
  • pnpm lint clean

- swap lodash/isEmpty for es-toolkit/compat isEmpty in oidc-server util
- replace just-debounce with es-toolkit debounce (trailing default matches)
- replace just-throttle with es-toolkit throttle (now leading+trailing)
- replace kebab-case with es-toolkit kebabCase
- drop lodash, just-debounce, just-throttle, kebab-case deps; add es-toolkit
- replace local omit util with es-toolkit omit (array key signature)
- convert search-attribute decode reduce-with-spread to es-toolkit mapValues
  (also removes an O(n^2) accumulator spread)
- delete dead unique util and now-unused local omit util
@tegan-temporal tegan-temporal requested a review from a team as a code owner July 9, 2026 23:55
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Jul 10, 2026 12:02am

Request Review

type Request,
type Response,
urlencoded,
} from 'express';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • ⚠️ Could not find a declaration file for module 'oidc-provider'. '/home/runner/work/ui/ui/node_modules/.pnpm/oidc-provider@9.8.6/node_modules/oidc-provider/lib/index.js' implicitly has an 'any' type.

urlencoded,
} from 'express';
import isEmpty from 'lodash/isEmpty.js';
import type Provider from 'oidc-provider';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • ⚠️ Could not find a declaration file for module 'oidc-provider'. '/home/runner/work/ui/ui/node_modules/.pnpm/oidc-provider@9.8.6/node_modules/oidc-provider/lib/index.js' implicitly has an 'any' type.

@temporal-cicd

temporal-cicd Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️

📊 Strict Mode: 114 errors in 13 files (12.8% of 890 total)

src/lib/services/events-service.ts (11)
  • L69:43: Argument of type 'EventSortOrder | undefined' is not assignable to parameter of type 'EventSortOrder'.
  • L72:4: Argument of type '(token: string) => Promise' is not assignable to parameter of type '(token?: NextPageToken | undefined) => Promise'.
  • L82:18: Property 'history' does not exist on type 'WithoutNextPageToken'.
  • L102:20: Parameter 'full' implicitly has an 'any' type.
  • L102:26: Parameter 'current' implicitly has an 'any' type.
  • L108:19: Parameter 'e' implicitly has an 'any' type.
  • L122:4: Argument of type '(token: string) => Promise' is not assignable to parameter of type '(token?: NextPageToken | undefined) => Promise'.
  • L136:17: Property 'history' does not exist on type 'WithoutNextPageToken'.
  • L137:50: Property 'history' does not exist on type 'WithoutNextPageToken'.
  • L148:28: No overload matches this call.
  • L189:6: No overload matches this call.
src/lib/models/workflow-execution.ts (55)
  • L51:50: Argument of type 'PendingNexusOperationState | null | undefined' is not assignable to parameter of type 'PendingNexusOperationState | undefined'.
  • L59:4: Type '{ state: temporal.api.enums.v1.CallbackState; callback?: (temporal.api.common.v1.ICallback | null); trigger?: (temporal.api.workflow.v1.CallbackInfo.ITrigger | null); ... 5 more ...; blockedReason?: (string | null); }' is not assignable to type 'Callback'.
  • L61:37: Argument of type 'CallbackState | null | undefined' is not assignable to parameter of type 'CallbackState | undefined'.
  • L86:36: Type 'undefined' is not assignable to type 'string'.
  • L92:2: Type 'undefined' is not assignable to type 'string'.
  • L99:4: 'response' is possibly 'undefined'.
  • L99:4: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L99:4: Argument of type 'WorkflowSearchAttributes | undefined' is not assignable to parameter of type 'WorkflowSearchAttributes'.
  • L101:15: 'response' is possibly 'undefined'.
  • L101:15: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L102:15: 'response' is possibly 'undefined'.
  • L102:15: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L102:15: 'response.workflowExecutionInfo.type' is possibly 'null' or 'undefined'.
  • L103:13: 'response' is possibly 'undefined'.
  • L103:13: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L103:13: 'response.workflowExecutionInfo.execution' is possibly 'null' or 'undefined'.
  • L104:16: 'response' is possibly 'undefined'.
  • L104:16: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L104:16: 'response.workflowExecutionInfo.execution' is possibly 'null' or 'undefined'.
  • L105:20: 'response' is possibly 'undefined'.
  • L105:20: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L106:18: 'response' is possibly 'undefined'.
  • L106:18: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L107:24: 'response' is possibly 'undefined'.
  • L107:24: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L109:4: 'response' is possibly 'undefined'.
  • L109:4: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L113:24: 'response' is possibly 'undefined'.
  • L113:24: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L114:27: 'response' is possibly 'undefined'.
  • L114:27: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L125:4: 'response' is possibly 'undefined'.
  • L125:4: 'response.workflowExecutionInfo' is possibly 'undefined'.
  • L127:4: 'response' is possibly 'undefined'.
  • L129:4: 'response' is possibly 'undefined'.
  • L131:4: 'response' is possibly 'undefined'.
  • L138:24: 'response' is possibly 'undefined'.
  • L139:25: 'response' is possibly 'undefined'.
  • L140:19: 'response' is possibly 'undefined'.
  • L141:31: 'response' is possibly 'undefined'.
  • L156:4: Type 'string | null | undefined' is not assignable to type 'string'.
  • L157:4: Type 'string | null | undefined' is not assignable to type 'string'.
  • L158:4: Type 'string | null | undefined' is not assignable to type 'string'.
  • L168:4: Type 'IMemo | undefined' is not assignable to type 'IMemo'.
  • L169:4: Type 'IWorkflowExecution | null | undefined' is not assignable to type 'IWorkflowExecution | undefined'.
  • L171:4: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  • L173:4: Type 'IWorkerVersionStamp | null | undefined' is not assignable to type 'MostRecentWOrkflowVersionStamp | undefined'.
  • L177:4: Type 'IPendingWorkflowTaskInfo | undefined' is not assignable to type 'IPendingWorkflowTaskInfo'.
  • L178:4: Type 'Callbacks' is not assignable to type 'Callback[]'.
  • L180:4: Type 'IPriority | null | undefined' is not assignable to type 'IPriority | undefined'.
  • L181:4: Type 'IPayload | null | undefined' is not assignable to type 'IPayload | undefined'.
  • L182:4: Type 'IPayload | null | undefined' is not assignable to type 'IPayload | undefined'.
  • L183:4: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  • L184:4: Type 'IWorkflowExecution | null | undefined' is not assignable to type 'IWorkflowExecution | undefined'.
  • L188:4: Type 'Duration | undefined' is not assignable to type 'Duration'.
src/lib/holocene/radio-input/radio-input.svelte (1)
  • L14:7: Argument of type '$$Props' is not assignable to parameter of type '{ value: T; id: string; label: string; description?: string | undefined; labelHidden?: boolean | undefined; disabled?: boolean | undefined; group?: Writable | undefined; name?: string | undefined; class?: string | undefined; }'.
src/lib/utilities/query/to-list-workflow-filters.ts (3)
  • L44:60: Function lacks ending return statement and return type does not include 'undefined'.
  • L45:17: Type 'undefined' is not assignable to type 'Duration'.
  • L109:10: Type 'string | null' is not assignable to type 'string'.
src/lib/components/search.svelte (1)
  • L48:4: Type '"search" | null' is not assignable to type '"search" | "link" | "success" | "error" | "action" | "activity" | "add-square" | "add" | "apple" | "archives" | "arrow-down" | "arrow-left" | "arrow-up" | "arrow-right" | "ascending" | ... 147 more ... | undefined'.
src/lib/holocene/checkbox.svelte (3)
  • L34:13: Type 'undefined' is not assignable to type 'T'.
  • L35:13: Type 'undefined' is not assignable to type 'T[]'.
  • L13:12: Argument of type '$$Props' is not assignable to parameter of type '{ id?: string | undefined; checked?: boolean | undefined; label?: string | undefined; labelHidden?: boolean | undefined; indeterminate?: boolean | undefined; disabled?: boolean | undefined; ... 6 more ...; class?: string | undefined; }'.
src/lib/components/workflow/pending-activity/pending-activity-card.svelte (8)
  • L174:24: Type 'IPayloads | null | undefined' is not assignable to type 'object | IPayloads | IPayload'.
  • L224:20: Parameter 'timeDifference' implicitly has an 'any' type.
  • L241:8: Argument of type 'number | null | undefined' is not assignable to parameter of type 'number | null'.
  • L246:54: Argument of type 'number | null | undefined' is not assignable to parameter of type 'number'.
  • L31:26: 'activity.attempt' is possibly 'null' or 'undefined'.
  • L95:12: Argument of type 'number | null | undefined' is not assignable to parameter of type 'number'.
  • L97:14: Argument of type 'Duration | null' is not assignable to parameter of type 'string | Duration'.
  • L140:13: 'totalPending' is possibly 'undefined'.
src/lib/components/workflow/pending-nexus-operation/pending-nexus-operation-card.svelte (2)
  • L126:20: Parameter 'timeDifference' implicitly has an 'any' type.
  • L15:26: 'operation.attempt' is possibly 'null' or 'undefined'.
src/lib/holocene/input/range-input.svelte (9)
  • L20:13: Type 'undefined' is not assignable to type 'number'.
  • L21:13: Type 'undefined' is not assignable to type 'number'.
  • L22:13: Type 'undefined' is not assignable to type 'number'.
  • L23:13: Type 'undefined' is not assignable to type 'string'.
  • L52:27: Binding element 'value' implicitly has an 'any' type.
  • L52:34: Binding element 'min' implicitly has an 'any' type.
  • L52:39: Binding element 'max' implicitly has an 'any' type.
  • L57:33: Binding element 'outputElement' implicitly has an 'any' type.
  • L57:48: Binding element 'outputXPos' implicitly has an 'any' type.
src/lib/holocene/table/paginated-table/api-paginated.svelte (2)
  • L104:20: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ items: T[]; nextPageToken: string; }'.
  • L120:20: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ items: T[]; nextPageToken: string; }'.
src/lib/components/workflow/workflow-filters.svelte (6)
  • L93:6: Type 'string | null' is not assignable to type 'string | undefined'.
  • L108:13: Type 'string | undefined' is not assignable to type 'string'.
  • L118:13: Type 'string | undefined' is not assignable to type 'string'.
  • L127:16: Type 'null' is not assignable to type 'SelectOptionValue'.
  • L138:13: Type 'WorkflowStatus | undefined' is not assignable to type 'SelectOptionValue'.
  • L142:19: Type 'string | null' is not assignable to type 'SelectOptionValue'.
src/lib/holocene/api-pagination.svelte (11)
  • L57:13: Type 'undefined' is not assignable to type '(error: Error) => void | undefined'.
  • L59:13: Type 'undefined' is not assignable to type '(event: KeyboardEvent) => void | undefined'.
  • L60:13: Type 'undefined' is not assignable to type '(event: KeyboardEvent) => void | undefined'.
  • L62:13: Type 'undefined' is not assignable to type '(event: KeyboardEvent) => void | undefined'.
  • L74:13: Type 'undefined' is not assignable to type 'string'.
  • L87:15: Type 'undefined' is not assignable to type 'Error'.
  • L110:20: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ items: T[]; nextPageToken: string; }'.
  • L113:6: Type 'unknown' is not assignable to type 'Error'.
  • L129:22: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ items: T[]; nextPageToken: string; }'.
  • L192:20: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ items: T[]; nextPageToken: string; }'.
  • L195:6: Type 'unknown' is not assignable to type 'Error'.
utilities/oidc-server/routes/express.ts (2)
  • L12:26: Could not find a declaration file for module 'oidc-provider'. '/home/runner/work/ui/ui/node_modules/.pnpm/oidc-provider@9.8.6/node_modules/oidc-provider/lib/index.js' implicitly has an 'any' type.
  • L13:23: Could not find a declaration file for module 'oidc-provider'. '/home/runner/work/ui/ui/node_modules/.pnpm/oidc-provider@9.8.6/node_modules/oidc-provider/lib/index.js' implicitly has an 'any' type.

Generated by 🚫 dangerJS against d21fa54

It is imported by bundled/published frontend code (debounce, throttle,
kebabCase, omit, mapValues), and the packages it replaced
(just-debounce/just-throttle/kebab-case) were regular dependencies too.
@tegan-temporal tegan-temporal changed the title refactor: consolidate utilities onto es-toolkit refactor: add es-toolkit Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant