remark-autolink-headings
Advanced tools
Comparing version 6.0.1 to 6.1.0
@@ -14,3 +14,3 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
@@ -17,0 +17,0 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } |
{ | ||
"name": "remark-autolink-headings", | ||
"version": "6.0.1", | ||
"version": "6.1.0", | ||
"description": "remark plugin to automatically add links to headings", | ||
@@ -30,8 +30,12 @@ "license": "MIT", | ||
"module": "src/index.js", | ||
"types": "types/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"types/index.d.ts", | ||
"src/index.js" | ||
], | ||
"dependencies": { | ||
"@types/hast": "^2.0.0", | ||
"extend": "^3.0.0", | ||
"unified": "^9.0.0", | ||
"unist-util-visit": "^2.0.0" | ||
@@ -46,16 +50,18 @@ }, | ||
"babel-plugin-add-module-exports": "^1.0.0", | ||
"browserify": "^16.0.0", | ||
"browserify": "^17.0.0", | ||
"dtslint": "^4.0.0", | ||
"hastscript": "^7.0.0", | ||
"nyc": "^15.0.0", | ||
"prettier": "^2.0.0", | ||
"remark": "^12.0.0", | ||
"remark-cli": "^8.0.0", | ||
"remark-html": "^11.0.0", | ||
"remark-preset-wooorm": "^7.0.0", | ||
"remark": "^13.0.0", | ||
"remark-cli": "^9.0.0", | ||
"remark-html": "^13.0.0", | ||
"remark-preset-wooorm": "^8.0.0", | ||
"remark-slug": "^6.0.0", | ||
"tinyify": "^2.0.0", | ||
"xo": "^0.32.0" | ||
"tinyify": "^3.0.0", | ||
"xo": "^0.34.0" | ||
}, | ||
"scripts": { | ||
"prepublishOnly": "npm run compile", | ||
"format": "remark . -qfo && prettier . --write && xo --fix", | ||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", | ||
"compile": "babel src --out-dir dist --ignore src/**/__tests__", | ||
@@ -67,3 +73,4 @@ "build-bundle": "browserify . -s remarkAutolinkHeadings -o remark-autolink-headings.js", | ||
"test-coverage": "nyc --reporter lcov ava", | ||
"test": "npm run compile && npm run format && npm run bundle && npm run test-coverage" | ||
"test-types": "dtslint types", | ||
"test": "npm run compile && npm run format && npm run bundle && npm run test-coverage && npm run test-types" | ||
}, | ||
@@ -99,3 +106,6 @@ "browserslist": "> 2.5%, node 6", | ||
"xo": { | ||
"prettier": true | ||
"prettier": true, | ||
"ignore": [ | ||
"types/" | ||
] | ||
}, | ||
@@ -102,0 +112,0 @@ "remarkConfig": { |
@@ -13,7 +13,19 @@ # remark-autolink-headings | ||
> This package integrates with [`remark-html`][remark-html]. | ||
> It may be better to work with [**rehype**][rehype], which is specifically made | ||
> This package integrates with [`remark-html`][remark-html] (or alternatives). | ||
> It is better to work with [**rehype**][rehype], which is specifically made | ||
> for HTML, and to use [`rehype-autolink-headings`][rehype-autolink-headings] | ||
> instead of this package. | ||
<!----> | ||
> This package works with headings that have IDs. | ||
> One way to add IDs to headings is by using [`remark-slug`][remark-slug] before | ||
> this plugin. | ||
## 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 | ||
@@ -95,3 +107,3 @@ | ||
Extra properties to set on the link (`Object?`). | ||
Defaults to `{ariaHidden: true, tabIndex: -1}` when in `'prepend'` or `'append'` | ||
Defaults to `{ariaHidden: 'true', tabIndex: -1}` when in `'prepend'` or `'append'` | ||
mode. | ||
@@ -126,3 +138,3 @@ | ||
h('span.visually-hidden', 'Read the “', toString(node), '” section'), | ||
h('span.icon.icon-link', {ariaHidden: true}) | ||
h('span.icon.icon-link', {ariaHidden: 'true'}) | ||
] | ||
@@ -177,5 +189,5 @@ } | ||
[build-badge]: https://img.shields.io/travis/remarkjs/remark-autolink-headings/main.svg | ||
[build-badge]: https://github.com/remarkjs/remark-autolink-headings/workflows/main/badge.svg | ||
[build]: https://travis-ci.org/remarkjs/remark-autolink-headings | ||
[build]: https://github.com/remarkjs/remark-autolink-headings/actions | ||
@@ -200,5 +212,5 @@ [coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark-autolink-headings.svg | ||
[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 | ||
@@ -221,2 +233,4 @@ [npm]: https://docs.npmjs.com/cli/install | ||
[remark-slug]: https://github.com/remarkjs/remark-slug | ||
[remark-html]: https://github.com/remarkjs/remark-html | ||
@@ -223,0 +237,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
20868
6
313
241
4
18
+ Added@types/hast@^2.0.0
+ Addedunified@^9.0.0
+ Added@types/hast@2.3.10(transitive)
+ Addedbail@1.0.5(transitive)
+ Addedis-buffer@2.0.5(transitive)
+ Addedis-plain-obj@2.1.0(transitive)
+ Addedtrough@1.0.5(transitive)
+ Addedunified@9.2.2(transitive)
+ Addedunist-util-stringify-position@2.0.3(transitive)
+ Addedvfile@4.2.1(transitive)
+ Addedvfile-message@2.0.4(transitive)