Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency sanity to ^3.57.0 #352

Merged
merged 1 commit into from
Sep 3, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 3, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
sanity (source) ^3.56.0 -> ^3.57.0 age adoption passing confidence

Release Notes

sanity-io/sanity (sanity)

v3.57.0

Compare Source

✨ Highlights

Significant rendering perf. improvements (up to x10) in dev mode

This change enables styled-components "speedy mode" in sanity dev, improving developer mode performance. This change impacts only development builds (sanity dev) – production builds (sanity build or sanity start) remain unaffected since "speedy mode" has always been enabled in production.

Developers embedding Sanity Studio in other frameworks like Next.js or Remix need to adjust their own build tooling to declare the SC_DISABLE_SPEEDY flag to achieve the same performance benefits. For example, Next.js users can add this snippet to their next.config.{js,mjs,ts} file:

export default {
  env: {
    SC_DISABLE_SPEEDY: 'false' // makes styled-components as fast in dev mode as it is in production mode
  }
}

For Safari users, while they will still be able to inspect and see CSS rules coming from styled-components, these will now be read-only in the DevTools inspector. The performance benefits from enabling "speedy mode" in development mode are significant for Safari users and outweigh the convenience of being able to edit these rules directly in the inspector. With Hot Module Reload, developers can still quickly make changes to their source code, and the new styles will apply immediately.

Enabling "speedy mode" offers a faster development experience across the board. Developers using Safari for testing purposes can still verify the functionality of the studio, and for more detailed CSS editing, they can switch to Chrome, Firefox, or other Chromium-based browsers like Arc or Brave.

It's still possible to restore the old behaviour of disabling speedy in dev mode in userland with a custom sanity.cli.ts override:

import {defineCliConfig} from 'sanity/cli'
import {type UserConfig} from 'vite'

export default defineCliConfig({
  vite(viteConfig: UserConfig): UserConfig {
    return {
      ...viteConfig,
      define: {
        ...viteConfig.define,
        // `sanity dev` enables speedy in both development and production, this line restores the default `styled-components` behaviour of only enabling it in production
        'process.env.SC_DISABLE_SPEEDY': JSON.stringify(process.env.NODE_ENV !== 'production'),
      },
    }
  },
})

add --max-fetch-concurrency to prevent stalled validators

This update addresses an issue where the sanity documents validate CLI command could time out when validating documents with complex custom validation rules. The changes include:

  1. Increased default maximum fetch concurrency from 10 to 25, which should resolve most timeout issues.
  2. Added a new CLI flag --max-fetch-concurrency to allow users to adjust the maximum number of concurrent client.fetch requests during validation.
  3. Made the default maximum custom validation concurrency explicit and configurable.

Usage:

sanity documents validate --max-fetch-concurrency <number>

These changes should improve the performance and reliability of document validation for projects with complex custom validation rules. Users experiencing timeouts during validation should try increasing the --max-fetch-concurrency value if issues persist with the new default.

Install or upgrade Sanity Studio

To initiate a new Sanity Studio project or upgrade an existing one, please refer to our comprehensive guide on Installing and Upgrading Sanity Studio.

If you are updating from a version earlier than 3.37.0, you should also check out this article to ensure your dependencies are up to date.

📓 Full changelog

Author | Message | Commit
------------ | ------------- | -------------
Rico Kahler | feat(cli): allow setting --max-fetch-concurrency to prevent stalled validators (#​7450)| 85b0538
Jordan Lawrence | chore(core): improvements to diff component styles and presentation (#​7385) | 35b6600
Jordan Lawrence | fix(structure): passing from operation context to label for success toast (#​7437) | f4e414c
Cody Olsen | fix: significantly speed up styled-components in dev mode (#​7440) | c259119
Jordan Lawrence | test: improved context mocking on TestProvider (#​7433) | 58863af
Jordan Lawrence | chore(core): single addon dataset context (#​7432) | 9da634e
Jordan Lawrence | chore: improved data testing by ui and test id (#​7428) | deca138
RitaDias | test(sanity): skip toolbar test (#​7446) | 713c3f9
renovate[bot] | chore(lockfile): update dependency styled-components to v6.1.13 (#​7443) | 7395a93
renovate[bot] | chore(deps): update dependency styled-components to ^6.1.13 (#​7442) | c5a4207
renovate[bot] | fix(deps): update dependency @​portabletext/editor to ^1.0.19 (#​7405) | 5ebff0d


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

vercel bot commented Sep 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dfweb-v4 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 3, 2024 8:03pm

Copy link

sonarqubecloud bot commented Sep 3, 2024

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.76%. Comparing base (57d9369) to head (1f069dc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #352   +/-   ##
=======================================
  Coverage   98.76%   98.76%           
=======================================
  Files          25       25           
  Lines         243      243           
  Branches       71       71           
=======================================
  Hits          240      240           
  Misses          3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@w3bdesign w3bdesign merged commit 99e485b into main Sep 3, 2024
7 checks passed
@renovate renovate bot deleted the renovate/sanity-monorepo branch September 3, 2024 20:16
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.

2 participants