Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-markdown

Package Overview
Dependencies
Maintainers
2
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-markdown - npm Package Compare versions

Comparing version 8.0.4 to 8.0.5

6

lib/ast-to-react.d.ts

@@ -28,3 +28,3 @@ /**

export type Schema = import('property-information').Schema
export type ReactMarkdownProps = import('./complex-types').ReactMarkdownProps
export type ReactMarkdownProps = import('./complex-types.js').ReactMarkdownProps
export type Raw = {

@@ -121,3 +121,3 @@ type: 'raw'

export type Components = Partial<
Omit<import('./complex-types').NormalComponents, keyof SpecialComponents> &
Omit<import('./complex-types.js').NormalComponents, keyof SpecialComponents> &
SpecialComponents

@@ -136,3 +136,3 @@ >

Omit<
import('./complex-types').NormalComponents,
import('./complex-types.js').NormalComponents,
keyof SpecialComponents

@@ -139,0 +139,0 @@ > &

@@ -22,3 +22,3 @@ /**

* @typedef {import('property-information').Schema} Schema
* @typedef {import('./complex-types').ReactMarkdownProps} ReactMarkdownProps
* @typedef {import('./complex-types.js').ReactMarkdownProps} ReactMarkdownProps
*

@@ -91,3 +91,3 @@ * @typedef Raw

*
* @typedef {Partial<Omit<import('./complex-types').NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components
* @typedef {Partial<Omit<import('./complex-types.js').NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components
*

@@ -112,2 +112,3 @@ * @typedef Options

import style from 'style-to-object'
import {uriTransformer} from './uri-transformer.js'

@@ -168,2 +169,6 @@ const own = {}.hasOwnProperty

const options = context.options
const transform =
options.transformLinkUri === undefined
? uriTransformer
: options.transformLinkUri
const parentSchema = context.schema

@@ -241,4 +246,4 @@ /** @type {ReactMarkdownNames} */

if (name === 'a' && options.transformLinkUri) {
properties.href = options.transformLinkUri(
if (name === 'a' && transform) {
properties.href = transform(
String(properties.href || ''),

@@ -245,0 +250,0 @@ node.children,

@@ -9,5 +9,2 @@ /**

export namespace ReactMarkdown {
namespace defaultProps {
export {uriTransformer as transformLinkUri}
}
namespace propTypes {

@@ -64,3 +61,2 @@ const children: PropTypes.Requireable<string>

}
import {uriTransformer} from './uri-transformer.js'
import PropTypes from 'prop-types'

@@ -35,3 +35,2 @@ /**

import rehypeFilter from './rehype-filter.js'
import {uriTransformer} from './uri-transformer.js'
import {childrenToReact} from './ast-to-react.js'

@@ -45,3 +44,3 @@

const deprecated = {
plugins: {to: 'plugins', id: 'change-plugins-to-remarkplugins'},
plugins: {to: 'remarkPlugins', id: 'change-plugins-to-remarkplugins'},
renderers: {to: 'components', id: 'change-renderers-to-components'},

@@ -129,4 +128,2 @@ astPlugins: {id: 'remove-buggy-html-in-markdown-parser'},

ReactMarkdown.defaultProps = {transformLinkUri: uriTransformer}
ReactMarkdown.propTypes = {

@@ -133,0 +130,0 @@ // Core options:

{
"name": "react-markdown",
"version": "8.0.4",
"version": "8.0.5",
"description": "React component to render markdown",

@@ -93,3 +93,3 @@ "license": "MIT",

"space-separated-tokens": "^2.0.0",
"style-to-object": "^0.3.0",
"style-to-object": "^0.4.0",
"unified": "^10.0.0",

@@ -104,2 +104,3 @@ "unist-util-visit": "^4.0.0",

"devDependencies": {
"@types/node": "^18.0.0",
"@types/react": "^18.0.0",

@@ -109,3 +110,3 @@ "@types/react-dom": "^18.0.0",

"c8": "^7.0.0",
"esbuild": "^0.15.0",
"esbuild": "^0.17.0",
"eslint-config-xo-react": "^0.27.0",

@@ -127,3 +128,2 @@ "eslint-plugin-es": "^4.0.0",

"typescript": "^4.0.0",
"uvu": "^0.5.0",
"xo": "^0.53.0"

@@ -133,6 +133,6 @@ },

"prepack": "npm run build && npm run format",
"build": "rimraf \"{lib/**/**,test/**,script/**,}*.d.ts\" && tsc && type-coverage && esbuild index.js --bundle --minify --target=es2015 --outfile=react-markdown.min.js --global-name=ReactMarkdown --banner:js=\"(function (g, f) {typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = f() : typeof define === 'function' && define.amd ? define([], f) : (g = typeof globalThis !== 'undefined' ? globalThis : g || self, g.ReactMarkdown = f()); }(this, (function () { 'use strict';\" --footer:js=\"return ReactMarkdown;})));\"",
"build": "tsc --build --clean && tsc --build && type-coverage && esbuild index.js --bundle --minify --target=es2015 --outfile=react-markdown.min.js --global-name=ReactMarkdown --banner:js=\"(function (g, f) {typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = f() : typeof define === 'function' && define.amd ? define([], f) : (g = typeof globalThis !== 'undefined' ? globalThis : g || self, g.ReactMarkdown = f()); }(this, (function () { 'use strict';\" --footer:js=\"return ReactMarkdown;})));\"",
"format": "remark . -qfo --ignore-pattern test/ && prettier . -w --loglevel warn && xo --fix",
"test-api": "node --no-warnings --experimental-loader=./test/loader.js ./node_modules/.bin/uvu test \"\\.jsx$\"",
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
"test-api": "node --no-warnings --experimental-loader=./test/loader.js --conditions development test/test.jsx",
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"

@@ -142,5 +142,5 @@ },

"plugins": [
"preset-wooorm",
"remark-preset-wooorm",
[
"gfm",
"remark-gfm",
{

@@ -151,7 +151,7 @@ "tablePipeAlign": false

[
"lint-table-pipe-alignment",
"remark-lint-table-pipe-alignment",
false
],
[
"lint-no-html",
"remark-lint-no-html",
false

@@ -158,0 +158,0 @@ ]

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc