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 to 7.0 / mdx2-csf structure #19

Merged
merged 5 commits into from
Jan 25, 2023
Merged

Conversation

shilman
Copy link
Member

@shilman shilman commented Jan 23, 2023

Issue: storybookjs/storybook#20145

What Changed

When mdx1-csf was created, it was designed to be interchangeable with mdx2-csf, which provided experimental MDX2 support in Storybook 6.5.

Then, in Storybook 7.0, we evolved mdx2-csf in a variety of ways:

  • Pre-bundled with tsup
  • Adds JSX compilation built-into the compiler
  • Adding 'stories-mdx' tags to compiled stories
  • More minor tweaks

The plan was to abandon mdx1-csf, because MDX1 is now legacy. However, due to MDX1 => 2 upgrade pains, we decided to add opt-in transitional MDX1 support for people who are upgrading to SB7 and want a stopgap to view working MDX1 before going through the MDX2 upgrade process. See storybookjs/storybook#20145

This PR adopts the latest mdx2-csf structure and improvements and applies them to mdx1-csf. It corresponds to storybookjs/storybook#20747 in the monorepo.

How to test

See storybookjs/storybook#20747

Change Type

  • maintenance
  • documentation
  • patch
  • minor
  • major
📦 Published PR as canary version: 0.0.5--canary.19.89e7fd1.0

✨ Test out this PR locally via:

npm install @storybook/[email protected]
# or 
yarn add @storybook/[email protected]

Version

Published prerelease version: v1.0.0-next.0

Changelog

💥 Breaking Change

🐛 Bug Fix

Authors: 2

@socket-security
Copy link

Socket Security Pull Request Report

Dependency issues detected. If you merge this pull request, you will not be alerted to the instances of these issues again.

📜 Install scripts

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Package Script field Source
[email protected] (added) postinstall package.json via [email protected]
[email protected] (added) postinstall package.json via @storybook/[email protected], @storybook/[email protected]
😵‍💫 Bin script confusion

This package has multiple bin scripts with the same name. This can cause non-deterministic behavior when installing or could be a sign of a supply chain attack

Consider removing one of the conflicting packages. Packages should only export bin scripts with their name

Package Bin script Source
@storybook/[email protected] (added) sb package.json via [email protected]
[email protected] (added) sb package.json
Pull request report summary
Issue Status
Install scripts ⚠️ 2 issues
Native code ✅ 0 issues
Bin script confusion ⚠️ 2 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues
Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore [email protected] [email protected]

Powered by socket.dev

@shilman shilman mentioned this pull request Jan 25, 2023
5 tasks
@shilman shilman changed the title WIP: Use mdx2-csf structure Update to 7.0 / mdx2-csf structure Jan 25, 2023
@shilman shilman added the major Increment the major version when merged label Jan 25, 2023
@shilman shilman merged commit d58cb03 into next Jan 25, 2023
@shilman shilman deleted the shilman/use-mdx2-structure branch January 25, 2023 15:39
@github-actions github-actions bot mentioned this pull request Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major Increment the major version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants