retext-latin
Advanced tools
Comparing version 2.0.4 to 3.0.0
19
index.js
@@ -1,11 +0,16 @@ | ||
'use strict' | ||
/** | ||
* @typedef {import('unified').Plugin<[]>} Plugin | ||
*/ | ||
var unherit = require('unherit') | ||
var Latin = require('parse-latin') | ||
import {unherit} from 'unherit' | ||
// @ts-expect-error: untyped. | ||
import {ParseLatin as Parser} from 'parse-latin' | ||
module.exports = parse | ||
parse.Parser = Latin | ||
// Untyped. | ||
// type-coverage:ignore-next-line | ||
export {Parser} | ||
function parse() { | ||
this.Parser = unherit(Latin) | ||
/** @type {Plugin} */ | ||
export default function retextLatin() { | ||
Object.assign(this, {Parser: unherit(Parser)}) | ||
} |
{ | ||
"name": "retext-latin", | ||
"version": "2.0.4", | ||
"description": "retext parser for Latin-script natural languages", | ||
"version": "3.0.0", | ||
"description": "retext plugin to parse Latin-script prose", | ||
"license": "MIT", | ||
"keywords": [ | ||
"unified", | ||
"retext", | ||
"retext-plugin", | ||
"plugin", | ||
"natural", | ||
@@ -17,3 +21,3 @@ "language", | ||
"homepage": "https://github.com/retextjs/retext", | ||
"repository": "https://github.com/retextjs/retext/tree/master/packages/retext-latin", | ||
"repository": "https://github.com/retextjs/retext/tree/main/packages/retext-latin", | ||
"bugs": "https://github.com/retextjs/retext/issues", | ||
@@ -28,9 +32,25 @@ "funding": { | ||
], | ||
"sideEffects": false, | ||
"type": "module", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"files": [ | ||
"index.d.ts", | ||
"index.js" | ||
], | ||
"dependencies": { | ||
"parse-latin": "^4.0.0", | ||
"unherit": "^1.0.4" | ||
"parse-latin": "^5.0.0", | ||
"unherit": "^3.0.0", | ||
"unified": "^10.0.0" | ||
}, | ||
"scripts": { | ||
"build": "rimraf \"*.d.ts\" && tsc && type-coverage" | ||
}, | ||
"xo": false, | ||
"typeCoverage": { | ||
"atLeast": 100, | ||
"detail": true, | ||
"strict": true, | ||
"ignoreCatch": true | ||
} | ||
} |
120
readme.md
@@ -17,37 +17,52 @@ # retext-latin | ||
<!--lint ignore no-html maximum-line-length--> | ||
Support this effort and give back by sponsoring on [OpenCollective][collective]! | ||
<!--lint ignore no-html--> | ||
<table> | ||
<tr valign="top"> | ||
<td width="20%" align="center"> | ||
<a href="https://zeit.co"><img src="https://avatars1.githubusercontent.com/u/14985020?s=400&v=4"></a> | ||
<br><br>🥇 | ||
<a href="https://zeit.co">ZEIT</a> | ||
</td> | ||
<td width="20%" align="center"> | ||
<a href="https://www.gatsbyjs.org"><img src="https://avatars1.githubusercontent.com/u/12551863?s=400&v=4"></a> | ||
<br><br>🥇 | ||
<a href="https://www.gatsbyjs.org">Gatsby</a> | ||
</td> | ||
<td width="20%" align="center"> | ||
<a href="https://www.netlify.com"><img src="https://avatars1.githubusercontent.com/u/7892489?s=400&v=4"></a> | ||
<br><br>🥇 | ||
<a href="https://www.netlify.com">Netlify</a> | ||
</td> | ||
<td width="20%" align="center"> | ||
<a href="https://www.holloway.com"><img src="https://avatars1.githubusercontent.com/u/35904294?s=400&v=4"></a> | ||
<br><br> | ||
<a href="https://www.holloway.com">Holloway</a> | ||
</td> | ||
<td width="20%" align="center"> | ||
<br><br><br><br> | ||
<a href="https://opencollective.com/unified"><strong>You?</strong> | ||
</td> | ||
</tr> | ||
<tr valign="middle"> | ||
<td width="20%" align="center" colspan="2"> | ||
<a href="https://www.gatsbyjs.org">Gatsby</a> 🥇<br><br> | ||
<a href="https://www.gatsbyjs.org"><img src="https://avatars1.githubusercontent.com/u/12551863?s=256&v=4" width="128"></a> | ||
</td> | ||
<td width="20%" align="center" colspan="2"> | ||
<a href="https://vercel.com">Vercel</a> 🥇<br><br> | ||
<a href="https://vercel.com"><img src="https://avatars1.githubusercontent.com/u/14985020?s=256&v=4" width="128"></a> | ||
</td> | ||
<td width="20%" align="center" colspan="2"> | ||
<a href="https://www.netlify.com">Netlify</a><br><br> | ||
<!--OC has a sharper image--> | ||
<a href="https://www.netlify.com"><img src="https://images.opencollective.com/netlify/4087de2/logo/256.png" width="128"></a> | ||
</td> | ||
<td width="10%" align="center"> | ||
<a href="https://www.holloway.com">Holloway</a><br><br> | ||
<a href="https://www.holloway.com"><img src="https://avatars1.githubusercontent.com/u/35904294?s=128&v=4" width="64"></a> | ||
</td> | ||
<td width="10%" align="center"> | ||
<a href="https://themeisle.com">ThemeIsle</a><br><br> | ||
<a href="https://themeisle.com"><img src="https://avatars1.githubusercontent.com/u/58979018?s=128&v=4" width="64"></a> | ||
</td> | ||
<td width="10%" align="center"> | ||
<a href="https://boosthub.io">Boost Hub</a><br><br> | ||
<a href="https://boosthub.io"><img src="https://images.opencollective.com/boosthub/6318083/logo/128.png" width="64"></a> | ||
</td> | ||
<td width="10%" align="center"> | ||
<a href="https://expo.io">Expo</a><br><br> | ||
<a href="https://expo.io"><img src="https://avatars1.githubusercontent.com/u/12504344?s=128&v=4" width="64"></a> | ||
</td> | ||
</tr> | ||
<tr valign="middle"> | ||
<td width="100%" align="center" colspan="10"> | ||
<br> | ||
<a href="https://opencollective.com/unified"><strong>You?</strong></a> | ||
<br><br> | ||
</td> | ||
</tr> | ||
</table> | ||
[**Read more about the unified collective on Medium »**][announcement] | ||
## Install | ||
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. | ||
[npm][]: | ||
@@ -62,12 +77,12 @@ | ||
```js | ||
var unified = require('unified') | ||
var stream = require('unified-stream') | ||
var latin = require('retext-latin') | ||
var stringify = require('retext-stringify') | ||
var emoji = require('retext-emoji') | ||
import {unified} from 'unified' | ||
import {stream} from 'unified-stream' | ||
import retextLatin from 'retext-latin' | ||
import retextStringify from 'retext-stringify' | ||
import retextEmoji from 'retext-emoji' | ||
var processor = unified() | ||
.use(latin) | ||
.use(emoji, {convert: 'encode'}) | ||
.use(stringify) | ||
const processor = unified() | ||
.use(retextLatin) | ||
.use(retextEmoji, {convert: 'encode'}) | ||
.use(retextStringify) | ||
@@ -79,8 +94,11 @@ process.stdin.pipe(stream(processor)).pipe(process.stdout) | ||
### `processor.use(latin)` | ||
This package exports the following identifiers: `Parser`. | ||
`retextLatin` is the default export. | ||
### `unified().use(retextLatin)` | ||
Parse Latin-script natural language. | ||
There is no configuration for the parser. | ||
### `latin.Parser` | ||
### `Parser` | ||
@@ -99,4 +117,4 @@ Access to the [parser][] ([`parse-latin`][parse-latin]). | ||
This project has a [Code of Conduct][coc]. | ||
By interacting with this repository, organisation, or community you agree to | ||
This project has a [code of conduct][coc]. | ||
By interacting with this repository, organization, or community you agree to | ||
abide by its terms. | ||
@@ -110,5 +128,5 @@ | ||
[build-badge]: https://img.shields.io/travis/retextjs/retext/master.svg | ||
[build-badge]: https://github.com/retextjs/retext/workflows/main/badge.svg | ||
[build]: https://travis-ci.org/retextjs/retext | ||
[build]: https://github.com/retextjs/retext/actions | ||
@@ -133,13 +151,13 @@ [coverage-badge]: https://img.shields.io/codecov/c/github/retextjs/retext.svg | ||
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg | ||
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg | ||
[chat]: https://spectrum.chat/unified/retext | ||
[chat]: https://github.com/retextjs/retext/discussions | ||
[health]: https://github.com/retextjs/.github | ||
[contributing]: https://github.com/retextjs/.github/blob/master/contributing.md | ||
[contributing]: https://github.com/retextjs/.github/blob/main/contributing.md | ||
[support]: https://github.com/retextjs/.github/blob/master/support.md | ||
[support]: https://github.com/retextjs/.github/blob/main/support.md | ||
[coc]: https://github.com/retextjs/.github/blob/master/code-of-conduct.md | ||
[coc]: https://github.com/retextjs/.github/blob/main/code-of-conduct.md | ||
@@ -150,3 +168,3 @@ [ideas]: https://github.com/retextjs/ideas | ||
[license]: https://github.com/retextjs/retext/blob/master/license | ||
[license]: https://github.com/retextjs/retext/blob/main/license | ||
@@ -166,3 +184,1 @@ [author]: https://wooorm.com | ||
[parse-latin]: https://github.com/wooorm/parse-latin | ||
[announcement]: https://medium.com/unifiedjs/collectively-evolving-through-crowdsourcing-22c359ea95cc |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
7152
4
17
177
0
Yes
3
+ Addedunified@^10.0.0
+ Added@types/nlcst@1.0.4(transitive)
+ Added@types/unist@2.0.11(transitive)
+ Addedarray-iterate@2.0.1(transitive)
+ Addedbail@2.0.2(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedis-buffer@2.0.5(transitive)
+ Addedis-plain-obj@4.1.0(transitive)
+ Addednlcst-to-string@3.1.1(transitive)
+ Addedparse-latin@5.0.1(transitive)
+ Addedtrough@2.2.0(transitive)
+ Addedunherit@3.0.1(transitive)
+ Addedunified@10.1.2(transitive)
+ Addedunist-util-modify-children@3.1.1(transitive)
+ Addedunist-util-stringify-position@3.0.3(transitive)
+ Addedunist-util-visit-children@2.0.2(transitive)
+ Addedvfile@5.3.7(transitive)
+ Addedvfile-message@3.1.4(transitive)
- Removedarray-iterate@1.1.4(transitive)
- Removedinherits@2.0.4(transitive)
- Removednlcst-to-string@2.0.4(transitive)
- Removedparse-latin@4.3.0(transitive)
- Removedunherit@1.1.3(transitive)
- Removedunist-util-modify-children@2.0.0(transitive)
- Removedunist-util-visit-children@1.1.4(transitive)
- Removedxtend@4.0.2(transitive)
Updatedparse-latin@^5.0.0
Updatedunherit@^3.0.0