Skip to content

Conversation

@rdunk
Copy link
Member

@rdunk rdunk commented Nov 27, 2025

Description

This PR updates the @sanity/image-url dependency from version 1.2.0 to 2.0.1 across the codebase. The update requires changing import statements and function calls to match the new API.

What to review

  • Updated import statements from import imageUrlBuilder from '@sanity/image-url' to import {createImageUrlBuilder} from '@sanity/image-url'
  • Updated function calls from imageUrlBuilder(client) to createImageUrlBuilder(client)
  • Updated the types.ts file that previously defined the ImageUrlBuilder type, it's now re-exported directly from the package
  • Updated type imports to use the exported ImageUrlBuilder type from the package

Testing

No functional changes to test. All image rendering functionality should continue to work as expected and all existing tests should pass.

Notes for release

N/A

@vercel
Copy link

vercel bot commented Nov 27, 2025

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

Project Deployment Preview Comments Updated (UTC)
page-building-studio Ready Ready Preview Comment Nov 28, 2025 3:30pm
test-studio Ready Ready Preview Comment Nov 28, 2025 3:30pm
3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
e2e-studio Ignored Ignored Nov 28, 2025 3:30pm
studio-workshop Ignored Ignored Preview Nov 28, 2025 3:30pm
test-next-studio Ignored Ignored Nov 28, 2025 3:30pm

@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

🧪 E2E Preview environment

🔑 Environment Variables for Local Testing

This is the preview URL for the E2E tests: https://e2e-studio-m89mgv647.sanity.dev

To run the E2E tests locally, you can use the following environment variables, then run pnpm test:e2e --ui to open the Playwright test runner.

💬 Remember to build the project first with pnpm build:e2e.

  SANITY_E2E_PROJECT_ID=ittbm412
  SANITY_E2E_BASE_URL=https://e2e-studio-m89mgv647.sanity.dev
  SANITY_E2E_DATASET="update depending the project you want to test (pr-11315-chromium-19767932852 || pr-11315-firefox-19767932852 )"
  SANITY_E2E_DATASET_CHROMIUM=pr-11315-chromium-19767932852
  SANITY_E2E_DATASET_FIREFOX=pr-11315-firefox-19767932852

@github-actions
Copy link
Contributor

🧪 E2E Preview environment

Waiting for preview deployment to finish…

@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

📊 Playwright Test Report

Download Full E2E Report

This report contains test results, including videos of failing tests.

@github-actions
Copy link
Contributor

📊 Playwright Test Report

Waiting for E2E tests to finish…

Copy link
Member Author

rdunk commented Nov 27, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@rdunk rdunk marked this pull request as ready for review November 27, 2025 16:19
@rdunk rdunk requested a review from a team as a code owner November 27, 2025 16:19
@rdunk rdunk requested review from jordanl17 and removed request for a team November 27, 2025 16:19
@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

⚡️ Editor Performance Report

