Releases: Owen3H/twittxr
Releases · Owen3H/twittxr
v0.8.0
Fixes
-
Tweet.get
now returns valid data again :)It was previously broken due to needing a token, which we now generate from the tweet ID (thanks to react-tweet).
-
Timeline.get
no longer returns empty data, as long as a cookie is provided.It previously broke a few patches ago due to my silliness. #5
General
- Updated
TimelineTweet
andTimelineUser
classes to include fields that were missing. - Made
fetch
methods available onTimeline
andTweet
classes so users can get raw data instead of being locked into using the parsed types that are returned from.get
. Tweet.get
now returns null if no tweet was found.- Added more error handling when fetching a tweet, like ensuring that the ID is valid.
Misc
- Exported everything from
timeline.ts
andtweet.ts
files. - The
TWEET_URL
andTIMELINE_URL
constants now live outside of their classes and are exported.
v0.7.3
Warning
This version was deprecated. Please update to v0.8.0.
- [IMPORTANT] Changed
Timeline.get
parameters so that the auth object is the second argument, where the cookie now lives. - [IMPORTANT] Updated the
Tweet.get
method to now require atoken
parameter and documented the method with a guide on how to acquire it. - Added some new fields that were missing from the
TimelineTweet
andTimelineUser
types. - Fixed issue where rollup would fail to build due to the recently added dynamic import of puppeteer.
v0.7.2
- Move from PNPM to Bun.
- Project QoL (use type imports, new eslint rules & test fixes).
- Moved
util
folder out of theclasses
directory. - Changed Tweet
link
domain fromtwitter.com
tox.com
. - Fixed issue where passing
replies: true
toTimeline.get
would return an empty array.
v0.7.1
- Reference error now thrown if Puppeteer wasn't found when trying to use it.
- CI script now runs before publishing to NPM.
- Included
src
in the build. - Made some edits upon reading TypeScript performance wiki.
- Implemented
RawTimelineResponse
type. TimelineUser
class properties nowreadonly
.vite.config.ts
renamed tovitest.config.ts
(more appropriate since we aren't using Vite)
v0.7.0
Changes
- Puppeteer will now be used as a fallback on failed requests (if installed).
puppeteer-extra
no longer a dependency, regularpuppeteer
is now an optional dependency.- Massive overhaul to README, including Authentication, Puppeteer and Disclaimer sections.
- Fixed
id
property of TimelineTweet returning undefined. - Outside of Node, requests now return the response instead of
res.body
since Undici can't be used.
Additions
- Package.json now specifies
types
property to include type definitions! - Implement new
TwitterCookies
andPuppeteerConfig
types. - Implement
buildCookieString
method (named export) used to create a string from an object of cookies. - Documented some methods to help use this library effectively.
- It is now possible to pass the following options along with normal puppeteer options to
usePuppeteer()
{ browser?: Browser page?: Page autoClose?: boolean }
v0.6.2
v0.6.1
v0.6.0
v0.5.4
- Fixed timeline filter
includeReplies
andincludeRts
being mixed up. - Removed
rollup-plugin-dts
in favour ofemitDeclarationOnly
. - Relative imports now used instead of 'src' alias so
dist
builds correctly. - Minimum node version lowered.
12
->10
.
v0.5.0
0.5.0 - Cookie Support
- Timeline.get now supports passing the
cookie
parameter. (To include sensitive tweets in the result) - Implement new
sensitive
property on TimelineTweet. - Specify that the API should return new
RawTimelineEntry
type. - Improvements to tests that further ensure correct results.
- Edit ESLint to force no colons and enable
no-unexpected-multiline
.