diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb63387..8fdea18 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,13 +7,13 @@ jobs: 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@v4 strategy: matrix: node: diff --git a/dev/lib/edit-map.js b/dev/lib/edit-map.js index b63c7a2..8eca530 100644 --- a/dev/lib/edit-map.js +++ b/dev/lib/edit-map.js @@ -45,7 +45,7 @@ export class EditMap { * @returns {undefined} */ add(index, remove, add) { - addImpl(this, index, remove, add) + addImplementation(this, index, remove, add) } // To do: add this when moving to `micromark`. @@ -58,7 +58,7 @@ export class EditMap { // * @returns {undefined} // */ // addBefore(index, remove, add) { - // addImpl(this, index, remove, add, true) + // addImplementation(this, index, remove, add, true) // } /** @@ -133,7 +133,7 @@ export class EditMap { * @param {Array} add * @returns {undefined} */ -function addImpl(editMap, at, remove, add) { +function addImplementation(editMap, at, remove, add) { let index = 0 /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */ diff --git a/dev/lib/syntax.js b/dev/lib/syntax.js index 13adba7..39ef3b0 100644 --- a/dev/lib/syntax.js +++ b/dev/lib/syntax.js @@ -819,8 +819,8 @@ function flushCell(map, context, range, rowKind, rowEnd, previousCell) { rowKind === 1 ? 'tableHeader' : rowKind === 2 - ? 'tableDelimiter' - : 'tableData' + ? 'tableDelimiter' + : 'tableData' // `markdown-rs` uses: // rowKind === 2 ? 'tableDelimiterCellValue' : 'tableCellText' const valueName = 'tableContent' diff --git a/package.json b/package.json index 5987446..476e2d8 100644 --- a/package.json +++ b/package.json @@ -46,21 +46,21 @@ }, "devDependencies": { "@types/node": "^20.0.0", - "c8": "^8.0.0", + "c8": "^10.0.0", "create-gfm-fixtures": "^1.0.0", "micromark": "^4.0.0", "micromark-build": "^2.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": "^10.0.0", "type-coverage": "^2.0.0", "typescript": "^5.0.0", - "xo": "^0.54.0" + "xo": "^0.58.0" }, "scripts": { "prepack": "npm run build && npm run format", "build": "tsc --build --clean && tsc --build && type-coverage && micromark-build", - "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", + "format": "remark . -qfo && prettier . -w --log-level 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", @@ -109,7 +109,8 @@ "rules": { "complexity": "off", "max-depth": "off", - "unicorn/no-this-assignment": "off" + "unicorn/no-this-assignment": "off", + "unicorn/prefer-string-replace-all": "off" } } } diff --git a/readme.md b/readme.md index 1f9c439..35e1e19 100644 --- a/readme.md +++ b/readme.md @@ -12,24 +12,24 @@ ## Contents -* [What is this?](#what-is-this) -* [When to use this](#when-to-use-this) -* [Install](#install) -* [Use](#use) -* [API](#api) - * [`gfmTable()`](#gfmtable) - * [`gfmTableHtml()`](#gfmtablehtml) -* [Bugs](#bugs) -* [Authoring](#authoring) -* [HTML](#html) -* [CSS](#css) -* [Syntax](#syntax) -* [Types](#types) -* [Compatibility](#compatibility) -* [Security](#security) -* [Related](#related) -* [Contribute](#contribute) -* [License](#license) +* [What is this?](#what-is-this) +* [When to use this](#when-to-use-this) +* [Install](#install) +* [Use](#use) +* [API](#api) + * [`gfmTable()`](#gfmtable) + * [`gfmTableHtml()`](#gfmtablehtml) +* [Bugs](#bugs) +* [Authoring](#authoring) +* [HTML](#html) +* [CSS](#css) +* [Syntax](#syntax) +* [Types](#types) +* [Compatibility](#compatibility) +* [Security](#security) +* [Related](#related) +* [Contribute](#contribute) +* [License](#license) ## What is this? @@ -136,8 +136,8 @@ GitHub’s own algorithm to parse tables contains a bug. This bug is not present in this project. The issue relating to tables is: -* [GFM tables: escaped escapes are incorrectly treated as - escapes](https://github.com/github/cmark-gfm/issues/277) +* [GFM tables: escaped escapes are incorrectly treated as + escapes](https://github.com/github/cmark-gfm/issues/277) ## Authoring @@ -407,14 +407,14 @@ This package is safe. ## Related -* [`micromark-extension-gfm`][micromark-extension-gfm] - — support all of GFM -* [`mdast-util-gfm-table`][mdast-util-gfm-table] - — support all of GFM in mdast -* [`mdast-util-gfm`][mdast-util-gfm] - — support all of GFM in mdast -* [`remark-gfm`][remark-gfm] - — support all of GFM in remark +* [`micromark-extension-gfm`][micromark-extension-gfm] + — support all of GFM +* [`mdast-util-gfm-table`][mdast-util-gfm-table] + — support all of GFM in mdast +* [`mdast-util-gfm`][mdast-util-gfm] + — support all of GFM in mdast +* [`remark-gfm`][remark-gfm] + — support all of GFM in remark ## Contribute diff --git a/test/index.js b/test/index.js index 742e9ae..9b5203b 100644 --- a/test/index.js +++ b/test/index.js @@ -339,14 +339,14 @@ test('markdown -> html (micromark)', async function (t) { await t.test( 'should not change how lists and lazyness work', async function () { - const doc = ' - d\n - e' + const document = ' - d\n - e' assert.deepEqual( - micromark(doc, { + micromark(document, { extensions: [gfmTable()], htmlExtensions: [gfmTableHtml()] }), - micromark(doc) + micromark(document) ) } )