[PR #30397] fix(web): migrate es-toolkit/compat API (uniqueId & isEmpty) #32801

Closed
opened 2026-02-21 20:52:06 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/30397

State: closed
Merged: No


Summary

  • Replace uniqueId from es-toolkit/compat with native implementation
  • Replace isEmpty from es-toolkit/compat with native implementation
  • Add utility functions in web/utils/toolkit-helpers.ts

Changes

  • uniqueId: simple counter-based ID generator
  • isEmpty: checks null, arrays, strings, Maps, Sets, objects

Test plan

  • Add unit tests for uniqueId (3 tests)
  • Add unit tests for isEmpty (12 tests)
  • All 15 tests pass
  • pnpm type-check:tsgo passes
  • pnpm lint passes

Fixes #30245

**Original Pull Request:** https://github.com/langgenius/dify/pull/30397 **State:** closed **Merged:** No --- ## Summary - Replace `uniqueId` from es-toolkit/compat with native implementation - Replace `isEmpty` from es-toolkit/compat with native implementation - Add utility functions in `web/utils/toolkit-helpers.ts` ## Changes - `uniqueId`: simple counter-based ID generator - `isEmpty`: checks null, arrays, strings, Maps, Sets, objects ## Test plan - [x] Add unit tests for `uniqueId` (3 tests) - [x] Add unit tests for `isEmpty` (12 tests) - [x] All 15 tests pass - [x] `pnpm type-check:tsgo` passes - [x] `pnpm lint` passes Fixes #30245
yindo added the pull-request label 2026-02-21 20:52:06 -05:00
yindo closed this issue 2026-02-21 20:52:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32801