Skip to content

fix(clerk-js,shared): drop hasMaximumLifetime - #10364

Merged
swolfand merged 1 commit into
mainfrom
sam/drop-has-maximum-lifetime
Oct 22, 2026
Merged

swolfand merged 1 commit into
mainfrom
sam/drop-has-maximum-lifetime

Conversation

@swolfand

Copy link
Copy Markdown
Contributor

Description

Remove the unreleased hasMaximumLifetime property added in #9871 before the pending release in #10347 ships it. The getter is removed from Session and SessionWithActivities, and the optional property and its JSDoc are removed from SessionResource and SessionWithActivitiesResource.

The session deadline fix from #9871 stays: expireAt and abandonAt on Session and SessionWithActivities remain at Unix epoch zero for sessions without a maximum lifetime, instead of falling back to the current time. Tests now assert the zero deadline directly through loading and the snapshot round trip.

This edits the existing .changeset/native-session-lifetime.md in place rather than adding a second changeset, so #10347 picks up the change. It is now a patch for @clerk/clerk-js and @clerk/shared (the expireAt/abandonAt JSDoc in shared still changes) describing only the deadline fix.

Part of MOBILE-517.

Checklist

  • pnpm test runs as expected. @clerk/shared, @clerk/clerk-js, and @clerk/expo unit tests passed; full monorepo suite not run.
  • pnpm build runs as expected. @clerk/shared, @clerk/clerk-js, and @clerk/expo builds passed; full monorepo build not run.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Remove the unreleased hasMaximumLifetime property from Session, SessionWithActivities and their resource types. Session expireAt and abandonAt still stay at Unix epoch zero for sessions without a maximum lifetime. The existing changeset becomes a patch describing that fix.

Part of MOBILE-517
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Oct 22, 2026 6:13pm UTC
swingset Ready Ready Preview Oct 22, 2026 6:13pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 03aa38c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 23 packages
Name Type
@clerk/clerk-js Patch
@clerk/shared Patch
@clerk/chrome-extension Patch
@clerk/electron Patch
@clerk/expo Patch
@clerk/mosaic Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/localizations Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/react Patch
@clerk/swingset Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/ui Patch
@clerk/vue Patch

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: clerk/javascript
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: dbde9d5
  • Layers: Repository YAML (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 8caf63c5-e584-40f8-943d-6db645793385
📥 Commits

Reviewing files that changed from the base of the PR and between dbde9d5 and 03aa38c.

📒 Files selected for processing: 6
  • .changeset/native-session-lifetime.md
  • packages/clerk-js/src/core/resources/Session.ts
  • packages/clerk-js/src/core/resources/SessionWithActivities.ts
  • packages/clerk-js/src/core/resources/__tests__/Client.test.ts
  • packages/clerk-js/src/core/resources/__tests__/Session.test.ts
  • packages/shared/src/types/session.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

💤 Files with no reviewable changes: 4
  • packages/clerk-js/src/core/resources/Session.ts
  • packages/clerk-js/src/core/resources/SessionWithActivities.ts
  • packages/shared/src/types/session.ts
  • packages/clerk-js/src/core/resources/tests/Client.test.ts

Included review availability: This review used your included allowance. 7 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.

📝 Walkthrough

This change removes hasMaximumLifetime from session resource types and session classes. Tests now check deadline values for restored and activities-backed sessions instead of checking the removed property. The changeset description and release types are also updated.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Possibly related PRs

  • clerk/javascript#9871: Introduced the zero-deadline behavior and hasMaximumLifetime property that this change removes.

Suggested reviewers: nikosdouvlis

Merge Risk: ⚪ Minimal · up to 03aa3

The session API cleanup and deadline behavior update are ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description directly explains the removal of hasMaximumLifetime, the retained session deadline behavior, the test updates, and the changeset update.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the main change: removing the unreleased hasMaximumLifetime API from @clerk/clerk-js and @clerk/shared.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

Comment @coderabbitai help to get the list of available commands.

✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR

@pkg-pr-new

pkg-pr-new Bot commented Oct 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10364

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10364

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10364

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10364

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10364

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10364

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10364

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10364

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10364

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10364

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10364

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10364

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10364

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10364

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10364

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10364

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10364

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10364

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10364

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10364

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10364

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10364

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10364

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10364

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10364

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10364

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10364

commit: 03aa38c

@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-10-22T18:15:17.551Z

Summary

Metric Count
Packages analyzed 20
Packages with changes 1
🔴 Breaking changes 2
🟡 Non-breaking changes 0
🟢 Additions 0

Warning
2 breaking change(s) detected - Major version bump required

🤖 This report was reviewed by claude-sonnet-4-6.

🔴 Breaking changes index (2)

Every breaking change, up front. Full diffs are in the package sections below.

Package Subpath Change
@clerk/shared ./types SessionResource.hasMaximumLifetime
@clerk/shared ./types SessionWithActivitiesResource.hasMaximumLifetime

@clerk/shared

Current version: 4.41.0
Recommended bump: MAJOR → 5.0.0

Subpath ./types

🔴 Breaking Changes (2)

Changed: SessionResource.hasMaximumLifetime
- readonly hasMaximumLifetime?: boolean;

Static analyzer: Removed property SessionResource.hasMaximumLifetime

🤖 AI review (confirmed) (90%): The optional property hasMaximumLifetime was removed from SessionResource, so any consumer code that reads session.hasMaximumLifetime will no longer type-check against the interface.

Migration: Remove any references to hasMaximumLifetime on SessionResource instances, or use a runtime check with optional chaining if the value may still exist at runtime.

Changed: SessionWithActivitiesResource.hasMaximumLifetime
- readonly hasMaximumLifetime?: boolean;

Static analyzer: Removed property SessionWithActivitiesResource.hasMaximumLifetime

🤖 AI review (confirmed) (90%): The optional property hasMaximumLifetime was removed from SessionWithActivitiesResource, so any consumer code that reads this property will no longer type-check.

Migration: Remove any references to hasMaximumLifetime on SessionWithActivitiesResource instances, or use a runtime check with optional chaining if the value may still exist at runtime.


Report generated by Break Check

Last ran on 03aa38c.

@swolfand swolfand changed the title fix(clerk-js,shared): drop hasMaximumLifetime before release fix(clerk-js,shared): drop hasMaximumLifetime Oct 22, 2026
@swolfand swolfand changed the title fix(clerk-js,shared): drop hasMaximumLifetime fix(clerk-js,shared): drop hasMaximumLifetime Oct 22, 2026
@swolfand
swolfand enabled auto-merge (squash) October 22, 2026 18:33
@swolfand
swolfand merged commit 9bd5071 into main Oct 22, 2026
155 of 163 checks passed
@swolfand
swolfand deleted the sam/drop-has-maximum-lifetime branch October 22, 2026 21:52

This branch was successfully deployed

2 active deployments
Preview – swingset — 03aa38ce Deployed Oct 22, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 03aa38ce Deployed Oct 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants