Comparing version 13.0.0 to 14.0.0
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() |
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10476
5
268
Yes
10
1
+ Added@types/debug@4.1.12(transitive)
+ Added@types/ms@0.7.34(transitive)
+ Addedbail@2.0.2(transitive)
+ Addedcharacter-entities@2.0.2(transitive)
+ Addeddecode-named-character-reference@1.0.2(transitive)
+ Addeddequal@2.0.3(transitive)
+ Addeddiff@5.2.0(transitive)
+ Addedis-plain-obj@4.1.0(transitive)
+ Addedkleur@4.1.5(transitive)
+ Addedlongest-streak@3.1.0(transitive)
+ Addedmdast-util-from-markdown@1.3.1(transitive)
+ Addedmdast-util-phrasing@3.0.1(transitive)
+ Addedmdast-util-to-markdown@1.5.0(transitive)
+ Addedmdast-util-to-string@3.2.0(transitive)
+ Addedmicromark@3.2.0(transitive)
+ Addedmicromark-core-commonmark@1.1.0(transitive)
+ Addedmicromark-factory-destination@1.1.0(transitive)
+ Addedmicromark-factory-label@1.1.0(transitive)
+ Addedmicromark-factory-space@1.1.0(transitive)
+ Addedmicromark-factory-title@1.1.0(transitive)
+ Addedmicromark-factory-whitespace@1.1.0(transitive)
+ Addedmicromark-util-character@1.2.0(transitive)
+ Addedmicromark-util-chunked@1.1.0(transitive)
+ Addedmicromark-util-classify-character@1.1.0(transitive)
+ Addedmicromark-util-combine-extensions@1.1.0(transitive)
+ Addedmicromark-util-decode-numeric-character-reference@1.1.0(transitive)
+ Addedmicromark-util-decode-string@1.1.0(transitive)
+ Addedmicromark-util-encode@1.1.0(transitive)
+ Addedmicromark-util-html-tag-name@1.2.0(transitive)
+ Addedmicromark-util-normalize-identifier@1.1.0(transitive)
+ Addedmicromark-util-resolve-all@1.1.0(transitive)
+ Addedmicromark-util-sanitize-uri@1.2.0(transitive)
+ Addedmicromark-util-subtokenize@1.1.0(transitive)
+ Addedmicromark-util-symbol@1.1.0(transitive)
+ Addedmicromark-util-types@1.1.0(transitive)
+ Addedmri@1.2.0(transitive)
+ Addedremark-parse@10.0.2(transitive)
+ Addedremark-stringify@10.0.3(transitive)
+ Addedsade@1.8.1(transitive)
+ Addedtrough@2.2.0(transitive)
+ Addedunified@10.1.2(transitive)
+ Addedunist-util-is@5.2.1(transitive)
+ Addedunist-util-stringify-position@3.0.3(transitive)
+ Addedunist-util-visit@4.1.2(transitive)
+ Addedunist-util-visit-parents@5.1.3(transitive)
+ Addeduvu@0.5.6(transitive)
+ Addedvfile@5.3.7(transitive)
+ Addedvfile-message@3.1.4(transitive)
+ Addedzwitch@2.0.4(transitive)
- Removedbail@1.0.5(transitive)
- Removedcharacter-entities@1.2.4(transitive)
- Removedcharacter-entities-legacy@1.1.4(transitive)
- Removedcharacter-reference-invalid@1.1.4(transitive)
- Removedis-alphabetical@1.0.4(transitive)
- Removedis-alphanumerical@1.0.4(transitive)
- Removedis-decimal@1.0.4(transitive)
- Removedis-hexadecimal@1.0.4(transitive)
- Removedis-plain-obj@2.1.0(transitive)
- Removedlongest-streak@2.0.4(transitive)
- Removedmdast-util-from-markdown@0.8.5(transitive)
- Removedmdast-util-to-markdown@0.6.5(transitive)
- Removedmdast-util-to-string@2.0.0(transitive)
- Removedmicromark@2.11.4(transitive)
- Removedparse-entities@2.0.0(transitive)
- Removedremark-parse@9.0.0(transitive)
- Removedremark-stringify@9.0.1(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedtrough@1.0.5(transitive)
- Removedunified@9.2.2(transitive)
- Removedunist-util-stringify-position@2.0.3(transitive)
- Removedvfile@4.2.1(transitive)
- Removedvfile-message@2.0.4(transitive)
- Removedzwitch@1.0.5(transitive)
Updatedremark-parse@^10.0.0
Updatedremark-stringify@^10.0.0
Updatedunified@^10.0.0