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

ableton-js

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ableton-js - npm Package Compare versions

Comparing version 3.2.2 to 3.2.3

6

CHANGELOG.md

@@ -7,4 +7,10 @@ ### Changelog

#### [v3.2.3](https://github.com/leolabs/ableton.js/compare/v3.2.2...v3.2.3)
- :bug: Fix stray heartbeats emitting a disconnect event [`6157a95`](https://github.com/leolabs/ableton.js/commit/6157a952b766f4c9548e8752c12bde599ccc1a07)
#### [v3.2.2](https://github.com/leolabs/ableton.js/compare/v3.2.1...v3.2.2)
> 23 June 2023
- :sparkles: Add a fallback `schedule_message` in case the Timer doesn't work as expected [`b5fdbe1`](https://github.com/leolabs/ableton.js/commit/b5fdbe12726d3c76a2fe74ec0fe0a731367fcb4f)

@@ -11,0 +17,0 @@

2

index.d.ts

@@ -105,3 +105,3 @@ /// <reference types="node" />

private clientState;
private cancelDisconnectEvent;
private cancelDisconnectEvents;
constructor(options?: AbletonOptions | undefined);

@@ -108,0 +108,0 @@ private handleConnect;

@@ -54,3 +54,3 @@ "use strict";

clientState = "closed";
cancelDisconnectEvent = false;
cancelDisconnectEvents = [];
constructor(options) {

@@ -170,2 +170,9 @@ super();

const heartbeat = async () => {
// Add a cancel function to the array of heartbeats
let canceled = false;
const cancel = () => {
canceled = true;
this.logger?.debug("Cancelled heartbeat");
};
this.cancelDisconnectEvents.push(cancel);
try {

@@ -176,3 +183,5 @@ await this.internal.get("ping");

catch (e) {
if (!this.cancelDisconnectEvent) {
this.logger?.warn("Heartbeat failed:", { error: e, canceled });
// If the heartbeat has been canceled, don't emit a disconnect event
if (!canceled) {
this.handleDisconnect("heartbeat");

@@ -182,3 +191,3 @@ }

finally {
this.cancelDisconnectEvent = false;
this.cancelDisconnectEvents = this.cancelDisconnectEvents.filter((e) => e !== cancel);
}

@@ -261,3 +270,3 @@ };

// cancel it to prevent a double disconnect/connect event.
this.cancelDisconnectEvent = true;
this.cancelDisconnectEvents.forEach((cancel) => cancel());
if (data.data?.port && data.data?.port !== this.serverPort) {

@@ -264,0 +273,0 @@ this.logger?.info("Got new server port via connect:", {

{
"name": "ableton-js",
"version": "3.2.2",
"version": "3.2.3",
"description": "Control Ableton Live from Node",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

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