Socket
Socket
Sign inDemoInstall

remark

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark - npm Package Compare versions

Comparing version 13.0.0 to 14.0.0

index.d.ts

10

index.js

@@ -1,7 +0,5 @@

'use strict'
import {unified} from 'unified'
import remarkParse from 'remark-parse'
import remarkStringify from 'remark-stringify'
var unified = require('unified')
var parse = require('remark-parse')
var stringify = require('remark-stringify')
module.exports = unified().use(parse).use(stringify).freeze()
export const remark = unified().use(remarkParse).use(remarkStringify).freeze()

28

package.json
{
"name": "remark",
"version": "13.0.0",
"version": "14.0.0",
"description": "Markdown processor powered by plugins part of the unified collective",

@@ -32,16 +32,26 @@ "license": "MIT",

],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.js",
"types/index.d.ts"
"index.d.ts",
"index.js"
],
"types": "types/index.d.ts",
"dependencies": {
"remark-parse": "^9.0.0",
"remark-stringify": "^9.0.0",
"unified": "^9.1.0"
"remark-parse": "^10.0.0",
"remark-stringify": "^10.0.0",
"unified": "^10.0.0"
},
"scripts": {
"test": "tape test.js"
"test": "node --conditions development test.js",
"build": "rimraf \"*.d.ts\" && tsc && type-coverage"
},
"xo": false
"xo": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true,
"ignoreCatch": true
}
}

@@ -11,3 +11,3 @@ # remark

[**unified**][unified] processor to parse and serialize Markdown.
[**unified**][unified] processor to parse and serialize markdown.
Built on [micromark][].

@@ -18,6 +18,6 @@ Powered by [plugins][].

* API by [**unified**][unified]
* Parses Markdown to a syntax tree with [`remark-parse`][parse]
* Parses markdown to a syntax tree with [`remark-parse`][parse]
* [**mdast**][mdast] syntax tree
* [Plugins][] transform the tree
* Serializes syntax trees to Markdown with [`remark-stringify`][stringify]
* Serializes syntax trees to markdown with [`remark-stringify`][stringify]

@@ -30,2 +30,5 @@ Don’t need the parser?

This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c):
Node 12+ is needed to use it and it must be `import`ed instead of `require`d.
[npm][]:

@@ -43,15 +46,16 @@

This example lints Markdown and turns it into HTML.
This example lints markdown and turns it into HTML.
```js
var remark = require('remark')
var recommended = require('remark-preset-lint-recommended')
var html = require('remark-html')
var report = require('vfile-reporter')
import {reporter} from 'vfile-reporter'
import {remark} from 'remark'
import remarkPresetLintRecommended from 'remark-preset-lint-recommended'
import remarkHtml from 'remark-html'
remark()
.use(recommended)
.use(html)
.process('## Hello world!', function (err, file) {
console.error(report(err || file))
.use(remarkPresetLintRecommended)
.use(remarkHtml)
.process('## Hello world!')
.then((file) => {
console.error(reporter(file))
console.log(String(file))

@@ -64,3 +68,3 @@ })

```txt
1:1 warning Missing newline character at end of file final-newline remark-lint
1:1 warning Missing newline character at end of file final-newline remark-lint

@@ -76,12 +80,12 @@ ⚠ 1 warning

This example prettifies Markdown and configures [`remark-stringify`][stringify]
This example prettifies markdown and configures [`remark-stringify`][stringify]
through [data][].
```js
var remark = require('remark')
import {remark} from 'remark'
remark()
.data('settings', {emphasis: '*', strong: '*'})
.process('_Emphasis_ and __importance__', function (err, file) {
if (err) throw err
.process('_Emphasis_ and __importance__')
.then((file) => {
console.log(String(file))

@@ -99,12 +103,12 @@ })

This example prettifies Markdown and configures [`remark-parse`][parse] and
This example prettifies markdown and configures [`remark-parse`][parse] and
[`remark-stringify`][stringify] through a [preset][].
```js
var remark = require('remark')
import {remark} from 'remark'
remark()
.use({settings: {emphasis: '*', strong: '*'}})
.process('_Emphasis_ and __importance__', function (err, file) {
if (err) throw err
.process('_Emphasis_ and __importance__')
.then((file) => {
console.log(String(file))

@@ -124,5 +128,8 @@ })

This package exports the following identifier: `remark`.
There is no default export.
## Security
As Markdown is sometimes used for HTML, and improper use of HTML can open you up
As markdown is sometimes used for HTML, and improper use of HTML can open you up
to a [cross-site scripting (XSS)][xss] attack, use of remark can also be unsafe.

@@ -202,5 +209,5 @@ When going to HTML, use remark in combination with the [**rehype**][rehype]

[build-badge]: https://img.shields.io/travis/remarkjs/remark.svg
[build-badge]: https://github.com/remarkjs/remark/workflows/main/badge.svg
[build]: https://travis-ci.org/remarkjs/remark
[build]: https://github.com/remarkjs/remark/actions

@@ -207,0 +214,0 @@ [coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark.svg

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