Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: syntax-tree/mdast-util-gfm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.0.0
Choose a base ref
...
head repository: syntax-tree/mdast-util-gfm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.1.0
Choose a head ref
  • 14 commits
  • 13 files changed
  • 1 contributor

Commits on Jul 17, 2023

  1. Update dev-dependencies

    wooorm committed Jul 17, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    aa41024 View commit details

Commits on Aug 6, 2023

  1. Update dev-dependencies

    wooorm committed Aug 6, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    6e651ee View commit details

Commits on Feb 10, 2025

  1. Update dev-dependencies

    wooorm committed Feb 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    5bc2bd2 View commit details
  2. Update Actions

    wooorm committed Feb 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    8b75e87 View commit details
  3. Add .tsbuildinfo to .gitignore

    wooorm committed Feb 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    3412869 View commit details
  4. Refactor .editorconfig

    wooorm committed Feb 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    c54df4a View commit details
  5. Refactor .prettierignore

    wooorm committed Feb 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    8e8e092 View commit details
  6. Remove license year

    wooorm committed Feb 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    2ebeef1 View commit details
  7. Refactor package.json

    wooorm committed Feb 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    5a2471c View commit details
  8. Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    e111719 View commit details
  9. Refactor to use @imports

    wooorm committed Feb 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    45ece81 View commit details
  10. Add declaration maps

    wooorm committed Feb 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    c913fa3 View commit details
  11. Refactor code-style

    wooorm committed Feb 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    9b94848 View commit details
  12. 3.1.0

    wooorm committed Feb 10, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    6b34bb2 View commit details
Showing with 258 additions and 183 deletions.
  1. +4 −4 .editorconfig
  2. +6 −6 .github/workflows/bb.yml
  3. +8 −8 .github/workflows/main.yml
  4. +6 −3 .gitignore
  5. +1 −1 .prettierignore
  6. +12 −0 index.d.ts
  7. +1 −4 index.js
  8. +5 −9 lib/index.js
  9. +1 −1 license
  10. +75 −55 package.json
  11. +89 −87 readme.md
  12. +48 −4 test/index.js
  13. +2 −1 tsconfig.json
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
12 changes: 6 additions & 6 deletions .github/workflows/bb.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: bb
on:
issues:
types: [opened, reopened, edited, closed, labeled, unlabeled]
pull_request_target:
types: [opened, reopened, edited, closed, labeled, unlabeled]
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: unifiedjs/beep-boop-beta@main
with:
repo-token: ${{secrets.GITHUB_TOKEN}}
name: bb
on:
issues:
types: [closed, edited, labeled, opened, reopened, unlabeled]
pull_request_target:
types: [closed, edited, labeled, opened, reopened, unlabeled]
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: main
on:
- pull_request
- push
jobs:
main:
name: ${{matrix.node}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{matrix.node}}
- run: npm install
- run: npm test
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v5
strategy:
matrix:
node:
- lts/gallium
- lts/hydrogen
- node
name: main
on:
- pull_request
- push
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
coverage/
node_modules/
.DS_Store
*.d.ts
*.log
*.map
*.tsbuildinfo
.DS_Store
coverage/
node_modules/
yarn.lock
!/index.d.ts
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
coverage/
*.html
*.md
coverage/
12 changes: 12 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type {ToMarkdownOptions as FootnoteOptions} from 'mdast-util-gfm-footnote'
import type {Options as TableOptions} from 'mdast-util-gfm-table'

/**
* Configuration for `gfmToMarkdown` from `mdast-util-gfm`.
*
* Currently supports options for `mdast-util-gfm-footnote` and
* `mdast-util-gfm-table`.
*/
export interface Options extends FootnoteOptions, TableOptions {}

export {gfmFromMarkdown, gfmToMarkdown} from './lib/index.js'
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
/**
* @typedef {import('./lib/index.js').Options} Options
*/

// Note: types exposed from `index.d.ts`.
export {gfmFromMarkdown, gfmToMarkdown} from './lib/index.js'
14 changes: 5 additions & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/**
* @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
* @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
*/

/**
* @typedef {import('mdast-util-gfm-table').Options} Options
* Configuration.
* @import {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'
* @import {Options} from 'mdast-util-gfm'
* @import {Options as ToMarkdownExtension} from 'mdast-util-to-markdown'
*/

