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

remark-usage

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-usage - npm Package Compare versions

Comparing version 8.0.0 to 9.0.0

2

lib/generate/config.js
'use strict'
var nanoid = require('nanoid')
var nanoid = require('nanoid').nanoid
var resolveFrom = require('resolve-from')

@@ -5,0 +5,0 @@ var relativeModule = require('../util/relative-module')

@@ -63,9 +63,7 @@ 'use strict'

while (++index < length) {
try {
filePath = resolveFrom(cwd, examples[index])
} catch (_) {
continue
filePath = resolveFrom.silent(cwd, examples[index])
if (filePath) {
return next(filePath)
}
return next(filePath)
}

@@ -72,0 +70,0 @@

@@ -5,6 +5,7 @@ 'use strict'

var markdown = require('remark-parse')
var clear = require('unist-util-remove-position')
module.exports = generate
var processor = unified().use(markdown, {position: false})
var processor = unified().use(markdown)

@@ -31,3 +32,4 @@ function generate(ctx) {

function comment(node) {
return processor.parse(node.values.join('')).children
var tree = clear(processor.parse(node.values.join('')))
return tree.children
}

@@ -34,0 +36,0 @@

{
"name": "remark-usage",
"version": "8.0.0",
"version": "9.0.0",
"description": "remark plugin to add a usage example to your readme",

@@ -35,7 +35,8 @@ "license": "MIT",

"mdast-util-heading-range": "^2.0.0",
"nanoid": "^2.0.0",
"remark-parse": "^7.0.0",
"nanoid": "^3.0.0",
"remark-parse": "^9.0.0",
"resolve-from": "^5.0.0",
"trough": "^1.0.0",
"unified": "^8.0.0"
"unified": "^9.0.0",
"unist-util-remove-position": "^3.0.0"
},

@@ -47,8 +48,8 @@ "devDependencies": {

"prettier": "^2.0.0",
"remark": "^11.0.0",
"remark-cli": "^7.0.0",
"remark-preset-wooorm": "^6.0.0",
"tape": "^4.0.0",
"remark": "^13.0.0",
"remark-cli": "^9.0.0",
"remark-preset-wooorm": "^8.0.0",
"tape": "^5.0.0",
"to-vfile": "^6.0.0",
"xo": "^0.28.0"
"xo": "^0.33.0"
},

@@ -58,3 +59,3 @@ "scripts": {

"#": "xo currently crashes on invalid `package.json`s in fixtures: && xo --fix",
"format:js": "prettier --no-config --config ./package.json --write \"**/*.js\"",
"format:js": "prettier . --no-config --config ./package.json --write",
"format": "npm run format:md && npm run format:js",

@@ -83,2 +84,3 @@ "test-api": "node test",

"rules": {
"unicorn/prefer-optional-catch-binding": "off",
"unicorn/string-content": "off"

@@ -92,16 +94,4 @@ },

"remarkConfig": {
"plugins": [
"preset-wooorm",
[
"remark-lint-fenced-code-flag",
false
],
[
"./",
{
"heading": "use"
}
]
]
"plugins": []
}
}

@@ -13,2 +13,8 @@ # remark-usage

## Note!
This plugin is ready for the new parser in remark
([`remarkjs/remark#536`](https://github.com/remarkjs/remark/pull/536)).
No change is needed: it works exactly the same now as it did before!
## Install

@@ -62,5 +68,3 @@

var file = await remark()
.use(usage)
.process(file)
var file = await remark().use(usage).process(file)
```

@@ -187,3 +191,3 @@

[build-badge]: https://img.shields.io/travis/remarkjs/remark-usage/master.svg
[build-badge]: https://img.shields.io/travis/remarkjs/remark-usage/main.svg

@@ -210,5 +214,5 @@ [build]: https://travis-ci.org/remarkjs/remark-usage

[chat-badge]: https://img.shields.io/badge/chat-spectrum-7b16ff.svg
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://spectrum.chat/unified/remark
[chat]: https://github.com/remarkjs/remark/discussions

@@ -219,7 +223,7 @@ [npm]: https://docs.npmjs.com/cli/install

[contributing]: https://github.com/remarkjs/.github/blob/master/contributing.md
[contributing]: https://github.com/remarkjs/.github/blob/HEAD/contributing.md
[support]: https://github.com/remarkjs/.github/blob/master/support.md
[support]: https://github.com/remarkjs/.github/blob/HEAD/support.md
[coc]: https://github.com/remarkjs/.github/blob/master/code-of-conduct.md
[coc]: https://github.com/remarkjs/.github/blob/HEAD/code-of-conduct.md

@@ -226,0 +230,0 @@ [license]: license

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