Skip to content

Bump markdown-it to ^14#15

Open
ottob wants to merge 1 commit into
RonRadtke:masterfrom
ottob:patch-1
Open

Bump markdown-it to ^14#15
ottob wants to merge 1 commit into
RonRadtke:masterfrom
ottob:patch-1

Conversation

@ottob
Copy link
Copy Markdown

@ottob ottob commented May 27, 2026

current v13 dep uses Node built-in punycode which Metro/RN can't resolve

@ronradtke/react-native-markdown-display@8.1.0 pins markdown-it: ^13.0.1. markdown-it@13 does
require('punycode') expecting Node's built-in punycode module. React Native's Metro runtime
doesn't ship Node built-ins, so bundling fails:

The package at ".../markdown-it@13.0.2/.../markdown-it/lib/index.js"
attempted to import the Node standard library module "punycode".
It failed because the native React runtime does not include the Node standard library.

> 14 | var punycode = require('punycode');

Import stack:
markdown-it/lib/index.js
@ronradtke/react-native-markdown-display/src/index.js

Cause

markdown-it@14.0.0 replaced require('punycode') with the userland punycode.js package as a
declared dep — specifically because Node deprecated the built-in. v14 is API-compatible with v13
for parser consumers (only internals changed).

Suggested fix

Bump the dep:

// package.json
"dependencies": {
"markdown-it": "^14.0.0"
}

Workaround for consumers stuck on the current version: add a Metro resolver alias forcing
markdown-it to a project-level v14 install.

Environment

  • @ronradtke/react-native-markdown-display 8.1.0
  • markdown-it 13.0.2 (transitive)
  • Expo 56 / Metro 0.84 / React Native 0.83
  • bun 1.3.14

current v13 dep uses Node built-in punycode which Metro/RN can't resolve

@ronradtke/react-native-markdown-display@8.1.0 pins markdown-it: ^13.0.1. markdown-it@13 does
  require('punycode') expecting Node's built-in punycode module. React Native's Metro runtime
  doesn't ship Node built-ins, so bundling fails:
  
  The package at ".../markdown-it@13.0.2/.../markdown-it/lib/index.js"
  attempted to import the Node standard library module "punycode".
  It failed because the native React runtime does not include the Node standard library.

    > 14 | var punycode = require('punycode');

  Import stack:
    markdown-it/lib/index.js
    @ronradtke/react-native-markdown-display/src/index.js

  Cause

  markdown-it@14.0.0 replaced require('punycode') with the userland punycode.js package as a
  declared dep — specifically because Node deprecated the built-in. v14 is API-compatible with v13
  for parser consumers (only internals changed).
  
  Suggested fix

  Bump the dep:

  // package.json
  "dependencies": {
    "markdown-it": "^14.0.0"
  }
  
  Workaround for consumers stuck on the current version: add a Metro resolver alias forcing
  markdown-it to a project-level v14 install.

  Environment

  - @ronradtke/react-native-markdown-display 8.1.0
  - markdown-it 13.0.2 (transitive)
  - Expo 56 / Metro 0.84 / React Native 0.83
  - bun 1.3.14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant