npm / npm-to-yarn
npm-to-yarn
What changed in npm-to-yarn 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
38 breaking6 deprecations11 new APIs and options11 behavior and defaults5 tooling1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initnpm-to-yarn 336 changes
Breaking changes 21
The MDX parser now follows CommonMark emphasis rules more strictly, changing how emphasis markers next to spaces or punctuation are parsed.
Docs-related theme components were significantly refactored, so existing swizzled component customizations may break.
The official TypeScript config package replaces @tsconfig/docusaurus; extend @docusaurus/tsconfig in tsconfig.json.
The node-emoji upgrade adds many emojis and removes old shortcode names that are no longer valid on GitHub.
The blog RSS feed is limited to its last 20 entries by default; set limit to false for an unlimited feed.
This dependency is no longer necessary in Docusaurus v3 and can be removed if nothing else uses it.
MDX no longer transforms indented text into code blocks; use regular fenced code block syntax instead.
Docusaurus v3 parses directives; unhandled directives are ignored instead of being rendered in their original form.
This compatibility option allows the Docusaurus v2 explicit heading ID syntax, which is otherwise invalid MDX; the notes recommend keeping it enabled for now.
MDX v3 compiles Markdown more strictly, so some content that compiled under Docusaurus v2 may fail or render differently.
Custom mappings are sandboxed: native Markdown mappings apply to Markdown syntax, and lower-cased custom element names are no longer substituted.
Docusaurus v3 requires Node.js 18.0 or later; Node.js 16 is no longer supported.
Docusaurus v3 requires React 18.0 or later.
Use rehype-katex 7 with Docusaurus v3 and MDX v3; other versions are not guaranteed to work.
Use remark-math 6 with Docusaurus v3 and MDX v3; other versions are not guaranteed to work.
Official Unified, Remark, and Rehype packages are ES Modules only, so CommonJS require() no longer works for them.
Fewer languages are included by default, so configure additional languages to keep highlighting them.
Import themes from the themes export of prism-react-renderer instead of importing theme paths directly.
Docusaurus v3 uses TypeScript 5.1 or later.
Docusaurus v3 requires TypeScript 5.1 or newer.
Versioned sidebar entries no longer support the versioned prefix; remove it from sidebar paths.
Deprecations 2
The caution admonition is deprecated; refactor it to :::warning or :::danger.
This compatibility option allows HTML comments in MDX; the notes recommend replacing them with MDX comments before turning it off.
New APIs and options 4
Deno support was added to npm-to-yarn.
Docusaurus v3 supports ES Module configuration files, allowing Remark plugins to be imported directly.
Docusaurus v3 supports ESM and TypeScript config files.
This compatibility option allows the Docusaurus v2 admonition title syntax; the new directive label syntax uses square brackets.
Behavior and default changes 5
The default blog truncate marker now accepts both the HTML comment marker and the MDX comment marker.
Docusaurus switches config loading from import-fresh to jiti; existing config files should keep working, but subtle behavior changes could occur.
Use the .mdx extension for Markdown files containing JSX, imports, or exports; future versions will parse .md files as CommonMark.
Docusaurus support for React 18 features such as Suspense, React.lazy(), and startTransition is experimental and may have different runtime behavior in the future.
The automatic JSX runtime means JSX files no longer need to import React when they do not use a React API.
Tooling 3
The demo site now shows Bun conversion.
The official TypeScript configuration package replaces the external @tsconfig/docusaurus package for TypeScript users.
Runs a best-effort check that lists files with compilation errors under MDX v3.
Fixes and other changes 1
The warning admonition is officially supported and now has the correct color and icon; it renders yellow instead of the historical red.
npm-to-yarn 236 changes
Breaking changes 17
Build artifacts now go in
website/buildrather thanwebsite/build/<PROJECT_NAME>, so deployment configuration must read from the updated directory.Nested sidebar categories are supported; migrate the old
subcategorytype tocategoryand useitemsin place ofids.GitHub Pages no longer generates the
CNAMEfile; create it at/static/CNAMEto use a custom domain.The field is available as
docsPluginOptions.sidebarCollapsible, and sidebar collapsing is enabled by default.CLI commands are now invoked as
docusaurus <command>instead of usingdocusaurus-commandcommand names.Use the scoped package name @docusaurus/core in place of docusaurus for Docusaurus 2.
Add this preset dependency to provide the default doc site functionalities and bundle essential plugins.
The Docusaurus 2 site structure uses docusaurus.config.js in place of the Docusaurus 1 siteConfig.js.
Pass
editUrlas a docs option to the classic preset, and point it to the Docusaurus project rather than the docs directory.Pages must apply the theme layout around each page, with metadata passed as props.
Markdown syntax now uses MDX; tags must be valid JSX, including explicitly closed tags such as
<img/>and<br/>.Docusaurus 2 generates a single-page application and loads React in the browser, unlike Docusaurus 1.
Move Docusaurus 1
pages/enfiles tosrc/pages.MDX style attributes must use JSX style objects, such as
style={{background: 'black'}}, rather than string values.Use the <Translate> component with id and description props instead of the v1 <translate> component.
Use this hook to get the
siteConfigobject in pages instead of receiving it as props.Versioned sidebar references use
version-${version}/${id}rather thanversion-${version}-${original_id}.
Deprecations 4
Use the
authorsfield to provide author profile images instead of the deprecatedauthorFBIDandauthorTwitterfields.This field is deprecated; pass the page count as the
postsPerPageblog option in the classic preset.The
cnamefield is deprecated; create aCNAMEfile in thestaticfolder for a custom domain.The
colorsconfiguration field is deprecated; customize Infima CSS variables in a CSS file and import it through the classic preset.
New APIs and options 7
Add --mdx to convert Markdown to MDX automatically during migration; the migration is still a work in progress.
Add --page to migrate pages automatically; the migration is still a work in progress.
Code translations are added to i18n/[locale]/code.json in Chrome i18n JSON format.
Configure the classic preset in
docusaurus.config.jsto bundle essential plugins such as blog, docs, and pages.Docs can declare
slug: installation.htmlin front matter to keep the.htmlextension as the canonical URL.Configure theme-managed site metadata, assets, navbar, footer, and search settings through
themeConfig.Localized content is generally found under website/i18n/[locale], with each plugin managing translations in its own i18n subfolder.
Behavior and default changes 6
The blog RSS feed is now served at
/blog/rss.xmlinstead of/blog/feed.xml; redirects may preserve existing subscriptions.Clean URLs are now used by default;
/installationis canonical rather than/installation.html.Migration does not change the /docs folder location, and Docusaurus 2 lets you place it anywhere.
Each documentation version is an independent snapshot, so populate missing versioned documents and sidebars instead of relying on fallback functionality.
Versioned document front matter keeps the original id instead of prefixing it with the version; the version is applied internally.
Docusaurus 2 can be used to build websites beyond documentation sites, including blogs and product landing pages.
Tooling 2
A migration CLI handles many parts of moving an existing Docusaurus 1 site to Docusaurus 2; remaining steps require manual migration.
Use
yarn deployfor GitHub Pages instead of theyarn publish-gh-pagesscript.