diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a84287e..522556d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,5 +17,5 @@ jobs: strategy: matrix: node: - - lts/erbium - - '*' + - lts/fermium + - lts/gallium diff --git a/cli.js b/cli.js index 214946b..3c1b59c 100755 --- a/cli.js +++ b/cli.js @@ -23,7 +23,7 @@ import {filter} from './filter.js' /** @type {import('type-fest').PackageJson} */ const pack = JSON.parse( - String(fs.readFileSync(new URL('./package.json', import.meta.url))) + String(fs.readFileSync(new URL('package.json', import.meta.url))) ) const textExtensions = [ @@ -147,7 +147,6 @@ function transform(options = {}) { ] if (cli.flags.html) { - // @ts-expect-error: types are having a hard time for bridges. plugins = [rehypeParse, [rehypeRetext, unified().use({plugins})]] } else if (cli.flags.mdx) { // @ts-expect-error: types are having a hard time for bridges. diff --git a/package.json b/package.json index 327f0bd..92c2625 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alex", - "version": "10.0.0", + "version": "11.0.0", "description": "Catch insensitive, inconsiderate writing", "license": "MIT", "repository": "https://github.com/get-alex/alex", @@ -69,40 +69,40 @@ "dependencies": { "@types/mdast": "^3.0.0", "@types/nlcst": "^1.0.0", - "meow": "^10.0.0", + "meow": "^11.0.0", "rehype-parse": "^8.0.0", "rehype-retext": "^3.0.0", "remark-frontmatter": "^4.0.0", "remark-gfm": "^3.0.0", - "remark-mdx": "2.0.0-rc.1", + "remark-mdx": "2.0.0", "remark-message-control": "^7.0.0", "remark-parse": "^10.0.0", "remark-retext": "^5.0.0", "retext-english": "^4.0.0", - "retext-equality": "~6.3.0", - "retext-profanities": "~7.1.0", + "retext-equality": "~6.6.0", + "retext-profanities": "~7.2.0", "unified": "^10.0.0", "unified-diff": "^4.0.0", - "unified-engine": "^9.0.0", - "update-notifier": "^5.0.0", + "unified-engine": "^10.0.0", + "update-notifier": "^6.0.0", "vfile": "^5.0.0", "vfile-reporter": "^7.0.0", "vfile-sort": "^3.0.0" }, "devDependencies": { "@types/tape": "^4.0.0", - "@types/update-notifier": "^5.0.0", + "@types/update-notifier": "^6.0.0", "c8": "^7.10.0", "prettier": "^2.0.0", - "remark-cli": "^10.0.0", + "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", "rimraf": "^3.0.0", "tape": "^5.0.0", "type-coverage": "^2.0.0", - "type-fest": "^2.0.0", + "type-fest": "^3.0.0", "typescript": "^4.0.0", "vfile-reporter-json": "^3.0.0", - "xo": "^0.45.0" + "xo": "^0.52.0" }, "scripts": { "build": "rimraf \"test/**/*.d.ts\" \"*.d.ts\" && tsc && type-coverage", diff --git a/readme.md b/readme.md index f2012ee..9a4091a 100644 --- a/readme.md +++ b/readme.md @@ -13,8 +13,7 @@ [![First timers friendly][first-timers-badge]][first-timers] Whether your own or someone else’s writing, **alex** helps you find gender -favoring, polarizing, race related, religion inconsiderate, or other **unequal** -phrasing in text. +favoring, polarizing, race related, or other **unequal** phrasing in text. For example, when `We’ve confirmed his identity` is given, **alex** will warn you and suggest using `their` instead of `his`. @@ -101,7 +100,6 @@ like][literals] are not warned about. ## Integrations -* Atom — [`get-alex/atom-linter-alex`](https://github.com/get-alex/atom-linter-alex) * Sublime — [`sindresorhus/SublimeLinter-contrib-alex`](https://github.com/sindresorhus/SublimeLinter-contrib-alex) * Gulp — [`dustinspecker/gulp-alex`](https://github.com/dustinspecker/gulp-alex) * Slack — [`keoghpe/alex-slack`](https://github.com/keoghpe/alex-slack) @@ -319,7 +317,7 @@ See `$ alex --help` for more information. ## API This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c): -Node 12+ is needed to use it and it must be `import`ed instead of `require`d. +Node 14+ is needed to use it and it must be `import`ed instead of `require`d. [npm][]: diff --git a/test/api.js b/test/api.js index e3cfbb5..8e0c362 100644 --- a/test/api.js +++ b/test/api.js @@ -4,9 +4,9 @@ import test from 'tape' import alex, {markdown, mdx, text, html} from '../index.js' const threeHtml = fs.readFileSync( - new URL('./fixtures/three.html', import.meta.url) + new URL('fixtures/three.html', import.meta.url) ) -const fourMdx = fs.readFileSync(new URL('./fixtures/four.mdx', import.meta.url)) +const fourMdx = fs.readFileSync(new URL('fixtures/four.mdx', import.meta.url)) // Tests. Note that these are small because alex is in fact // just a collection of well-tested modules. @@ -24,9 +24,10 @@ test('alex()', function (t) { ].join('\n') ).messages.map(String), [ - '1:44-1:50: `master` may be insensitive, use `primary`, `hub`, `reference` instead', + '1:44-1:50: `master` may be insensitive, use `primary`, `lead`, `hub`, `reference` instead', + '2:5-2:11: `slaves` may be insensitive, use `secondaries`, `workers`, `replicas`, `nodes` instead', '2:5-2:11: Don’t use `slaves`, it’s profane', - '2:37-2:43: `master` may be insensitive, use `primary`, `hub`, `reference` instead', + '2:37-2:43: `master` may be insensitive, use `primary`, `lead`, `hub`, `reference` instead', '3:1-3:3: `he` may be insensitive, use `they`, `it` instead', '3:11-3:18: `cripple` may be insensitive, use `person with a limp` instead', '5:36-5:40: Be careful with `butt`, it’s profane in some cases' @@ -131,9 +132,10 @@ test('alex()', function (t) { ).messages.map(String), [ '1:6-1:15: `boogeyman` may be insensitive, use `boogeymonster` instead', - '1:44-1:50: `master` may be insensitive, use `primary`, `hub`, `reference` instead', + '1:44-1:50: `master` may be insensitive, use `primary`, `lead`, `hub`, `reference` instead', + '2:5-2:11: `slaves` may be insensitive, use `secondaries`, `workers`, `replicas`, `nodes` instead', '2:5-2:11: Don’t use `slaves`, it’s profane', - '2:37-2:43: `master` may be insensitive, use `primary`, `hub`, `reference` instead', + '2:37-2:43: `master` may be insensitive, use `primary`, `lead`, `hub`, `reference` instead', '3:1-3:3: `he` may be insensitive, use `they`, `it` instead', '3:11-3:18: `cripple` may be insensitive, use `person with a limp` instead', '5:36-5:40: Be careful with `butt`, it’s profane in some cases'