Updated Fri, 28 Nov 2025 16:03:29 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 27.8 efps (36ms) 27.4 efps (37ms) +1ms (+1.4%)
article (body) 36.8 efps (27ms) 40.2 efps (25ms) -2ms (-8.5%)
article (string inside object) 28.6 efps (35ms) 29.4 efps (34ms) -1ms (-2.9%)
article (string inside array) 26.3 efps (38ms) 26.3 efps (38ms) +0ms (-/-%)
recipe (name) 43.5 efps (23ms) 45.5 efps (22ms) -1ms (-4.3%)
recipe (description) 62.5 efps (16ms) 64.5 efps (16ms) -1ms (-3.1%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (8ms) +2ms (-/-%)
singleString (stringField) 58.8 efps (17ms) 58.8 efps (17ms) +0ms (-/-%)
synthetic (title) 16.9 efps (59ms) 17.2 efps (58ms) -1ms (-1.7%)
synthetic (string inside object) 17.9 efps (56ms) 17.9 efps (56ms) +0ms (-/-%)

efps — editor "frames per second". The number of updates assumed to be possible within a second.

Derived from input latency. efps = 1000 / input_latency

Detailed information

🏠 Reference result

The performance result of sanity@latest

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 36ms 40ms 52ms 75ms 19ms 9.3s
article (body) 27ms 34ms 68ms 117ms 126ms 6.1s
article (string inside object) 35ms 38ms 45ms 94ms 14ms 5.7s
article (string inside array) 38ms 42ms 50ms 80ms 1ms 6.0s
recipe (name) 23ms 26ms 29ms 63ms 1ms 6.7s
recipe (description) 16ms 19ms 20ms 48ms 0ms 4.3s
recipe (instructions) 6ms 10ms 11ms 14ms 0ms 3.0s
singleString (stringField) 17ms 19ms 22ms 40ms 0ms 5.8s
synthetic (title) 59ms 61ms 63ms 74ms 278ms 14.5s
synthetic (string inside object) 56ms 63ms 115ms 280ms 634ms 7.9s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 37ms 43ms 52ms 100ms 42ms 9.7s
article (body) 25ms 30ms 45ms 121ms 73ms 5.7s
article (string inside object) 34ms 37ms 44ms 100ms 20ms 5.6s
article (string inside array) 38ms 42ms 76ms 139ms 128ms 6.2s
recipe (name) 22ms 24ms 29ms 60ms 0ms 6.5s
recipe (description) 16ms 19ms 24ms 35ms 0ms 4.1s
recipe (instructions) 8ms 11ms 11ms 13ms 0ms 3.1s
singleString (stringField) 17ms 19ms 21ms 33ms 0ms 6.1s
synthetic (title) 58ms 64ms 108ms 125ms 408ms 14.9s
synthetic (string inside object) 56ms 59ms 110ms 268ms 549ms 7.9s

📚 Glossary

column definitions

  • benchmark — the name of the test, e.g. "article", followed by the label of the field being measured, e.g. "(title)".
  • latency — the time between when a key was pressed and when it was rendered. derived from a set of samples. the median (p50) is shown to show the most common latency.
  • p75 — the 75th percentile of the input latency in the test run. 75% of the sampled inputs in this benchmark were processed faster than this value. this provides insight into the upper range of typical performance.
  • p90 — the 90th percentile of the input latency in the test run. 90% of the sampled inputs were faster than this. this metric helps identify slower interactions that occurred less frequently during the benchmark.
  • p99 — the 99th percentile of the input latency in the test run. only 1% of sampled inputs were slower than this. this represents the worst-case scenarios encountered during the benchmark, useful for identifying potential performance outliers.
  • blocking time — the total time during which the main thread was blocked, preventing user input and UI updates. this metric helps identify performance bottlenecks that may cause the interface to feel unresponsive.
  • test duration — how long the test run took to complete.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.45% 63925 / 143797
🔵 Statements 44.45% 63925 / 143797
🔵 Functions 48.31% 3411 / 7060
🔵 Branches 79.26% 12959 / 16348
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/core/components/image/Image.tsx 0% 0% 0% 0% 1-63
packages/sanity/src/core/field/types/image/diff/ImagePreview.tsx 25.51% 100% 0% 25.51% 27-35, 100-181
packages/sanity/src/core/form/inputs/CrossDatasetReferenceInput/CrossDatasetReferencePreview.tsx 56.66% 9.09% 50% 56.66% 51-72, 75-76, 90-96, 102, 106-120
packages/sanity/src/core/form/inputs/GlobalDocumentReferenceInput/GlobalDocumentReferencePreview.tsx 44.08% 9.09% 50% 44.08% 52-76, 79-80, 94-100, 106, 110-124, 128-141
packages/sanity/src/core/form/inputs/files/types.ts 0% 0% 0% 0%
packages/sanity/src/core/form/inputs/files/ImageInput/ImageInputAsset.tsx 8.46% 100% 0% 8.46% 18-224
packages/sanity/src/core/form/inputs/files/ImageInput/ImageInputPreview.tsx 13.88% 100% 0% 13.88% 21-87
packages/sanity/src/core/form/inputs/files/ImageInput/types.ts 0% 0% 0% 0%
packages/sanity/src/core/form/inputs/files/ImageInput/usePreviewImageSource.ts 12% 100% 0% 12% 19-54
packages/sanity/src/core/form/studio/inputs/StudioImageInput.tsx 33.33% 100% 0% 33.33% 30-56
packages/sanity/src/core/preview/components/SanityDefaultPreview.tsx 15.78% 100% 0% 15.78% 23-24, 41-146
packages/sanity/src/core/tasks/components/form/tasksFormBuilder/TasksNotificationTarget.tsx 37.5% 100% 25% 37.5% 30-99, 105-107
Generated in workflow #46720 for commit 9cb6aa7 by the Vitest Coverage Report Action

stipsan
stipsan previously approved these changes Nov 27, 2025
Copy link
Member

@stipsan stipsan left a comment

Choose a reason for hiding this comment

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

Thanks!! 💖

jordanl17
jordanl17 previously approved these changes Nov 28, 2025
@rdunk rdunk force-pushed the 11-27-chore_deps_update_dependency_sanity_image-url_to_2.0.0 branch from 66e91c3 to 4e3e7dc Compare November 28, 2025 15:19
@rdunk rdunk force-pushed the 11-27-chore_deps_update_dependency_sanity_image-url_to_2.0.0 branch from 4e3e7dc to 9cb6aa7 Compare November 28, 2025 15:24
@rdunk rdunk changed the title chore(deps): update dependency @sanity/image-url to ^2.0.0 chore(deps): update dependency @sanity/image-url to ^2.0.1 Nov 28, 2025
@rdunk rdunk enabled auto-merge (squash) November 28, 2025 15:28
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​sanity/​image-url@​2.0.110010010092100

View full report

@rdunk
Copy link
Member Author

rdunk commented Nov 28, 2025

Sorry to re-request the review, had to resolve a lockfile merge conflict.

Lesson learnt: enable auto-merge for PRs in this repo.

@rdunk rdunk requested review from jordanl17 and stipsan November 28, 2025 15:57
@rdunk rdunk merged commit 511b7d8 into main Nov 28, 2025
69 of 70 checks passed
@rdunk rdunk deleted the 11-27-chore_deps_update_dependency_sanity_image-url_to_2.0.0 branch November 28, 2025 15:58
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.

4 participants