This commit is contained in:
tamaina 2023-03-13 17:53:29 +00:00
parent eab3766db9
commit a36652c859
4 changed files with 12 additions and 25 deletions

View File

@ -1,6 +1,7 @@
Unreleased
4.0.0 / 2023-03-14
------------------
* oEmbed type=richの制限的なサポート
* プラグインの引数がWHATWG URLになりました
3.0.4 / 2023-02-12
------------------

View File

@ -51,11 +51,13 @@ npm run serve
``` typescript
interface IPlugin {
test: (url: URL.Url) => boolean;
summarize: (url: URL.Url) => Promise<Summary>;
test: (url: URL) => boolean;
summarize: (url: URL) => Promise<Summary>;
}
```
urls are WHATWG URL since v4.
### Returns
A Promise of an Object that contains properties below:
@ -127,12 +129,5 @@ License
----------------------------------------------------------------
[MIT](LICENSE)
[npm-link]: https://www.npmjs.com/package/summaly
[npm-badge]: https://img.shields.io/npm/v/summaly.svg?style=flat-square
[mit]: http://opensource.org/licenses/MIT
[mit-badge]: https://img.shields.io/badge/license-MIT-444444.svg?style=flat-square
[travis-link]: https://travis-ci.org/syuilo/summaly
[travis-badge]: http://img.shields.io/travis/syuilo/summaly.svg?style=flat-square
[himasaku]: https://himasaku.net
[himawari-badge]: https://img.shields.io/badge/%E5%8F%A4%E8%B0%B7-%E5%90%91%E6%97%A5%E8%91%B5-1684c5.svg?style=flat-square
[sakurako-badge]: https://img.shields.io/badge/%E5%A4%A7%E5%AE%A4-%E6%AB%BB%E5%AD%90-efb02a.svg?style=flat-square

View File

@ -1,6 +1,6 @@
{
"name": "summaly",
"version": "3.0.4",
"version": "4.0.0",
"description": "Get web page's summary",
"author": "syuilo <syuilotan@yahoo.co.jp>",
"license": "MIT",
@ -25,7 +25,6 @@
"@types/cheerio": "0.22.18",
"@types/debug": "4.1.7",
"@types/escape-regexp": "^0.0.1",
"@types/html-entities": "1.3.4",
"@types/node": "16.11.12",
"debug": "^4.3.4",
"fastify": "^4.13.0",
@ -34,9 +33,9 @@
"typescript": "4.5.3"
},
"dependencies": {
"cheerio": "^1.0.0-rc.12",
"cheerio": "1.0.0-rc.12",
"escape-regexp": "0.0.1",
"got": "^12.5.3",
"got": "^12.6.0",
"html-entities": "2.3.2",
"iconv-lite": "0.6.3",
"jschardet": "3.0.0",

14
pnpm-lock.yaml generated
View File

@ -7,14 +7,13 @@ specifiers:
'@types/cheerio': 0.22.18
'@types/debug': 4.1.7
'@types/escape-regexp': ^0.0.1
'@types/html-entities': 1.3.4
'@types/node': 16.11.12
cheerio: ^1.0.0-rc.12
cheerio: 1.0.0-rc.12
debug: ^4.3.4
escape-regexp: 0.0.1
fastify: ^4.13.0
fastify-cli: ^5.7.1
got: ^12.5.3
got: ^12.6.0
html-entities: 2.3.2
iconv-lite: 0.6.3
jest: ^29.4.2
@ -40,7 +39,6 @@ devDependencies:
'@types/cheerio': 0.22.18
'@types/debug': 4.1.7
'@types/escape-regexp': 0.0.1
'@types/html-entities': 1.3.4
'@types/node': 16.11.12
debug: 4.3.4
fastify: 4.14.1
@ -895,13 +893,6 @@ packages:
'@types/node': 16.11.12
dev: true
/@types/html-entities/1.3.4:
resolution: {integrity: sha512-Ut62LV90H9tgXwyhmfR8U6yCw/6xeo26IlsbAJJfqPomaqDN2zoLb2Z+cbmy5AycJFhwNJDdH0zqjQp7Ox/eXg==}
deprecated: This is a stub types definition. html-entities provides its own type definitions, so you do not need this installed.
dependencies:
html-entities: 2.3.2
dev: true
/@types/http-cache-semantics/4.0.1:
resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==}
dev: false
@ -1838,6 +1829,7 @@ packages:
/html-entities/2.3.2:
resolution: {integrity: sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==}
dev: false
/html-escaper/2.0.2:
resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==}