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

Upgrade mdx to v3 #13

Merged
merged 8 commits into from
Dec 29, 2023
Merged

Upgrade mdx to v3 #13

merged 8 commits into from
Dec 29, 2023

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Dec 21, 2023

Issue: #

What Changed

This PR upgrades @mdx/mdx-js to v3. It also upgrades yarn from v1 to v4, as well as replaces Jest with Vitest.
There was an issue with mapped imports introduced in a new version of vfile (dependency of mdx) which caused this in the test run:

Cannot find module 'vfile/do-not-use-conditional-minpath' from 'node_modules/vfile/lib/index.js'

Vitest was able to identify these imports without issues. I don't know whether this could cause problems in a Webpack project, I'll have to check with a canary release of Storybook using this canary release.

How to test

Change Type

  • maintenance
  • documentation
  • patch
  • minor
  • major
📦 Published PR as canary version: 0.1.1--canary.13.0f9c1e4.0

✨ Test out this PR locally via:

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

Version

Published prerelease version: v0.1.1-next.2

Changelog

💥 Breaking Change

⚠️ Pushed to next

Authors: 2

@yannbf yannbf added the minor Increment the minor version when merged label Dec 21, 2023
Copy link

socket-security bot commented Dec 21, 2023

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

Packages Version New capabilities Transitives Size Publisher
@types/babel__traverse 7.20.4 None +3 2.58 MB types
vitest 1.1.0 network, filesystem, shell, environment +89 271 MB oreanno
husky 7.0.4...8.0.3 None +0/-0 6.44 kB typicode
@babel/preset-typescript 7.16.7...7.23.3 shell +49/-60 11 MB nicolo-ribaudo
@babel/preset-env 7.16.11...7.23.6 shell +122/-148 14.1 MB nicolo-ribaudo
@types/lodash 4.14.182...4.14.202 None +0/-0 862 kB types
@babel/types 7.14.8...7.23.6 None +2/-1 2.49 MB nicolo-ribaudo
@babel/core 7.14.3...7.23.6 shell +37/-46 10.5 MB nicolo-ribaudo
@babel/traverse 7.14.8...7.23.6 None +18/-18 6.04 MB nicolo-ribaudo
tsup 6.5.0...8.0.1 shell +94/-55 302 MB egoist
@types/node 16.4.1...18.19.3 None +1/-0 3.9 MB types
@babel/parser 7.14.5...7.23.6 None +0/-0 1.89 MB nicolo-ribaudo
estree-to-babel 4.9.0...9.0.0 None +1/-19 2.37 MB coderaiser
@mdx-js/mdx 2.0.0...3.0.0 None +94/-98 4.14 MB wooorm
hast-util-to-estree 2.0.2...3.1.0 None +59/-57 1.88 MB wooorm
lint-staged 12.3.4...15.2.0 None +37/-41 2.27 MB okonet
concurrently 7.0.0...8.2.2 None +6/-19 11.6 MB gustavohenke
prettier 2.3.1...3.1.1 None +0/-0 8.42 MB prettier-bot
typescript 4.3.2...5.3.3 None +0/-0 32 MB typescript-bot
auto 10.29.2...11.0.4 None +81/-73 50.8 MB alisowski

🚮 Removed packages: @babel/[email protected], @jest/[email protected], @types/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]

Copy link

socket-security bot commented Dec 21, 2023

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Issue Package Version Note Source
New author supports-hyperlinks 2.3.0
New author hasown 2.0.0
New author source-map 0.7.4
New author nopt 7.2.0
New author pathval 1.1.1
New author convert-source-map 2.0.0
New author @esbuild/aix-ppc64 0.19.10
New author loupe 2.3.7
New author check-error 1.0.3
New author get-stream 8.0.1
Shell access foreground-child 3.1.1
Shell access node-gyp 10.0.1
Shell access tinypool 0.8.1
Shell access update-browserslist-db 1.0.13
Shell access vite 5.0.10

Next steps

What is new author?

A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.

Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

What is shell access?

This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.

Packages should avoid accessing the shell which can reduce portability, and make it easier for malicious shell access to be introduced.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

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] bar@* or ignore all packages with @SocketSecurity ignore-all

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. But I think this should be a major change, just in case.

@yannbf yannbf added major Increment the major version when merged and removed minor Increment the minor version when merged labels Dec 27, 2023
@yannbf yannbf force-pushed the yann/upgrade-mdx branch 2 times, most recently from 337e14c to cff7cf3 Compare December 28, 2023 21:41
package.json Outdated
Comment on lines 36 to 41
"@babel/core": "^7.12.3",
"@babel/parser": "^7.12.11",
"@babel/preset-env": "^7.12.1",
"@babel/preset-typescript": "^7.13.0",
"@babel/traverse": "^7.12.11",
"@babel/types": "^7.14.8",
Copy link
Contributor

@valentinpalkovic valentinpalkovic Dec 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are doing a major release, let's also update all babel dependencies.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing! They only upgraded in minor though

@yannbf yannbf merged commit e189422 into next Dec 29, 2023
4 checks passed
@yannbf yannbf deleted the yann/upgrade-mdx branch December 29, 2023 14:06
@yannbf yannbf mentioned this pull request Dec 29, 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.

3 participants