Skip to content

Latest commit

 

History

History
142 lines (84 loc) · 3.55 KB

CHANGELOG.md

File metadata and controls

142 lines (84 loc) · 3.55 KB

Changelog

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.

Changed

  • Change to using sobek instead of goja (@mstoykov)

Fixed

  • return error if no welcome message received. (@palkan)

Added

  • Add channel.ackDuration() to get the number of milliseconds to wait for a subscription confirmation/rejection. (@palkan)

  • Add client.subscribeAsync to issue a subscribe command without waiting for the confirmation. (@palkan)

Fixed

  • Fix k6 / Logrus compatibility issue. (@palkan)

Added

  • Add JS helpers.
import { cableUrl, turboStreamSource } from 'https://anycable.io/xk6-cable/jslib/k6-rails/0.1.0/index.js'

export default function () {
  let res = http.get("http://localhost:3000/home");
  const html = res.html();

  const wsUrl = cableUrl(html);
  let client = cable.connect(wsUrl);

  let { streamName, channelName } = turboStreamSource(html);

  let channel = client.subscribe(channelName, {
    signed_stream_name: streamName,
  });

  // ...
}

Added

  • Add __timestamp__ field to incoming messages with the receive time (as UTC milliseconds). (@palkan)

This should be used to determine the actual time when the message was received (not when it reached JS runtime).

This makes it possible to use shared data along with onMessage callbacks. Without wrapping code into client.Loop, JS runtime race conditions could occur.

Added

  • Add channel.OnMessage to process incoming messages asynchronously. (@SlayerDF)

0.3.0 - 2022-06-23

Changed

  • Update k6 dependency to latest v0.38.3 release. (@skryukov)

0.2.0 - 2021-11-29

Changed

  • Update k6 dependency to latest v0.35.0 release. (@skryukov)

0.1.0 - 2021-09-15

Added

  • Protobuf codec support. (@palkan)

Fixed

  • Fix setting logging level. (@palkan)

0.0.3 - 2021-09-12

Added

  • Ability to change logging level with logLevel option. (@palkan)

0.0.2 - 2021-09-10

Added

  • New channel.ignoreReads() method, that allows skipping collecting incoming messages. (@palkan)

  • More examples. (@palkan)

Changed

  • Use buffered channels to receive messages. (@palkan)

0.0.1 - 2021-08-19

Added