Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ci-trap-web",
"version": "1.0.21",
"version": "1.0.22",
"description": "Lightweight mouse and touch event tracker library for browsers.",
"main": "dist/trap-umd.min.js",
"module": "src/trap.js",
Expand Down
2 changes: 1 addition & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
export const SCHEMA_VERSION = '1-0-0';

// This is updated by npm version command
export const PACKAGE_VERSION = '1.0.21';
export const PACKAGE_VERSION = '1.0.22';

// Constants to define the current component in the schema
export const PACKAGE_NAME = 'ci-trap-web';
Expand Down
4 changes: 2 additions & 2 deletions src/transport/dummy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import Transport from './transport';
import simpleAutoBind from '../simpleAutoBind';

class Dummy extends Transport {
constructor(metadata, allowInMemoryBuffer) {
super(metadata, allowInMemoryBuffer);
constructor(metadata) {
super(metadata);
simpleAutoBind(this);
}

Expand Down
4 changes: 2 additions & 2 deletions src/transport/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import Transport from './transport';
import simpleAutoBind from '../simpleAutoBind';

class HTTP extends Transport {
constructor(metadata, allowInMemoryBuffer = false) {
super(metadata, allowInMemoryBuffer);
constructor(metadata) {
super(metadata);
simpleAutoBind(this);
}

Expand Down
4 changes: 2 additions & 2 deletions src/transport/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import simpleAutoBind from '../simpleAutoBind';
import Transport from './transport';

class WS extends Transport {
constructor(metadata, logger, allowInMemoryBuffer = false) {
super(metadata, allowInMemoryBuffer);
constructor(metadata, logger) {
super(metadata);
simpleAutoBind(this);

this._logger = logger;
Expand Down
16 changes: 8 additions & 8 deletions src/trap.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Trap {
// Default logger sends logs to console
// eslint-disable-next-line no-console
logger: (...m) => { console.log(...m); },
transport: new HTTP(this._metadata, this._buffer),
transport: new HTTP(this._metadata),
sequenceNumber: 0,
eventStorage: new InMemoryEventStorage(),
collectEvents: false,
Expand Down Expand Up @@ -452,7 +452,7 @@ class Trap {
/**
* Set the buffer size limit for in-memory event collection
*
* @param {int} sizeLimit
* @param {number} sizeLimit
*/
setEventCollectionSizeLimit(sizeLimit) {
this.state.eventStorage.sizeLimit = sizeLimit;
Expand All @@ -461,7 +461,7 @@ class Trap {
/**
* Set the metadata submission interval
*
* @param {int} metadataSubmissionInterval
* @param {number} metadataSubmissionInterval
*/
setMetadataSubmissionInterval(metadataSubmissionInterval) {
this._metadata.metadataSubmissionInterval = metadataSubmissionInterval;
Expand All @@ -488,7 +488,7 @@ class Trap {
/**
* Enable / disable coalesced pointer event collection
*
* @param {bool} capture
* @param {boolean} capture
*/
setCaptureCoalescedEvents(capture) {
this._handlers.captureCoalescedEvents(capture);
Expand All @@ -497,7 +497,7 @@ class Trap {
/**
* Enable / disable requestAnimationFrame message collection
*
* @param {bool} capture
* @param {boolean} capture
*/
setCaptureRequestAnimationFrame(capture) {
this.state.captureRequestAnimationFrame = capture;
Expand Down Expand Up @@ -536,9 +536,9 @@ class Trap {
* @deprecated use collectedEvents instead and do the filtering and counting
* in the calling application.
*
* @param {filterFunction} filterFn
* @param {function(Array<any>):boolean} filterFn
*
* @returns {int}
* @returns {number}
*/
collectedEventCount(filterFn = () => true) {
return this.collectedEvents().filter(filterFn).length;
Expand Down Expand Up @@ -567,7 +567,7 @@ class Trap {
/**
* Event handler when data is submitted by the transport layer.
*
* @param {function(any[]):void} callback
* @param {(function(any[]):void) | undefined} callback
*/
onDataSubmitted(callback) {
this.state.transport.off(
Expand Down