Skip to content

chore: migrate atomFamily from jotai/utils to jotai-family#853

Merged
mengxi-ream merged 2 commits intomainfrom
chore/migrate-atomfamily-to-jotai-family
Jan 4, 2026
Merged

chore: migrate atomFamily from jotai/utils to jotai-family#853
mengxi-ream merged 2 commits intomainfrom
chore/migrate-atomfamily-to-jotai-family

Conversation

@mengxi-ream
Copy link
Owner

@mengxi-ream mengxi-ream commented Jan 4, 2026

Type of Changes

  • 📦 Other changes that do not modify src or test files (chore)

Description

The atomFamily utility from jotai/utils is deprecated and will be removed in Jotai v3. This PR migrates to the standalone jotai-family package which has an identical API.

Changes:

  • Added jotai-family@1.0.1 as a dependency
  • Updated import in src/utils/atoms/provider.ts from jotai/utils to jotai-family

Related Issue

N/A - Addresses deprecation warning in console

How Has This Been Tested?

  • Verified through manual testing
  • Type-check passes
  • All 474 tests pass
  • Build succeeds

Checklist

  • I have tested these changes locally
  • I have updated the documentation accordingly if necessary
  • My code follows the code style of this project
  • My changes do not break existing functionality
  • If my code was generated by AI, I have proofread and improved it as necessary.

Additional Information

The jotai-family package is the official replacement for atomFamily from jotai/utils. The API is identical, so this is a drop-in replacement with no behavioral changes.

🤖 Generated with Claude Code


Summary by cubic

Migrated atomFamily from jotai/utils to jotai-family to remove the deprecation warning and prep for Jotai v3. Also added missing peer dependencies to fix import errors from the vercel-minimax AI provider beta packages.

  • Migration

    • Updated atomFamily import in src/utils/atoms/provider.ts to use jotai-family (no behavior change).
  • Dependencies

    • Added jotai-family@1.0.1.
    • Added effect@3.19.14 and @valibot/to-json-schema@1.5.0 to satisfy @ai-sdk/provider-utils beta peer deps.

Written for commit 80b4ce9. Summary will update on new commits.

mengxi-ream and others added 2 commits January 3, 2026 18:35
Add effect and @valibot/to-json-schema as dependencies to resolve
import errors from vercel-minimax-ai-provider's beta @AI-SDK packages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The atomFamily utility from jotai/utils is deprecated and will be removed
in Jotai v3. This migrates to the jotai-family package which has an
identical API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Jan 4, 2026

🦋 Changeset detected

Latest commit: 80b4ce9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@read-frog/extension Patch

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

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 4, 2026
@github-actions github-actions bot added the chore label Jan 4, 2026
@dosubot
Copy link

dosubot bot commented Jan 4, 2026

Related Documentation

Checked 14 published document(s) in 0 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@claude
Copy link

claude bot commented Jan 4, 2026

PR Review: chore: migrate atomFamily from jotai/utils to jotai-family

【Taste Score】

🟢 Good taste

【Core Judgment】

✅ Worth doing: This is a necessary maintenance task addressing a real deprecation warning and preparing for Jotai v3 compatibility.


Summary

This is a clean, minimal migration from the deprecated atomFamily in jotai/utils to the standalone jotai-family package. The change is well-scoped and follows KISS principles.


Code Quality ✅

Strengths:

  • Single-line import change in src/utils/atoms/provider.ts:5 - minimal diff, maximum clarity
  • The jotai-family package is the official replacement with identical API (drop-in replacement)
  • No behavioral changes, only import path update

The change:

-import { atomFamily } from 'jotai/utils'
+import { atomFamily } from 'jotai-family'

This is exactly how a deprecation migration should look.


Dependency Analysis 🔍

Primary change (expected):

  • jotai-family@1.0.1 - The official replacement package ✅

Transitive dependencies (added automatically by pnpm):

  • effect@3.19.14
  • @valibot/to-json-schema@1.5.0
  • valibot@1.2.0
  • pure-rand@6.1.0
  • fast-check@3.23.2

⚠️ Minor concern: These transitive deps appear to come from vercel-minimax-ai-provider beta peer dependencies being resolved differently after the lockfile regeneration. While not harmful, this adds ~6 packages to the dependency tree. The cubic summary correctly notes this is to "satisfy @ai-sdk/provider-utils beta peer deps."

Recommendation: This is acceptable since these are legitimate peer dependencies that were likely already needed but not explicitly resolved. No action required.


Potential Issues ❌

None identified. The migration is straightforward and safe.


Performance Considerations ✅

No performance impact - this is a build-time import change only. The jotai-family package has the same runtime behavior as the original.


Security Concerns ✅

No security concerns:

  • jotai-family is the official Jotai ecosystem package
  • No new APIs or permissions introduced
  • No changes to data handling

Test Coverage ✅

Per the PR description:

  • All 474 tests pass
  • Type-check passes
  • Build succeeds
  • Manual testing verified

This is appropriate coverage for a drop-in replacement with no behavioral changes.


Checklist

  • Follows conventional commit format (chore:)
  • Minimal, focused change
  • No breaking changes
  • Tests pass
  • Addresses a real deprecation warning

Verdict

Approved

This is a clean, necessary migration. Ship it.


🤖 Review by Claude Code

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

@mengxi-ream mengxi-ream merged commit 42f6b2c into main Jan 4, 2026
7 checks passed
@mengxi-ream mengxi-ream deleted the chore/migrate-atomfamily-to-jotai-family branch January 4, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant