From 156f9f8b839692bffd3e4cba94df067f86f0cd74 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 8 Jul 2023 11:42:57 +0200 Subject: [PATCH 01/11] Update dev-dependencies --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index cc1ae71..edca339 100644 --- a/package.json +++ b/package.json @@ -41,15 +41,15 @@ "unist-util-visit": "^4.0.0" }, "devDependencies": { - "@types/node": "^18.0.0", - "c8": "^7.0.0", + "@types/node": "^20.0.0", + "c8": "^8.0.0", "mdast-util-from-markdown": "^1.0.0", "prettier": "^2.0.0", "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", "type-coverage": "^2.0.0", - "typescript": "^4.0.0", - "xo": "^0.53.0" + "typescript": "^5.0.0", + "xo": "^0.54.0" }, "scripts": { "prepack": "npm run build && npm run format", From 900cf9a8fa089288bb181dcd3c9ff7726c8a18b8 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 8 Jul 2023 11:45:10 +0200 Subject: [PATCH 02/11] Update `@types/mdast` --- lib/index.js | 7 ++----- package.json | 6 +++--- test.js | 38 ++++++++++++++++++++++---------------- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/lib/index.js b/lib/index.js index bc4853a..2ad1f1b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,12 +1,9 @@ /** - * @typedef {import('mdast').Root} Root - * @typedef {import('mdast').Content} Content + * @typedef {import('mdast').Nodes} Nodes * @typedef {import('mdast').Definition} Definition */ /** - * @typedef {Root | Content} Node - * * @callback GetDefinition * Get a definition by identifier. * @param {string | null | undefined} [identifier] @@ -25,7 +22,7 @@ const own = {}.hasOwnProperty * Uses CommonMark precedence, which means that earlier definitions are * preferred over duplicate later definitions. * - * @param {Node} tree + * @param {Nodes} tree * Tree to check. * @returns {GetDefinition} * Getter. diff --git a/package.json b/package.json index edca339..990e9b9 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,9 @@ "index.js" ], "dependencies": { - "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.0", - "unist-util-visit": "^4.0.0" + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "unist-util-visit": "^5.0.0" }, "devDependencies": { "@types/node": "^20.0.0", diff --git a/test.js b/test.js index ec76bc2..73990db 100644 --- a/test.js +++ b/test.js @@ -1,3 +1,7 @@ +/** + * @typedef {import('mdast').Root} Root + */ + import assert from 'node:assert/strict' import test from 'node:test' import {fromMarkdown} from 'mdast-util-from-markdown' @@ -21,9 +25,7 @@ test('definitions', () => { ) assert.deepEqual( - definitions(fromMarkdown('[example]: https://example.com "Example"'))( - 'example' - ), + definitions(from('[example]: https://example.com "Example"'))('example'), { type: 'definition', identifier: 'example', @@ -39,17 +41,13 @@ test('definitions', () => { ) assert.equal( - definitions(fromMarkdown('[example]: https://example.com "Example"'))( - 'foo' - ), + definitions(from('[example]: https://example.com "Example"'))('foo'), null, 'should return null when not found' ) assert.deepEqual( - definitions(fromMarkdown('[__proto__]: https://proto.com "Proto"'))( - '__proto__' - ), + definitions(from('[__proto__]: https://proto.com "Proto"'))('__proto__'), { type: 'definition', identifier: '__proto__', @@ -71,15 +69,13 @@ test('definitions', () => { /* eslint-enable no-use-extend-native/no-use-extend-native */ assert.deepEqual( - definitions(fromMarkdown('[__proto__]: https://proto.com "Proto"'))( - 'toString' - ), + definitions(from('[__proto__]: https://proto.com "Proto"'))('toString'), null, 'should work on weird identifiers when not found' ) const example = definitions( - fromMarkdown('[example]: https://one.com\n[example]: https://two.com') + from('[example]: https://one.com\n[example]: https://two.com') )('example') assert.deepEqual( @@ -89,10 +85,20 @@ test('definitions', () => { ) assert.deepEqual( - definitions( - fromMarkdown('[example]: https://one.com\n[example]: https://two.com') - )(''), + definitions(from('[example]: https://one.com\n[example]: https://two.com'))( + '' + ), null, 'should not return something for a missing identifier' ) }) + +/** + * + * @param {string} value + * @returns {Root} + */ +function from(value) { + // @ts-expect-error: To do: remove cast when `from-markdown` is released. + return fromMarkdown(value) +} From 182d90a0d726faf01acbdaca7b8e50d720e66aef Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 8 Jul 2023 11:46:08 +0200 Subject: [PATCH 03/11] Refactor `package.json`, `tsconfig.json` --- package.json | 19 ++++++++++--------- tsconfig.json | 10 ++++------ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 990e9b9..7cb6164 100644 --- a/package.json +++ b/package.json @@ -56,28 +56,29 @@ "build": "tsc --build --clean && tsc --build && type-coverage", "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", "test-api": "node --conditions development test.js", - "test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api", + "test-coverage": "c8 --100 --reporter lcov npm run test-api", "test": "npm run build && npm run format && npm run test-coverage" }, "prettier": { - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, "bracketSpacing": false, "semi": false, - "trailingComma": "none" - }, - "xo": { - "prettier": true + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "none", + "useTabs": false }, "remarkConfig": { "plugins": [ - "preset-wooorm" + "remark-preset-wooorm" ] }, "typeCoverage": { "atLeast": 100, "detail": true, + "ignoreCatch": true, "strict": true + }, + "xo": { + "prettier": true } } diff --git a/tsconfig.json b/tsconfig.json index ebe8889..870d82c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,17 +1,15 @@ { - "include": ["**/*.js"], - "exclude": ["coverage/", "node_modules/"], "compilerOptions": { "checkJs": true, + "customConditions": ["development"], "declaration": true, "emitDeclarationOnly": true, "exactOptionalPropertyTypes": true, - "forceConsistentCasingInFileNames": true, "lib": ["es2020"], "module": "node16", - "newLine": "lf", - "skipLibCheck": true, "strict": true, "target": "es2020" - } + }, + "exclude": ["coverage/", "node_modules/"], + "include": ["**/*.js"] } From ebc204da97a4a72558058875f7823936e64c659a Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 8 Jul 2023 11:47:52 +0200 Subject: [PATCH 04/11] Refactor `.npmrc` --- .npmrc | 2 +- lib/index.js | 4 +- test.js | 144 +++++++++++++++++++++++++++------------------------ 3 files changed, 80 insertions(+), 70 deletions(-) diff --git a/.npmrc b/.npmrc index 9951b11..3757b30 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,2 @@ -package-lock=false ignore-scripts=true +package-lock=false diff --git a/lib/index.js b/lib/index.js index 2ad1f1b..48c4f81 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,6 +1,6 @@ /** - * @typedef {import('mdast').Nodes} Nodes * @typedef {import('mdast').Definition} Definition + * @typedef {import('mdast').Nodes} Nodes */ /** @@ -35,7 +35,7 @@ export function definitions(tree) { throw new Error('mdast-util-definitions expected node') } - visit(tree, 'definition', (definition) => { + visit(tree, 'definition', function (definition) { const id = clean(definition.identifier) if (id && !own.call(cache, id)) { cache[id] = definition diff --git a/test.js b/test.js index 73990db..b7c2a85 100644 --- a/test.js +++ b/test.js @@ -8,88 +8,98 @@ import {fromMarkdown} from 'mdast-util-from-markdown' import {definitions} from './index.js' import * as mod from './index.js' -test('definitions', () => { - assert.deepEqual( - Object.keys(mod).sort(), - ['definitions'], - 'should expose the public api' - ) +test('definitions', async function (t) { + await t.test('should expose the public api', async function () { + assert.deepEqual(Object.keys(mod).sort(), ['definitions']) + }) - assert.throws( - () => { + await t.test('should fail without node', async function () { + assert.throws(function () { // @ts-expect-error runtime definitions() - }, - /mdast-util-definitions expected node/, - 'should fail without node' - ) + }, /mdast-util-definitions expected node/) + }) - assert.deepEqual( - definitions(from('[example]: https://example.com "Example"'))('example'), - { - type: 'definition', - identifier: 'example', - label: 'example', - title: 'Example', - url: 'https://example.com', - position: { - start: {line: 1, column: 1, offset: 0}, - end: {line: 1, column: 41, offset: 40} + await t.test('should return a definition', async function () { + assert.deepEqual( + definitions(from('[example]: https://example.com "Example"'))('example'), + { + type: 'definition', + identifier: 'example', + label: 'example', + title: 'Example', + url: 'https://example.com', + position: { + start: {line: 1, column: 1, offset: 0}, + end: {line: 1, column: 41, offset: 40} + } } - }, - 'should return a definition' - ) + ) + }) - assert.equal( - definitions(from('[example]: https://example.com "Example"'))('foo'), - null, - 'should return null when not found' - ) + await t.test('should return null when not found', async function () { + assert.equal( + definitions(from('[example]: https://example.com "Example"'))('foo'), + null + ) + }) - assert.deepEqual( - definitions(from('[__proto__]: https://proto.com "Proto"'))('__proto__'), - { - type: 'definition', - identifier: '__proto__', - label: '__proto__', - title: 'Proto', - url: 'https://proto.com', - position: { - start: {line: 1, column: 1, offset: 0}, - end: {line: 1, column: 39, offset: 38} + await t.test('should work on weird identifiers', async function () { + assert.deepEqual( + definitions(from('[__proto__]: https://proto.com "Proto"'))('__proto__'), + { + type: 'definition', + identifier: '__proto__', + label: '__proto__', + title: 'Proto', + url: 'https://proto.com', + position: { + start: {line: 1, column: 1, offset: 0}, + end: {line: 1, column: 39, offset: 38} + } } - }, - 'should work on weird identifiers' - ) + ) + }) - /* eslint-disable no-use-extend-native/no-use-extend-native */ - // @ts-expect-error: yes. - // type-coverage:ignore-next-line - assert.equal({}.type, undefined, 'should not polute the prototype') - /* eslint-enable no-use-extend-native/no-use-extend-native */ + await t.test('should not polute the prototype', async function () { + /* eslint-disable no-use-extend-native/no-use-extend-native */ + // @ts-expect-error: yes. + // type-coverage:ignore-next-line + assert.equal({}.type, undefined) + /* eslint-enable no-use-extend-native/no-use-extend-native */ + }) - assert.deepEqual( - definitions(from('[__proto__]: https://proto.com "Proto"'))('toString'), - null, - 'should work on weird identifiers when not found' + await t.test( + 'should work on weird identifiers when not found', + async function () { + assert.deepEqual( + definitions(from('[__proto__]: https://proto.com "Proto"'))('toString'), + null + ) + } ) - const example = definitions( - from('[example]: https://one.com\n[example]: https://two.com') - )('example') + await t.test( + 'should prefer the first of duplicate definitions', + async function () { + const example = definitions( + from('[example]: https://one.com\n[example]: https://two.com') + )('example') - assert.deepEqual( - example && example.url, - 'https://one.com', - 'should prefer the first of duplicate definitions' + assert.deepEqual(example && example.url, 'https://one.com') + } ) - assert.deepEqual( - definitions(from('[example]: https://one.com\n[example]: https://two.com'))( - '' - ), - null, - 'should not return something for a missing identifier' + await t.test( + 'should not return something for a missing identifier', + async function () { + assert.deepEqual( + definitions( + from('[example]: https://one.com\n[example]: https://two.com') + )(''), + null + ) + } ) }) From 770665b7a6386670a917033efb0c5a1e35b03b2a Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 8 Jul 2023 11:50:32 +0200 Subject: [PATCH 05/11] Refactor code-style --- lib/index.js | 2 +- test.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/index.js b/lib/index.js index 48c4f81..daf8718 100644 --- a/lib/index.js +++ b/lib/index.js @@ -7,7 +7,7 @@ * @callback GetDefinition * Get a definition by identifier. * @param {string | null | undefined} [identifier] - * Identifier of definition. + * Identifier of definition (optional). * @returns {Definition | null} * Definition corresponding to `identifier` or `null`. */ diff --git a/test.js b/test.js index b7c2a85..2f62d95 100644 --- a/test.js +++ b/test.js @@ -6,16 +6,17 @@ import assert from 'node:assert/strict' import test from 'node:test' import {fromMarkdown} from 'mdast-util-from-markdown' import {definitions} from './index.js' -import * as mod from './index.js' test('definitions', async function (t) { await t.test('should expose the public api', async function () { - assert.deepEqual(Object.keys(mod).sort(), ['definitions']) + assert.deepEqual(Object.keys(await import('./index.js')).sort(), [ + 'definitions' + ]) }) await t.test('should fail without node', async function () { assert.throws(function () { - // @ts-expect-error runtime + // @ts-expect-error: check that an error is thrown at runtime. definitions() }, /mdast-util-definitions expected node/) }) @@ -104,7 +105,6 @@ test('definitions', async function (t) { }) /** - * * @param {string} value * @returns {Root} */ From 4a93553161ee54f4c84c452579338d4342d83ef8 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 8 Jul 2023 11:51:20 +0200 Subject: [PATCH 06/11] Change to return `undefined`, not `null` --- lib/index.js | 4 ++-- readme.md | 4 ++-- test.js | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/index.js b/lib/index.js index daf8718..c4021d3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -8,7 +8,7 @@ * Get a definition by identifier. * @param {string | null | undefined} [identifier] * Identifier of definition (optional). - * @returns {Definition | null} + * @returns {Definition | undefined} * Definition corresponding to `identifier` or `null`. */ @@ -48,7 +48,7 @@ export function definitions(tree) { function definition(identifier) { const id = clean(identifier) // To do: next major: return `undefined` when not found. - return id && own.call(cache, id) ? cache[id] : null + return id && own.call(cache, id) ? cache[id] : undefined } } diff --git a/readme.md b/readme.md index 078c402..e249a0c 100644 --- a/readme.md +++ b/readme.md @@ -73,7 +73,7 @@ definition('example') // => {type: 'definition', 'title': 'Example', …} definition('foo') -// => null +// => undefined ``` ## API @@ -109,7 +109,7 @@ Get a definition by identifier (TypeScript type). ###### Returns Definition corresponding to `identifier` ([`Definition`][definition]) or -`null`. +`undefined`. ## Types diff --git a/test.js b/test.js index 2f62d95..9f9f76a 100644 --- a/test.js +++ b/test.js @@ -38,10 +38,10 @@ test('definitions', async function (t) { ) }) - await t.test('should return null when not found', async function () { + await t.test('should return `undefined` when not found', async function () { assert.equal( definitions(from('[example]: https://example.com "Example"'))('foo'), - null + undefined ) }) @@ -75,7 +75,7 @@ test('definitions', async function (t) { async function () { assert.deepEqual( definitions(from('[__proto__]: https://proto.com "Proto"'))('toString'), - null + undefined ) } ) @@ -98,7 +98,7 @@ test('definitions', async function (t) { definitions( from('[example]: https://one.com\n[example]: https://two.com') )(''), - null + undefined ) } ) From ad6a164efbe361beecc98ddf2644537ecdcba1a8 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 8 Jul 2023 11:52:42 +0200 Subject: [PATCH 07/11] Refactor to use `Map` --- lib/index.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/index.js b/lib/index.js index c4021d3..5171f3d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -14,8 +14,6 @@ import {visit} from 'unist-util-visit' -const own = {}.hasOwnProperty - /** * Find definitions in `tree`. * @@ -28,8 +26,8 @@ const own = {}.hasOwnProperty * Getter. */ export function definitions(tree) { - /** @type {Record} */ - const cache = Object.create(null) + /** @type {Map} */ + const cache = new Map() if (!tree || !tree.type) { throw new Error('mdast-util-definitions expected node') @@ -37,8 +35,8 @@ export function definitions(tree) { visit(tree, 'definition', function (definition) { const id = clean(definition.identifier) - if (id && !own.call(cache, id)) { - cache[id] = definition + if (id && !cache.get(id)) { + cache.set(id, definition) } }) @@ -47,8 +45,7 @@ export function definitions(tree) { /** @type {GetDefinition} */ function definition(identifier) { const id = clean(identifier) - // To do: next major: return `undefined` when not found. - return id && own.call(cache, id) ? cache[id] : undefined + return cache.get(id) } } From fba716f57a12d0af67a4c8cf0a6306716ccf274b Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 8 Jul 2023 11:53:52 +0200 Subject: [PATCH 08/11] Refactor docs --- readme.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index e249a0c..d8561de 100644 --- a/readme.md +++ b/readme.md @@ -39,7 +39,7 @@ It’s small and protects against prototype pollution. ## Install This package is [ESM only][esm]. -In Node.js (version 14.14+ and 16.0+), install with [npm][]: +In Node.js (version 16+), install with [npm][]: ```sh npm install mdast-util-definitions @@ -62,8 +62,8 @@ In browsers with [`esm.sh`][esmsh]: ## Use ```js -import {fromMarkdown} from 'mdast-util-from-markdown' import {definitions} from 'mdast-util-definitions' +import {fromMarkdown} from 'mdast-util-from-markdown' const tree = fromMarkdown('[example]: https://example.com "Example"') @@ -118,10 +118,13 @@ It exports the additional type [`GetDefinition`][api-getdefinition]. ## Compatibility -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 14.14+ and 16.0+. -Our projects sometimes work with older versions, but this is not guaranteed. + +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, +`mdast-util-definitions@^6`, compatible with Node.js 12. ## Security @@ -162,9 +165,9 @@ abide by its terms. [downloads]: https://www.npmjs.com/package/mdast-util-definitions -[size-badge]: https://img.shields.io/bundlephobia/minzip/mdast-util-definitions.svg +[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-definitions -[size]: https://bundlephobia.com/result?p=mdast-util-definitions +[size]: https://bundlejs.com/?q=mdast-util-definitions [sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg From 9e02a5b2c72019770205d1ee32b60ad19c4e4dc0 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 8 Jul 2023 11:54:35 +0200 Subject: [PATCH 09/11] Change to use `export` map --- package.json | 3 +-- test.js | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 7cb6164..874f1b4 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,7 @@ ], "sideEffects": false, "type": "module", - "main": "index.js", - "types": "index.d.ts", + "exports": "./index.js", "files": [ "lib/", "index.d.ts", diff --git a/test.js b/test.js index 9f9f76a..4291d3e 100644 --- a/test.js +++ b/test.js @@ -4,14 +4,15 @@ import assert from 'node:assert/strict' import test from 'node:test' +import {definitions} from 'mdast-util-definitions' import {fromMarkdown} from 'mdast-util-from-markdown' -import {definitions} from './index.js' test('definitions', async function (t) { await t.test('should expose the public api', async function () { - assert.deepEqual(Object.keys(await import('./index.js')).sort(), [ - 'definitions' - ]) + assert.deepEqual( + Object.keys(await import('mdast-util-definitions')).sort(), + ['definitions'] + ) }) await t.test('should fail without node', async function () { From 79d4d613bd3bceee5a48235d5f4d01d3945c2060 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 8 Jul 2023 11:54:57 +0200 Subject: [PATCH 10/11] Change to require Node.js 16 --- readme.md | 2 +- tsconfig.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index d8561de..a056791 100644 --- a/readme.md +++ b/readme.md @@ -124,7 +124,7 @@ versions of Node.js. 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, -`mdast-util-definitions@^6`, compatible with Node.js 12. +`mdast-util-definitions@^6`, compatible with Node.js 16. ## Security diff --git a/tsconfig.json b/tsconfig.json index 870d82c..82cc749 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,10 +5,10 @@ "declaration": true, "emitDeclarationOnly": true, "exactOptionalPropertyTypes": true, - "lib": ["es2020"], + "lib": ["es2022"], "module": "node16", "strict": true, - "target": "es2020" + "target": "es2022" }, "exclude": ["coverage/", "node_modules/"], "include": ["**/*.js"] From 9032189f17494e70675b38ba5eb3881b430d3a12 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 8 Jul 2023 11:56:15 +0200 Subject: [PATCH 11/11] 6.0.0 --- package.json | 2 +- readme.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 874f1b4..04c8cf4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mdast-util-definitions", - "version": "5.1.2", + "version": "6.0.0", "description": "mdast utility to find definition nodes in a tree", "license": "MIT", "keywords": [ diff --git a/readme.md b/readme.md index a056791..171a89a 100644 --- a/readme.md +++ b/readme.md @@ -48,14 +48,14 @@ npm install mdast-util-definitions In Deno with [`esm.sh`][esmsh]: ```js -import {definitions} from 'https://esm.sh/mdast-util-definitions@5' +import {definitions} from 'https://esm.sh/mdast-util-definitions@6' ``` In browsers with [`esm.sh`][esmsh]: ```html ```