remark-usage
Advanced tools
Comparing version 6.1.0 to 6.1.1
11
index.js
@@ -12,2 +12,3 @@ 'use strict' | ||
var markdown = require('remark-parse') | ||
var resolveFrom = require('resolve-from') | ||
@@ -149,6 +150,3 @@ module.exports = usage | ||
main = options.main | ||
main = main | ||
? require.resolve(resolve(cwd, main)) | ||
: resolve(cwd, pack.main || 'index.js') | ||
main = resolve(cwd, options.main || pack.main || 'index.js') | ||
@@ -280,3 +278,6 @@ example = options.example | ||
function replace($0, $1, $2, $3) { | ||
var filepath = resolve(options.example, '../', unquote($2)) | ||
var filepath = resolveFrom.silent( | ||
path.dirname(options.example), | ||
unquote($2) | ||
) | ||
var quote | ||
@@ -283,0 +284,0 @@ |
{ | ||
"name": "remark-usage", | ||
"version": "6.1.0", | ||
"version": "6.1.1", | ||
"description": "Add a usage example to your README", | ||
@@ -38,2 +38,3 @@ "license": "MIT", | ||
"remark-preset-wooorm": "^4.0.0", | ||
"resolve-from": "^4.0.0", | ||
"tape": "^4.0.0", | ||
@@ -40,0 +41,0 @@ "xo": "^0.23.0" |
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
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
13918
256
5
10