All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
5.0.0 - 2024-02-22
- Breaking Support Node.js versions
>=18
.
- Fix Content-Length header size in UTF-8.
4.0.1 - 2023-09-01
- Build updated docs site at https://tumblr.github.io/tumblr.js.
- Some
@private
properties ofClient
have been changed to#private
fields.
4.0.0 - 2023-08-28
The 4.0 release is a significant change that modernizes the library, adds NPF support, and removes a
dependency on the long-deprecated request
library.
Some things to watch out for when migrating from v3:
The createPost
and editPost
methods were renamed to createLegacyPost
and editLegacyPost
.
createPost
and editPost
are now for working with NPF posts (via the /posts
endpoint).
// Before v4
createPost(blogName, params);
editPost(blogName, params);
// After v4
createLegacyPost(blogName, params);
editLegacyPost(blogName, params);
Some legacy post creation helper methods have been removed. For example:
// Before v4
createPhotoPost(blogName, params);
// After v4
createLegacyPost(blogName, { type: 'photo', ...params });
Usage of returnPromises
will now produce a warning. A promise will be returned if no callback is
provided.
- Integration test suites using the Tumblr API.
- Creation and edition of NPF posts is now supported via
createPost
/editPost
🎉
- Breaking Support Node.js versions
>=16
. - Breaking
Client
constructor accepts single options argument. - Breaking Credentials should be provided directly as options, not nested under the
credentials
property. - Breaking The (optional)
baseUrl
option should be of the formhttps://example.com
with no pathname, search, hash, etc. BadbaseUrl
options will throw. - Breaking The
createPost
method has been renamed tocreateLegacyPost
.createPost
is now used for NPF post creation. - Some API methods had documented signatures that were probably wrong. These have been updated.
- Bundled type declarations are now generated from source and should be improved.
- Dependencies have changed, notably
request
(deprecated) andlodash
have been removed.
- The following legacy post methods are deprecated. Prefer NPF methods (
/posts
endpoint)createLegacyPost
editLegacyPost
reblogPost
- The callback API is considered deprecated in favor of the
Promise
API.
blogIdentifier
parameters will not have.tumblr.com
automatically appended. Blog UUIDs can now be used asblogIdentifiers
.
- Breaking API methods return promises when no callback is provided. The
returnPromises
method and option have no effect. - Breaking The
addGetMethods
andaddPostMethods
methods have been removed. Additional methods can be implemented using thegetRequest
orpostRequest
methods. - Breaking The following legacy post creation methods have been removed.
createAudioPost
: usecreateLegacyPost
with{type: "audio"}
.createChatPost
: usecreateLegacyPost
with{type: "chat"}
.createLinkPost
: usecreateLegacyPost
with{type: "link"}
.createPhotoPost
: usecreateLegacyPost
with{type: "photo"}
.createQuotePost
: usecreateLegacyPost
with{type: "quote"}
.createTextPost
: usecreateLegacyPost
with{type: "text"}
.createVideoPost
: usecreateLegacyPost
with{type: "video"}
.
- Breaking The
request
option has been removed. - Request objects are no longer returned from API methods.