import {
@@ -49,7 +45,7 @@ export function gfmFromMarkdown() {
* literals, footnotes, strikethrough, tables, tasklists).
*
* @param {Options | null | undefined} [options]
* Configuration.
* Configuration (optional).
* @returns {ToMarkdownExtension}
* Extension for `mdast-util-to-markdown` to enable GFM (autolink literals,
* footnotes, strikethrough, tables, tasklists).
@@ -58,7 +54,7 @@ export function gfmToMarkdown(options) {
return {
extensions: [
gfmAutolinkLiteralToMarkdown(),
gfmFootnoteToMarkdown(),
gfmFootnoteToMarkdown(options),
gfmStrikethroughToMarkdown(),
gfmTableToMarkdown(options),
gfmTaskListItemToMarkdown()
2 changes: 1 addition & 1 deletion license
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(The MIT License)

Copyright (c) 2020 Titus Wormer <tituswormer@gmail.com>
Copyright (c) Titus Wormer <tituswormer@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
130 changes: 75 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,9 @@
{
"name": "mdast-util-gfm",
"version": "3.0.0",
"description": "mdast extension to parse and serialize GFM (GitHub Flavored Markdown)",
"license": "MIT",
"keywords": [
"unist",
"mdast",
"mdast-util",
"util",
"utility",
"markdown",
"markup",
"table",
"strikethrough",
"tasklist",
"autolink",
"tagfilter",
"github",
"gfm"
],
"repository": "syntax-tree/mdast-util-gfm",
"bugs": "https://github.com/syntax-tree/mdast-util-gfm/issues",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"bugs": "https://github.com/syntax-tree/mdast-util-gfm/issues",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"sideEffects": false,
"type": "module",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
"index.js"
],
"dependencies": {
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-gfm-autolink-literal": "^2.0.0",
@@ -46,32 +13,50 @@
"mdast-util-gfm-task-list-item": "^2.0.0",
"mdast-util-to-markdown": "^2.0.0"
},
"description": "mdast extension to parse and serialize GFM (GitHub Flavored Markdown)",
"devDependencies": {
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"@types/node": "^22.0.0",
"c8": "^10.0.0",
"github-slugger": "^2.0.0",
"hast-util-to-html": "^8.0.0",
"mdast-util-to-hast": "^12.0.0",
"hast-util-to-html": "^9.0.0",
"mdast-util-to-hast": "^13.0.0",
"micromark-extension-gfm": "^3.0.0",
"prettier": "^2.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"prettier": "^3.0.0",
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^11.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"undici": "^5.0.0",
"xo": "^0.54.0"
"undici": "^7.0.0",
"xo": "^0.60.0"
},
"scripts": {
"crawl": "node --conditions development script/crawl-tests.js",
"prepack": "npm run build && npm run format",
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
"test-api-prod": "node --conditions production test/index.js",
"test-api-dev": "node --conditions development test/index.js",
"test-api": "npm run test-api-dev && npm run test-api-prod",
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
"exports": "./index.js",
"files": [
"index.d.ts",
"index.js",
"lib/"
],
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"keywords": [
"autolink",
"gfm",
"github",
"markdown",
"markup",
"mdast-util",
"mdast",
"strikethrough",
"table",
"tagfilter",
"tasklist",
"unist",
"utility",
"util"
],
"license": "MIT",
"name": "mdast-util-gfm",
"prettier": {
"bracketSpacing": false,
"semi": false,
@@ -85,14 +70,49 @@
"remark-preset-wooorm"
]
},
"repository": "syntax-tree/mdast-util-gfm",
"scripts": {
"build": "tsc --build --clean && tsc --build && type-coverage",
"crawl": "node --conditions development script/crawl-tests.js",
"format": "remark --frail --output --quiet -- . && prettier --log-level warn --write -- . && xo --fix",
"test-api-prod": "node --conditions production test/index.js",
"test-api-dev": "node --conditions development test/index.js",
"test-api": "npm run test-api-dev && npm run test-api-prod",
"test-coverage": "c8 --100 --reporter lcov -- npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"sideEffects": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
"ignoreCatch": true,
"strict": true
},
"type": "module",
"version": "3.1.0",
"xo": {
"overrides": [
{
"files": [
"**/*.d.ts"
],
"rules": {
"@typescript-eslint/array-type": [
"error",
{
"default": "generic"
}
],
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true
}
],
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface"
]
}
},
{
"files": "test/**/*.js",
"rules": {
Loading