sanity-io / sanity-astro

https://www.sanity.io/plugins/sanity-astro
Other
73 stars 11 forks source link

fix: allow integration options to be undefined #213

Closed christianhg closed 3 months ago

christianhg commented 3 months ago

Before this change, passing nothing to sanity() would result in the integration crashing because of the attempt to destructure studioBasePath from undefined. Now, we guard against this scenario be defaulting to {} if no config is passed, and by not using destructuring to pick and omit studioBasePath from the config.

vercel[bot] commented 3 months ago

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

Name Status Preview Comments Updated (UTC)
sanity-astro-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 1:56pm
sanity-astro-example-ssr ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 1:56pm
sanity-astro-movies ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 1:56pm
socket-security[bot] commented 3 months ago

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@astrojs/vercel@7.8.0 Transitive: environment, eval, filesystem, network, shell, unsafe +91 4.3 MB fredkschott
npm/@sanity/client@6.21.3 Transitive: environment, network +30 9.66 MB sanity-io
npm/@sanity/visual-editing@2.1.9 environment +7 6.71 MB sanity-io
npm/astro@4.14.5 Transitive: environment, eval, filesystem, network, shell, unsafe +339 82.3 MB fredkschott, matthewp, natemoo-re
npm/sanity@3.55.0 Transitive: environment, eval, filesystem, network, shell, unsafe +803 207 MB bjoerge
npm/type-fest@4.25.0 None 0 380 kB sindresorhus
npm/vite-plugin-dts@4.0.3 unsafe Transitive: environment, eval, filesystem, shell +91 81 MB qmhc
npm/vite@5.4.2 Transitive: environment, filesystem, network, shell +9 8.26 MB antfu, patak, soda, ...2 more

🚮 Removed packages: npm/@astrojs/vercel@7.6.0), npm/type-fest@4.18.3), npm/vite-plugin-dts@3.9.1)

View full report↗︎