Comparing version 3.1.0 to 4.0.0
{ | ||
"name": "tweet.md", | ||
"version": "3.1.0", | ||
"version": "4.0.0", | ||
"description": "Render tweet to markdown", | ||
"main": "index.js", | ||
"module": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"examples": "node examples.js", | ||
"examples": "ts-node examples.ts && npx prettier --write README.md", | ||
"preversion": "npm run examples", | ||
"prepublish": "npm run test && npm run examples", | ||
"prepublish": "npm run test && npm run examples && npm run build", | ||
"build": "parcel build --no-content-hash --no-cache src/index.ts --detailed-report", | ||
"coverage": "jest --coverage", | ||
@@ -15,3 +17,3 @@ "test": "jest", | ||
"files": [ | ||
"index.js" | ||
"dist/*" | ||
], | ||
@@ -35,12 +37,39 @@ "keywords": [ | ||
"license": "MIT", | ||
"lint-staged": { | ||
"*": "prettier --write --ignore-unknown" | ||
}, | ||
"devDependencies": { | ||
"coveralls": "^3.1.0", | ||
"@parcel/config-default": "^2.11.0", | ||
"@parcel/packager-ts": "^2.11.0", | ||
"@parcel/transformer-typescript-types": "^2.11.0", | ||
"@trivago/prettier-plugin-sort-imports": "^4.3.0", | ||
"@types/jest": "^29.5.11", | ||
"@types/node": "^20.11.5", | ||
"husky": "^8.0.1", | ||
"jest": "^29.1.2", | ||
"prettier": "^2.2.0", | ||
"pretty-quick": "^3.1.0" | ||
"json5": "^2.2.3", | ||
"lint-staged": "^15.2.0", | ||
"parcel": "^2.11.0", | ||
"prettier": "^3.2.4", | ||
"punycode": "^1.4.1", | ||
"ts-jest": "^29.1.1", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.3.3", | ||
"url": "^0.11.3" | ||
}, | ||
"engines": { | ||
"node": ">=10.0.0" | ||
"node": ">=18.0.0" | ||
}, | ||
"prettier": { | ||
"plugins": [ | ||
"@trivago/prettier-plugin-sort-imports" | ||
], | ||
"importOrder": [ | ||
"^node:.*$", | ||
"<THIRD_PARTY_MODULES>", | ||
"^[./]" | ||
], | ||
"importOrderSeparation": true, | ||
"importOrderSortSpecifiers": true | ||
} | ||
} |
# Tweet markdown renderer | ||
[![npm](https://img.shields.io/npm/v/tweet.md.svg)](https://www.npmjs.com/package/tweet.md) | ||
[![Build](https://img.shields.io/github/workflow/status/silentroach/tweet.md/Test.svg)](https://github.com/silentroach/tweet.md/actions?query=workflow%3ATest) | ||
[![Coveralls](https://img.shields.io/coveralls/silentroach/tweet.md.svg?label=coverage)](https://coveralls.io/r/silentroach/tweet.md) | ||
[![install size](https://packagephobia.now.sh/badge?p=tweet.md)](https://packagephobia.now.sh/result?p=tweet.md) | ||
@@ -22,5 +19,6 @@ Render your [tweets](https://dev.twitter.com/overview/api/tweets) with [entities](https://dev.twitter.com/overview/api/entities) to beautiful markdown. | ||
```js | ||
var render = require("tweet.md"); | ||
var output = render(tweetObjectFromAPI); | ||
```ts | ||
import { renderTweet } from "tweet.md"; | ||
const output = renderTweet(tweetObjectFromAPI); | ||
``` | ||
@@ -32,47 +30,51 @@ | ||
### [01-link.json](examples/01-link.json) | ||
### [01-link.json5](examples/01-link.json5) | ||
Removing the 140 character limit from Direct Messages [twittercommunity.com/t/removing-the…](https://t.co/h0I2M3P2vm "https://twittercommunity.com/t/removing-the-140-character-limit-from-direct-messages/41348/") | ||
- - - | ||
### [02-multiline.json](examples/02-multiline.json) | ||
--- | ||
### [02-multiline.json5](examples/02-multiline.json5) | ||
Tweet poems you like | ||
at [#TwitterPoetryClub](https://twitter.com/search?q=%23TwitterPoetryClub) | ||
prose, sonnets and more | ||
prose, sonnets and more | ||
Via [@bustle](https://twitter.com/bustle "Bustle"), learn how to wax poetic on Twitter: [bustle.com/articles/10068…](http://t.co/vItyyGqX7R "http://www.bustle.com/articles/100683-twitterpoetryclub-members-share-their-love-of-poetry-in-140-characters-or-less") | ||
- - - | ||
### [03-russian.json](examples/03-russian.json) | ||
--- | ||
### [03-russian.json5](examples/03-russian.json5) | ||
Привет! С вами сегодня и всю неделю [@pepelsbey](https://twitter.com/pepelsbey "Вадим Макеев"), он же Вадим Макеев в прямом эфире из Осло, см. глобус Европы [pic.twitter.com/clb7TLnxZS](http://t.co/clb7TLnxZS) | ||
- - - | ||
### [04-ctags.json](examples/04-ctags.json) | ||
--- | ||
### [04-ctags.json5](examples/04-ctags.json5) | ||
[$APPL](https://twitter.com/search?q=%23APPL&src=ctag) set to jump this morning. General rebound in the market today. Yesterday was a good time to buy into the panic. | ||
- - - | ||
### [05-emoji.json](examples/05-emoji.json) | ||
--- | ||
Twitter libraries are a great way to use our API. Did you know: | ||
### [05-emoji.json5](examples/05-emoji.json5) | ||
Twitter libraries are a great way to use our API. Did you know: | ||
✨ 100+ libraries support the Twitter API | ||
✨ In 25+ programming languages 🐍☕️♦️ | ||
Explore our curated list of community built libraries 📚 | ||
✨ In 25+ programming languages 🐍☕️♦️ | ||
Explore our curated list of community built libraries 📚 | ||
[developer.twitter.com/en/docs/develo…](https://t.co/mgXiWmt9SY "https://developer.twitter.com/en/docs/developer-utilities/twitter-libraries") | ||
- - - | ||
### [06-quote.json](examples/06-quote.json) | ||
--- | ||
A nice GIF of the Performance Monitor coming to DevTools in Chrome 64 [developers.google.com/web/updates/20…](https://t.co/2xpId3DFro "https://developers.google.com/web/updates/2017/11/devtools-release-notes#perf-monitor") | ||
### [06-quote.json5](examples/06-quote.json5) | ||
> Track your site’s performance realtime with [@ChromeDevTools](https://twitter.com/ChromeDevTools "Chrome DevTools") in 3 steps: | ||
> | ||
> 1. CMD+SHIFT+P | ||
> 2. type 'per' | ||
A nice GIF of the Performance Monitor coming to DevTools in Chrome 64 [developers.google.com/web/updates/20…](https://t.co/2xpId3DFro "https://developers.google.com/web/updates/2017/11/devtools-release-notes#perf-monitor") | ||
> Track your site’s performance realtime with [@ChromeDevTools](https://twitter.com/ChromeDevTools "Chrome DevTools") in 3 steps: | ||
> | ||
> 1. CMD+SHIFT+P | ||
> 2. type 'per' | ||
> 3. Select 'Sh… [twitter.com/i/web/status/9…](https://t.co/UVvpIlCkrk "https://twitter.com/i/web/status/936661298603089920") | ||
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
25489
6
79
17
177
1