New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tdl

Package Overview
Dependencies
Maintainers
0
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tdl - npm Package Versions

23
6

8.0.2

Diff

Changelog

Source

tdl@8.0.2 (2024-12-20)

  • Fixed a possible TypeError: null is not an object error in client.login() if called from a database with an incomplete login attempt.
comonoid
published 8.0.1 •

Changelog

Source

tdl@8.0.1 (2024-06-18)

  • In bun (instead of Node.js), fixed updates/responses stop being received if none of those have been received in the last 10 (receiveTimeout) seconds.
  • In bun, fixed the old tdjson interface exiting the process instantly.

This is related to bun < v1.1.14 only.

comonoid
published 8.0.0 •

Changelog

Source

tdl@8.0.0 (2024-05-28)

  • The compatibility with tdl-tdlib-addon is removed. The Client constructor is no longer exported. The non-deprecated API mostly remains the same.
  • TDLib < v1.8.0 is no longer supported.
  • Node.js < v16.0.0 is no longer supported.
  • The new tdjson interface is now used by default. The useNewTdjsonInterface option in tdl.configure is removed; useOldTdjsonInterface is added instead.
  • Added client.iterUpdates() to receive updates via async iterators as an alternative to client.on('update', ...). Example:
    for await (const update of client.iterUpdates()) {
      if (update._ === 'updateOption' && update.name === 'my_id') {
        console.log(`My ID is ${update.value.value}!`)
        break
      }
    }
    
  • client.login() can now accept the object directly besides a function returning the object.
  • The TDLib errors are now wrapped in a new TDLibError class; TdlError is removed and replaced with UnknownError.
  • Changed the default verbosity level from 2 to 1.
  • Added client.isClosed().
  • Pre-built node addons now support aarch64 GNU/Linux.
  • Removed deprecated client options: receiveTimeout, useDefaultVerbosityLevel, disableAuth, useMutableRename, verbosityLevel.
  • Removed the bare client option. tdl.createBareClient(): Client is added instead.
  • Removed deprecated client methods: destroy, pause, resume, connect, connectAndLogin, getBackendName, setLogFatalErrorCallback.
  • Removed deprecated exports: TDL, Tdl.
  • Removed deprecated events: response, auth-needed, auth-not-needed. The destroy event is renamed to close.
  • client.off now returns boolean instead of void; the once parameter is removed. (The eventemitter3 dependency is also dropped.)
  • The old tdjson interface should work in multiple threads of node:worker_threads now.
  • Now published with --provenance.
  • Internal: The tdl client code was rewritten in TypeScript.
comonoid
published 7.4.1 •

Changelog

Source

tdl@7.4.1 (2024-02-16)

  • Fixed a race condition (first reported when used in bun). This was publised as tdl@7.4.1-beta.0 on 2023-11-07.
comonoid
published 7.4.1-beta.0 •

comonoid
published 7.4.0 •

Changelog

Source

tdl@7.4.0 (2023-10-10)

  • Added tdl.setLogMessageCallback that allows to pass a callback to the td_set_log_message_callback TDLib function using Node-API's thread-safe functions. (TDLib v1.8.0+ only)
  • tdl.configure: Added an experimental option useNewTdjsonInterface that enables the use of td_create_client_id/td_send/td_receive/td_execute interface with a client manager and global receive loop, though the old interface still works well. (TDLib v1.7.0+ only)
  • Changed the implementation of the old tdjson interface bindings so that the limitation of max UV_THREADPOOL_SIZE clients is lifted.
  • tdl.configure: Added a receiveTimeout advanced option.
  • tdl.createClient: receiveTimeout in the client options is deprecated.
  • tdl.createClient: Deprecated the useMutableRename advanced option.
comonoid
published 7.4.0-rc.0 •

comonoid
published 7.3.2 •

Changelog

Source

tdl@7.3.2 (2023-09-21)

  • Fixed Symbol not found: node_register_module_v… errors on some platforms.
  • Fixed passing falsy values to tdl.configure.
comonoid
published 7.3.1 •

Changelog

Source

tdl@7.3.1 (2023-06-22)

This update introduces some significant and long-planned changes to the interface, while retaining backward compatiblity.

  • No longer need to separately install tdl and tdl-tdlib-addon; just install tdl. tdl-tdlib-addon is deprecated. The library is mostly focused to Node.js only now, deno support can be added later as a separate library. This simplifies tdl.
  • To better reflect the distinction between TDLib-global and instance-specific functions, TDLib-global options are now passed in the special configure function, and execute is decoupled from clients. As an example:
    const tdl = require('tdl')
    tdl.configure({
      tdjson: 'libtdjson.dylib',
      libdir: '/usr/local/lib',
      verbosityLevel: 3 /* the default is 2 */
    })
    tdl.execute({ _: 'setLogStream', /* ... */ })
    const client = tdl.createClient({
      apiId: /* your api id */,
      apiHash: /* your api hash */
    })
    await client.login()
    
    The full documentation for the configure function is available in the TypeScript typings. The old new Client approach is still supported but deprecated.
  • The verbosityLevel client option is deprecated (moved to tdl.configure).
  • Added pre-built binaries for the node addon using prebuildify and node-gyp-build.
  • Updated README to be somewhat more user-friendly. Aside of documentation changes, the library also should be simpler to use now.
  • The packages tdl-tdlib-wasm and tdl-shared are deprecated. Any webassembly support is removed.
  • Deprecated Client#getBackendName.

Old code:

const { Client } = require('tdl')
const { TDLib } = require('tdl-tdlib-addon')
const client = new Client(new TDLib('path/to/libtdjson'), {
  apiId,
  apiHash,
  verbosityLevel: 0,
  // ...
})

New code:

const tdl = require('tdl')
tdl.configure({ tdjson: 'path/to/libtdjson', verbosityLevel: 0 })
const client = tdl.createClient({
  apiId,
  apiHash,
  // ...
})

If the default values of tdjson and verbosityLevel are used, then calling configure is optional.

comonoid
published 7.3.0 •

23
6
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc