Socket
Socket
Sign inDemoInstall

micromark-extension-gfm-autolink-literal

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromark-extension-gfm-autolink-literal - npm Package Compare versions

Comparing version 1.0.5 to 2.0.0

2

dev/index.d.ts

@@ -5,3 +5,2 @@ export {gfmAutolinkLiteral} from './lib/syntax.js'

declare module 'micromark-util-types' {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface Token {

@@ -11,3 +10,2 @@ _gfmAutolinkLiteralWalkedInto?: boolean

// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface TokenTypeMap {

@@ -14,0 +12,0 @@ literalAutolink: 'literalAutolink'

10

dev/lib/html.d.ts
/**
* Extension for `micromark` that can be passed in `htmlExtensions` to support
* GFM autolink literals when serializing to HTML.
* Create an HTML extension for `micromark` to support GitHub autolink literal
* when serializing to HTML.
*
* @type {HtmlExtension}
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions` to
* support GitHub autolink literal when serializing to HTML.
*/
export const gfmAutolinkLiteralHtml: HtmlExtension
export function gfmAutolinkLiteralHtml(): HtmlExtension
export type CompileContext = import('micromark-util-types').CompileContext

@@ -9,0 +11,0 @@ export type Handle = import('micromark-util-types').Handle

@@ -10,12 +10,14 @@ /**

// To do: next major: expose functions that yields extension.
/**
* Extension for `micromark` that can be passed in `htmlExtensions` to support
* GFM autolink literals when serializing to HTML.
* Create an HTML extension for `micromark` to support GitHub autolink literal
* when serializing to HTML.
*
* @type {HtmlExtension}
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions` to
* support GitHub autolink literal when serializing to HTML.
*/
export const gfmAutolinkLiteralHtml = {
exit: {literalAutolinkEmail, literalAutolinkHttp, literalAutolinkWww}
export function gfmAutolinkLiteralHtml() {
return {
exit: {literalAutolinkEmail, literalAutolinkHttp, literalAutolinkWww}
}
}

@@ -51,3 +53,3 @@

* @param {string | null | undefined} [protocol]
* @returns {void}
* @returns {undefined}
*/

@@ -54,0 +56,0 @@ function anchorFromToken(token, protocol) {

/**
* Extension for `micromark` that can be passed in `extensions` to enable GFM
* autolink literal syntax.
* Create an extension for `micromark` to support GitHub autolink literal
* syntax.
*
* @type {Extension}
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to enable GFM
* autolink literal syntax.
*/
export const gfmAutolinkLiteral: Extension
export function gfmAutolinkLiteral(): Extension
export type Code = import('micromark-util-types').Code

@@ -9,0 +11,0 @@ export type ConstructRecord = import('micromark-util-types').ConstructRecord

@@ -20,3 +20,3 @@ /**

} from 'micromark-util-character'
import {codes} from 'micromark-util-symbol/codes.js'
import {codes} from 'micromark-util-symbol'

@@ -42,11 +42,13 @@ const wwwPrefix = {tokenize: tokenizeWwwPrefix, partial: true}

// To do: next major: expose functions that yields extension.
/**
* Extension for `micromark` that can be passed in `extensions` to enable GFM
* autolink literal syntax.
* Create an extension for `micromark` to support GitHub autolink literal
* syntax.
*
* @type {Extension}
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to enable GFM
* autolink literal syntax.
*/
export const gfmAutolinkLiteral = {text}
export function gfmAutolinkLiteral() {
return {text}
}

@@ -53,0 +55,0 @@ /** @type {Code} */

@@ -5,3 +5,2 @@ export {gfmAutolinkLiteral} from './lib/syntax.js'

declare module 'micromark-util-types' {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface Token {

@@ -11,3 +10,2 @@ _gfmAutolinkLiteralWalkedInto?: boolean

// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface TokenTypeMap {

@@ -14,0 +12,0 @@ literalAutolink: 'literalAutolink'

/**
* Extension for `micromark` that can be passed in `htmlExtensions` to support
* GFM autolink literals when serializing to HTML.
* Create an HTML extension for `micromark` to support GitHub autolink literal
* when serializing to HTML.
*
* @type {HtmlExtension}
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions` to
* support GitHub autolink literal when serializing to HTML.
*/
export const gfmAutolinkLiteralHtml: HtmlExtension
export function gfmAutolinkLiteralHtml(): HtmlExtension
export type CompileContext = import('micromark-util-types').CompileContext

@@ -9,0 +11,0 @@ export type Handle = import('micromark-util-types').Handle

@@ -10,15 +10,17 @@ /**

// To do: next major: expose functions that yields extension.
/**
* Extension for `micromark` that can be passed in `htmlExtensions` to support
* GFM autolink literals when serializing to HTML.
* Create an HTML extension for `micromark` to support GitHub autolink literal
* when serializing to HTML.
*
* @type {HtmlExtension}
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions` to
* support GitHub autolink literal when serializing to HTML.
*/
export const gfmAutolinkLiteralHtml = {
exit: {
literalAutolinkEmail,
literalAutolinkHttp,
literalAutolinkWww
export function gfmAutolinkLiteralHtml() {
return {
exit: {
literalAutolinkEmail,
literalAutolinkHttp,
literalAutolinkWww
}
}

@@ -55,3 +57,3 @@ }

* @param {string | null | undefined} [protocol]
* @returns {void}
* @returns {undefined}
*/

@@ -58,0 +60,0 @@ function anchorFromToken(token, protocol) {

/**
* Extension for `micromark` that can be passed in `extensions` to enable GFM
* autolink literal syntax.
* Create an extension for `micromark` to support GitHub autolink literal
* syntax.
*
* @type {Extension}
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to enable GFM
* autolink literal syntax.
*/
export const gfmAutolinkLiteral: Extension
export function gfmAutolinkLiteral(): Extension
export type Code = import('micromark-util-types').Code

@@ -9,0 +11,0 @@ export type ConstructRecord = import('micromark-util-types').ConstructRecord

@@ -56,12 +56,14 @@ /**

// To do: next major: expose functions that yields extension.
/**
* Extension for `micromark` that can be passed in `extensions` to enable GFM
* autolink literal syntax.
* Create an extension for `micromark` to support GitHub autolink literal
* syntax.
*
* @type {Extension}
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to enable GFM
* autolink literal syntax.
*/
export const gfmAutolinkLiteral = {
text
export function gfmAutolinkLiteral() {
return {
text
}
}

@@ -68,0 +70,0 @@

{
"name": "micromark-extension-gfm-autolink-literal",
"version": "1.0.5",
"version": "2.0.0",
"description": "micromark extension to support GFM autolink literals",

@@ -30,4 +30,2 @@ "license": "MIT",

"type": "module",
"main": "index.js",
"types": "index.d.ts",
"files": [

@@ -44,13 +42,13 @@ "dev/",

"dependencies": {
"micromark-util-character": "^1.0.0",
"micromark-util-sanitize-uri": "^1.0.0",
"micromark-util-symbol": "^1.0.0",
"micromark-util-types": "^1.0.0"
"micromark-util-character": "^2.0.0",
"micromark-util-sanitize-uri": "^2.0.0",
"micromark-util-symbol": "^2.0.0",
"micromark-util-types": "^2.0.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"c8": "^7.0.0",
"c8": "^8.0.0",
"create-gfm-fixtures": "^1.0.0",
"micromark": "^3.0.0",
"micromark-build": "^1.0.0",
"micromark": "^4.0.0",
"micromark-build": "^2.0.0",
"prettier": "^2.0.0",

@@ -75,9 +73,20 @@ "rehype": "^12.0.0",

"prettier": {
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"bracketSpacing": false,
"semi": false,
"trailingComma": "none"
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm"
]
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"ignoreCatch": true,
"strict": true
},
"xo": {

@@ -87,3 +96,2 @@ "prettier": true,

"complexity": "off",
"n/file-extension-in-import": "off",
"unicorn/no-this-assignment": "off"

@@ -94,2 +102,10 @@ },

"files": [
"**/*.ts"
],
"rules": {
"@typescript-eslint/consistent-type-definitions": 0
}
},
{
"files": [
"test/**/*.js"

@@ -102,14 +118,3 @@ ],

]
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm"
]
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true,
"ignoreCatch": true
}
}

@@ -20,4 +20,4 @@ # micromark-extension-gfm-autolink-literal

* [API](#api)
* [`gfmAutolinkLiteral`](#gfmautolinkliteral)
* [`gfmAutolinkLiteralHtml`](#gfmautolinkliteralhtml)
* [`gfmAutolinkLiteral()`](#gfmautolinkliteral)
* [`gfmAutolinkLiteralHtml()`](#gfmautolinkliteralhtml)
* [Bugs](#bugs)

@@ -83,3 +83,3 @@ * [Authoring](#authoring)

```js
import {gfmAutolinkLiteral, gfmAutolinkLiteralHtml} from 'https://esm.sh/micromark-extension-gfm-autolink-literal@1'
import {gfmAutolinkLiteral, gfmAutolinkLiteralHtml} from 'https://esm.sh/micromark-extension-gfm-autolink-literal@2'
```

@@ -91,3 +91,3 @@

<script type="module">
import {gfmAutolinkLiteral, gfmAutolinkLiteralHtml} from 'https://esm.sh/micromark-extension-gfm-autolink-literal@1?bundle'
import {gfmAutolinkLiteral, gfmAutolinkLiteralHtml} from 'https://esm.sh/micromark-extension-gfm-autolink-literal@2?bundle'
</script>

@@ -106,4 +106,4 @@ ```

const output = micromark('Just a URL: www.example.com.', {
extensions: [gfmAutolinkLiteral],
htmlExtensions: [gfmAutolinkLiteralHtml]
extensions: [gfmAutolinkLiteral()],
htmlExtensions: [gfmAutolinkLiteralHtml()]
})

@@ -131,11 +131,21 @@

### `gfmAutolinkLiteral`
### `gfmAutolinkLiteral()`
Create an extension for `micromark` to support GitHub autolink literal
syntax.
###### Parameters
Extension for `micromark` that can be passed in `extensions` to enable GFM
autolink literal syntax ([`Extension`][micromark-extension]).
### `gfmAutolinkLiteralHtml`
### `gfmAutolinkLiteralHtml()`
Create an HTML extension for `micromark` to support GitHub autolink literal
when serializing to HTML.
###### Parameters
Extension for `micromark` that can be passed in `htmlExtensions` to support
GFM autolink literals when serializing to HTML
GitHub autolink literal when serializing to HTML
([`HtmlExtension`][micromark-html-extension]).

@@ -302,9 +312,12 @@

Projects maintained by the unified collective are compatible with all maintained
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
As of now, that is Node.js 16+.
Our projects sometimes work with older versions, but this is not guaranteed.
These extensions work with `micromark` version 3+.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
`micromark-extension-gfm-autolink-literal@^2`, compatible with Node.js 16.
This package works with `micromark` version `3` and later.
## Security

@@ -355,5 +368,5 @@

[size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-extension-gfm-autolink-literal.svg
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-extension-gfm-autolink-literal
[size]: https://bundlephobia.com/result?p=micromark-extension-gfm-autolink-literal
[size]: https://bundlejs.com/?q=micromark-extension-gfm-autolink-literal

@@ -378,7 +391,7 @@ [sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg

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

@@ -385,0 +398,0 @@ [esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

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