@storybook/addon-viewport is a valuable Storybook addon that empowers developers to simulate various screen sizes, particularly mobile devices, directly within the Storybook environment. This allows for focused testing and development of responsive components and layouts, ensuring a consistent user experience across different devices. Comparing versions 6.1.10 and 6.1.9, the core functionality remains consistent, as both provide the ability to adjust the viewport size and preview components in different simulated environments.
The key difference lies in the internal dependencies. Version 6.1.10 updates the internal "@storybook" packages it relies on (api, addons, theming, components, core-events, and client-logger) to version 6.1.10. The previous version (6.1.9) used version 6.1.9 of these packages. This likely includes bug fixes, performance improvements, and feature enhancements within Storybook's core functionalities. While these changes might not be immediately apparent at the surface level, they contribute to a more stable and performant Storybook experience.
Developers using @storybook/addon-viewport should generally upgrade to the latest version (6.1.10 in this case) to benefit from these underlying improvements and bug resolutions within the broader Storybook ecosystem. Both versions share the MIT license and the same peer dependencies for React and React DOM, ensuring compatibility with common React setups. The small difference in unpacked size (28545 vs 28538) suggests minor code adjustments. By using this addon, developers can ensure their components look and behave as expected on various devices, leading to a better overall user experience.
All the vulnerabilities related to the version 6.1.10 of the package
Cross site scripting in markdown-to-jsx
Versions of the package markdown-to-jsx before 7.4.0 are vulnerable to Cross-site Scripting (XSS) via the src property due to improper input sanitization. An attacker can execute arbitrary code by injecting a malicious iframe element in the markdown.