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

[Snyk] Upgrade sanity from 3.56.0 to 3.57.0 #120

Closed
wants to merge 1 commit into from

Conversation

mattobee
Copy link
Member

snyk-top-banner

Snyk has created this PR to upgrade sanity from 3.56.0 to 3.57.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 4 versions ahead of your current version.

  • The recommended version was released on 22 days ago.

Release notes
Package name: sanity
  • 3.57.0 - 2024-09-03

    ✨ 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
  • 3.56.1-manifests.41 - 2024-09-04
  • 3.56.1-manifests.39 - 2024-08-29
  • 3.56.1-manifests.37 - 2024-08-29
  • 3.56.0 - 2024-08-27

    ✨ Highlights

    Improved document sync notification

    Fixes an issue where the syncing document notification would sometimes remain on the screen indefinitely, even after the document was no longer visible. The toast is now dismissible, improving the user experience when working with synchronized documents.

    Sync Document Toast

    Copy document URL to clipboard

    A new feature has been added to the document pane, allowing users to easily copy the current document's URL to their clipboard. This makes sharing documents with colleagues and collaborators more convenient.

    Ending the "Array Tree Editing" beta

    Thank you to everyone who participated in the "Array Tree Editing" beta. Based on your feedback, we are ending this experiment as we continue to explore better ways to navigate nested structured.

    🐛 Notable bugfixes

    • Optimized rendering in Presence: We’ve optimized how presence changes are handled, reducing unnecessary re-renders in the Studio. This enhancement improves overall performance when multiple users are working on the same document.
    • Respect for --no-auto-updates flag in CLI: Fixed an issue where the CLI would not respect the --no-auto-updates flag, ensuring that this configuration setting now behaves as expected.
    • Improved feedback when extracting schema: The schema extraction process now outputs the file path, providing clearer feedback and making it easier to locate the saved schema.
    • Constrain size for date picker popover: Added a prop to constrain the size of the date picker popover in the DateTimeInput UI component, providing more control over its appearance, especially in modal contexts.

    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
    Carolina Gonzalez feat(cli): respect --no-auto-updates flag in CLI config (#7396) c83021e
    Pedro Bonamin chore(structure): add DocumentListBuilder.filter JSdoc details (#7402) 445384d
    Pedro Bonamin fix(structure): make sync document toast dismisable (#7209) dc40f6e
    Pedro Bonamin chore(core): end "Array Tree Editing" beta (#7411) 9894c6d
    Rune Botten fix(core): avoid unnecessary re-renders in useDocumentPresence (#7365) 379620e
    Simeon Griggs output path when extracting schema (#7414) 6fdfcac
    RitaDias refactor(sanity): Move date inputs UI Components to ui-components (#7410) 0d1dcd7
    renovate[bot] fix(deps): update dependency @ sanity/icons to ^3.4.0 (#7417) 6bd4f8c
    RitaDias fix(sanity): add prop for constraintSize (#7421) 17a7b1d
    Drew Lyton feat(sanity): add always present document action to copy url to clipboard (#7416) 7afcdb4
    renovate[bot] fix(deps): update dependency groq-js to ^1.13.0 (#7424) 14530aa
    Drew Lyton feat(sanity): Update presence menu button for inviting new collaborators (#7406) 064519a
from sanity GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Snyk has created this PR to upgrade sanity from 3.56.0 to 3.57.0.

See this package in npm:
sanity

See this project in Snyk:
https://app.snyk.io/org/mattobee/project/608ac08e-10ac-4a55-8b70-fa1fe88aafef?utm_source=github&utm_medium=referral&page=upgrade-pr
Copy link

netlify bot commented Sep 25, 2024

Deploy Preview for eventua11y-sanity ready!

Name Link
🔨 Latest commit 6826faa
🔍 Latest deploy log https://app.netlify.com/sites/eventua11y-sanity/deploys/66f3e04db3d7c100084d3574
😎 Deploy Preview https://deploy-preview-120--eventua11y-sanity.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mattobee mattobee closed this Dec 27, 2024
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