From 3acbf0214b24618d863ab165a7be7694d3136b17 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 23 Apr 2024 18:11:01 +0200 Subject: [PATCH] Update dev-dependencies --- .github/workflows/main.yml | 6 +- doc/plugins.md | 128 ++++++++++++++-------------- package.json | 8 +- packages/retext-dutch/readme.md | 24 +++--- packages/retext-english/readme.md | 24 +++--- packages/retext-latin/readme.md | 24 +++--- packages/retext-stringify/readme.md | 24 +++--- packages/retext/readme.md | 24 +++--- readme.md | 56 ++++++------ test.js | 7 +- 10 files changed, 162 insertions(+), 163 deletions(-) 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/doc/plugins.md b/doc/plugins.md index 840bfdd..f7c0a5e 100644 --- a/doc/plugins.md +++ b/doc/plugins.md @@ -8,10 +8,10 @@ This page lists existing plugins. ## Contents -* [List of plugins](#list-of-plugins) -* [List of utilities](#list-of-utilities) -* [Using plugins](#using-plugins) -* [Creating plugins](#creating-plugins) +* [List of plugins](#list-of-plugins) +* [List of utilities](#list-of-utilities) +* [Using plugins](#using-plugins) +* [Creating plugins](#creating-plugins) ## List of plugins @@ -22,66 +22,66 @@ More plugins can be found on GitHub tagged with the The list of plugins: -* [`retext-assuming`](https://github.com/davidhund/retext-assuming) - — check for unhelpful phrases such as `just`, `simply`, `obviously` -* [`retext-case-police`](https://github.com/JulianCataldo/retext-case-police) - — check for popular names casing (`github` → `GitHub`) -* [`retext-cliches`](https://github.com/dunckr/retext-cliches) - — check phrases for cliches -* [`retext-contractions`](https://github.com/retextjs/retext-contractions) - — check apostrophe use in contractions -* [`retext-diacritics`](https://github.com/retextjs/retext-diacritics) - — check for proper use of diacritics -* [`retext-dutch`](https://github.com/retextjs/retext/tree/main/packages/retext-dutch) - — dutch language support -* [`retext-english`](https://github.com/retextjs/retext/tree/main/packages/retext-english) - — English language support -* [`retext-emoji`](https://github.com/retextjs/retext-emoji) - — encode or decode [gemoji](https://github.com/github/gemoji) -* [`retext-equality`](https://github.com/retextjs/retext-equality) - — warn about possible insensitive, inconsiderate language -* [`retext-indefinite-article`](https://github.com/retextjs/retext-indefinite-article) - — check if indefinite articles (`a`, `an`) are used correctly -* [`retext-intensify`](https://github.com/retextjs/retext-intensify) - — check for weak and mitigating wording -* [`retext-keywords`](https://github.com/retextjs/retext-keywords) - — extract keywords and keyphrases -* [`retext-latin`](https://github.com/retextjs/retext/tree/main/packages/retext-latin) - — Latin-script language support -* [`retext-lexrank`](https://github.com/gorango/retext-lexrank) - — add Lexrank scores to sentences -* [`retext-overuse`](https://github.com/dunckr/retext-overuse) - — check words for overuse -* [`retext-passive`](https://github.com/retextjs/retext-passive) - — check for passive voice -* [`retext-profanities`](https://github.com/retextjs/retext-profanities) - — check profane and vulgar wording -* [`retext-readability`](https://github.com/retextjs/retext-readability) - — check readability -* [`retext-redundant-acronyms`](https://github.com/retextjs/retext-redundant-acronyms) - — check redundant acronyms (`ATM machine` > `ATM`) -* [`retext-repeated-words`](https://github.com/retextjs/retext-repeated-words) - — check `for for` repeated words -* [`retext-sentence-spacing`](https://github.com/retextjs/retext-sentence-spacing) - — check spacing between sentences -* [`retext-sentiment`](https://github.com/retextjs/retext-sentiment) - — detect sentiment in text -* [`retext-simplify`](https://github.com/retextjs/retext-simplify) - — check phrases for simpler alternatives -* [`retext-smartypants`](https://github.com/retextjs/retext-smartypants) - — implementation of [SmartyPants](https://daringfireball.net/projects/smartypants/) -* [`retext-spell`](https://github.com/retextjs/retext-spell) - — check spelling -* [`retext-stringify`](https://github.com/retextjs/retext/tree/main/packages/retext-stringify) - — serialize back to text -* [`retext-syntax-mentions`](https://github.com/retextjs/retext-syntax-mentions) - — classify `@mentions` as syntax -* [`retext-syntax-urls`](https://github.com/retextjs/retext-syntax-urls) - — classify url-like values (example.com, example.md, etc) as syntax -* [`retext-usage`](https://github.com/admhlt/retext-usage) - — check incorrect English usage -* [`retext-quotes`](https://github.com/retextjs/retext-quotes) - — check quote and apostrophe usage +* [`retext-assuming`](https://github.com/davidhund/retext-assuming) + — check for unhelpful phrases such as `just`, `simply`, `obviously` +* [`retext-case-police`](https://github.com/JulianCataldo/retext-case-police) + — check for popular names casing (`github` → `GitHub`) +* [`retext-cliches`](https://github.com/dunckr/retext-cliches) + — check phrases for cliches +* [`retext-contractions`](https://github.com/retextjs/retext-contractions) + — check apostrophe use in contractions +* [`retext-diacritics`](https://github.com/retextjs/retext-diacritics) + — check for proper use of diacritics +* [`retext-dutch`](https://github.com/retextjs/retext/tree/main/packages/retext-dutch) + — dutch language support +* [`retext-english`](https://github.com/retextjs/retext/tree/main/packages/retext-english) + — English language support +* [`retext-emoji`](https://github.com/retextjs/retext-emoji) + — encode or decode [gemoji](https://github.com/github/gemoji) +* [`retext-equality`](https://github.com/retextjs/retext-equality) + — warn about possible insensitive, inconsiderate language +* [`retext-indefinite-article`](https://github.com/retextjs/retext-indefinite-article) + — check if indefinite articles (`a`, `an`) are used correctly +* [`retext-intensify`](https://github.com/retextjs/retext-intensify) + — check for weak and mitigating wording +* [`retext-keywords`](https://github.com/retextjs/retext-keywords) + — extract keywords and keyphrases +* [`retext-latin`](https://github.com/retextjs/retext/tree/main/packages/retext-latin) + — Latin-script language support +* [`retext-lexrank`](https://github.com/gorango/retext-lexrank) + — add Lexrank scores to sentences +* [`retext-overuse`](https://github.com/dunckr/retext-overuse) + — check words for overuse +* [`retext-passive`](https://github.com/retextjs/retext-passive) + — check for passive voice +* [`retext-profanities`](https://github.com/retextjs/retext-profanities) + — check profane and vulgar wording +* [`retext-readability`](https://github.com/retextjs/retext-readability) + — check readability +* [`retext-redundant-acronyms`](https://github.com/retextjs/retext-redundant-acronyms) + — check redundant acronyms (`ATM machine` > `ATM`) +* [`retext-repeated-words`](https://github.com/retextjs/retext-repeated-words) + — check `for for` repeated words +* [`retext-sentence-spacing`](https://github.com/retextjs/retext-sentence-spacing) + — check spacing between sentences +* [`retext-sentiment`](https://github.com/retextjs/retext-sentiment) + — detect sentiment in text +* [`retext-simplify`](https://github.com/retextjs/retext-simplify) + — check phrases for simpler alternatives +* [`retext-smartypants`](https://github.com/retextjs/retext-smartypants) + — implementation of [SmartyPants](https://daringfireball.net/projects/smartypants/) +* [`retext-spell`](https://github.com/retextjs/retext-spell) + — check spelling +* [`retext-stringify`](https://github.com/retextjs/retext/tree/main/packages/retext-stringify) + — serialize back to text +* [`retext-syntax-mentions`](https://github.com/retextjs/retext-syntax-mentions) + — classify `@mentions` as syntax +* [`retext-syntax-urls`](https://github.com/retextjs/retext-syntax-urls) + — classify url-like values (example.com, example.md, etc) as syntax +* [`retext-usage`](https://github.com/admhlt/retext-usage) + — check incorrect English usage +* [`retext-quotes`](https://github.com/retextjs/retext-quotes) + — check quote and apostrophe usage ## List of utilities diff --git a/package.json b/package.json index 24f3baf..784b516 100644 --- a/package.json +++ b/package.json @@ -18,17 +18,17 @@ ], "devDependencies": { "@types/node": "^20.0.0", - "c8": "^8.0.0", + "c8": "^9.0.0", "nlcst-emoji-modifier": "^6.0.0", "nlcst-test": "^4.0.0", "prettier": "^3.0.0", - "remark-cli": "^11.0.0", - "remark-preset-wooorm": "^9.0.0", + "remark-cli": "^12.0.0", + "remark-preset-wooorm": "^10.0.0", "type-coverage": "^2.0.0", "typescript": "^5.0.0", "unified": "^11.0.0", "unist-util-remove-position": "^5.0.0", - "xo": "^0.56.0" + "xo": "^0.58.0" }, "scripts": { "build": "tsc --build --clean && tsc --build && type-coverage", diff --git a/packages/retext-dutch/readme.md b/packages/retext-dutch/readme.md index c1c2f61..be45f9a 100644 --- a/packages/retext-dutch/readme.md +++ b/packages/retext-dutch/readme.md @@ -12,18 +12,18 @@ ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Install](#install) -* [Use](#use) -* [API](#api) - * [`unified().use(retextDutch)`](#unifieduseretextdutch) -* [Syntax tree](#syntax-tree) -* [Types](#types) -* [Compatibility](#compatibility) -* [Contribute](#contribute) -* [Sponsor](#sponsor) -* [License](#license) +* [What is this?](#what-is-this) +* [When should I use this?](#when-should-i-use-this) +* [Install](#install) +* [Use](#use) +* [API](#api) + * [`unified().use(retextDutch)`](#unifieduseretextdutch) +* [Syntax tree](#syntax-tree) +* [Types](#types) +* [Compatibility](#compatibility) +* [Contribute](#contribute) +* [Sponsor](#sponsor) +* [License](#license) ## What is this? diff --git a/packages/retext-english/readme.md b/packages/retext-english/readme.md index 27d52b3..45b4247 100644 --- a/packages/retext-english/readme.md +++ b/packages/retext-english/readme.md @@ -12,18 +12,18 @@ ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Install](#install) -* [Use](#use) -* [API](#api) - * [`unified().use(retextEnglish)`](#unifieduseretextenglish) -* [Syntax tree](#syntax-tree) -* [Types](#types) -* [Compatibility](#compatibility) -* [Contribute](#contribute) -* [Sponsor](#sponsor) -* [License](#license) +* [What is this?](#what-is-this) +* [When should I use this?](#when-should-i-use-this) +* [Install](#install) +* [Use](#use) +* [API](#api) + * [`unified().use(retextEnglish)`](#unifieduseretextenglish) +* [Syntax tree](#syntax-tree) +* [Types](#types) +* [Compatibility](#compatibility) +* [Contribute](#contribute) +* [Sponsor](#sponsor) +* [License](#license) ## What is this? diff --git a/packages/retext-latin/readme.md b/packages/retext-latin/readme.md index c64c070..f1ab588 100644 --- a/packages/retext-latin/readme.md +++ b/packages/retext-latin/readme.md @@ -12,18 +12,18 @@ ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Install](#install) -* [Use](#use) -* [API](#api) - * [`unified().use(retextLatin)`](#unifieduseretextlatin) -* [Syntax tree](#syntax-tree) -* [Types](#types) -* [Compatibility](#compatibility) -* [Contribute](#contribute) -* [Sponsor](#sponsor) -* [License](#license) +* [What is this?](#what-is-this) +* [When should I use this?](#when-should-i-use-this) +* [Install](#install) +* [Use](#use) +* [API](#api) + * [`unified().use(retextLatin)`](#unifieduseretextlatin) +* [Syntax tree](#syntax-tree) +* [Types](#types) +* [Compatibility](#compatibility) +* [Contribute](#contribute) +* [Sponsor](#sponsor) +* [License](#license) ## What is this? diff --git a/packages/retext-stringify/readme.md b/packages/retext-stringify/readme.md index f473674..efd34ff 100644 --- a/packages/retext-stringify/readme.md +++ b/packages/retext-stringify/readme.md @@ -12,18 +12,18 @@ ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Install](#install) -* [Use](#use) -* [API](#api) - * [`unified().use(retextStringify)`](#unifieduseretextstringify) -* [Syntax tree](#syntax-tree) -* [Types](#types) -* [Compatibility](#compatibility) -* [Contribute](#contribute) -* [Sponsor](#sponsor) -* [License](#license) +* [What is this?](#what-is-this) +* [When should I use this?](#when-should-i-use-this) +* [Install](#install) +* [Use](#use) +* [API](#api) + * [`unified().use(retextStringify)`](#unifieduseretextstringify) +* [Syntax tree](#syntax-tree) +* [Types](#types) +* [Compatibility](#compatibility) +* [Contribute](#contribute) +* [Sponsor](#sponsor) +* [License](#license) ## What is this? diff --git a/packages/retext/readme.md b/packages/retext/readme.md index 04d361c..08ddd6e 100644 --- a/packages/retext/readme.md +++ b/packages/retext/readme.md @@ -13,18 +13,18 @@ Latin-script natural language. ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Install](#install) -* [Use](#use) -* [API](#api) - * [`retext()`](#retext-1) -* [Syntax tree](#syntax-tree) -* [Types](#types) -* [Compatibility](#compatibility) -* [Contribute](#contribute) -* [Sponsor](#sponsor) -* [License](#license) +* [What is this?](#what-is-this) +* [When should I use this?](#when-should-i-use-this) +* [Install](#install) +* [Use](#use) +* [API](#api) + * [`retext()`](#retext-1) +* [Syntax tree](#syntax-tree) +* [Types](#types) +* [Compatibility](#compatibility) +* [Contribute](#contribute) +* [Sponsor](#sponsor) +* [License](#license) ## What is this? diff --git a/readme.md b/readme.md index 02ab11d..423df09 100644 --- a/readme.md +++ b/readme.md @@ -24,21 +24,21 @@ Some example use cases are to [check spelling][retext-spell], [fix typography][retext-smartypants], or [make sure text is readable][retext-readability]. -* for more about us, see [`unifiedjs.com`][site] -* for updates, see [Twitter][] -* for questions, see [support][] -* to help, see [contribute][] or [sponsor][] below +* for more about us, see [`unifiedjs.com`][site] +* for updates, see [Twitter][] +* for questions, see [support][] +* to help, see [contribute][] or [sponsor][] below ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Plugins](#plugins) -* [Types](#types) -* [Compatibility](#compatibility) -* [Contribute](#contribute) -* [Sponsor](#sponsor) -* [License](#license) +* [What is this?](#what-is-this) +* [When should I use this?](#when-should-i-use-this) +* [Plugins](#plugins) +* [Types](#types) +* [Compatibility](#compatibility) +* [Contribute](#contribute) +* [Sponsor](#sponsor) +* [License](#license) ## What is this? @@ -118,16 +118,16 @@ You can use retext for many different things. This GitHub repository is a monorepo that contains the following packages: -* [`retext-dutch`][retext-dutch] - — parse Dutch prose to a syntax tree -* [`retext-english`][retext-english] - — parse English prose to a syntax tree -* [`retext-latin`][retext-latin] - — parse any Latin-script prose to a syntax tree -* [`retext-stringify`][retext-stringify] - — serialize a syntax tree -* [`retext`][api] - — programmatic interface with both `retext-latin` and `retext-stringify` +* [`retext-dutch`][retext-dutch] + — parse Dutch prose to a syntax tree +* [`retext-english`][retext-english] + — parse English prose to a syntax tree +* [`retext-latin`][retext-latin] + — parse any Latin-script prose to a syntax tree +* [`retext-stringify`][retext-stringify] + — serialize a syntax tree +* [`retext`][api] + — programmatic interface with both `retext-latin` and `retext-stringify` ## When should I use this? @@ -141,12 +141,12 @@ retext plugins deal with natural language. You can choose from the many plugins that already exist. Here are three good ways to find plugins: -* [`awesome-retext`][awesome-retext] - — selection of the most awesome projects -* [List of plugins][list-of-plugins] - — list of all plugins -* [`retext-plugin` topic][topic] - — any tagged repo on GitHub +* [`awesome-retext`][awesome-retext] + — selection of the most awesome projects +* [List of plugins][list-of-plugins] + — list of all plugins +* [`retext-plugin` topic][topic] + — any tagged repo on GitHub Some plugins are maintained by us here in the `@retextjs` organization while others are maintained by folks elsewhere. diff --git a/test.js b/test.js index 92843c1..b6ba7f2 100644 --- a/test.js +++ b/test.js @@ -86,14 +86,13 @@ async function eachParser(name) { await test(id, async function (t) { /** @type {{default: import('unified').Plugin<[], string, Root>}} */ - // type-coverage:ignore-next-line - const mod = await import(id) + const result = await import(id) await t.test('should expose the public api', async function () { - assert.deepEqual(Object.keys(mod).sort(), ['default']) + assert.deepEqual(Object.keys(result).sort(), ['default']) }) - const processor = unified().use(mod.default) + const processor = unified().use(result.default) await t.test('should parse', async function () { const tree = processor.parse('Alfred')