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

countly-sdk-web

Package Overview
Dependencies
Maintainers
3
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

countly-sdk-web - npm Package Compare versions

Comparing version 23.12.5 to 23.12.6

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## 23.12.6
- Mitigated an issue where error tracking could prevent SDK initialization in async mode
## 23.12.5

@@ -2,0 +5,0 @@ - Mitigated an issue where the SDK was not emptying the async queue explicity when closing a browser

45

cypress/integration/async_queue.js

@@ -44,2 +44,3 @@ /* eslint-disable cypress/no-unnecessary-waiting */

// Add 4 events to the .q
Countly.q.push(["track_errors"]); // adding this as calling it during init used to cause an error (at v23.12.5)
Countly.q.push(["add_event", event(1)]);

@@ -50,7 +51,7 @@ Countly.q.push(["add_event", event(2)]);

// Check that the .q has 4 events
expect(Countly.q.length).to.equal(4);
expect(Countly.q.length).to.equal(5);
cy.fetch_local_event_queue().then((rq) => {
// Check that events are still in .q
expect(Countly.q.length).to.equal(4);
expect(Countly.q.length).to.equal(5);

@@ -144,42 +145,2 @@ // Check that the event queue is empty

});
// This test checks if clear_stored_id set to true during init we call processAsyncQueue (it sends events from .q to event queue and then to request queue)
it("Check clear_stored_id set to true empties the .q", () => {
hp.haltAndClearStorage(() => {
// Disable heartbeat
Countly.noHeartBeat = true;
Countly.q = [];
localStorage.setItem("YOUR_APP_KEY/cly_id", "old_user_id"); // Set old device ID for clear_stored_id to work
// Add 4 events to the .q
Countly.q.push(["add_event", event(1)]);
Countly.q.push(["add_event", event(2)]);
Countly.q.push(["add_event", event(3)]);
Countly.q.push(["add_event", event(4)]);
// Check that the .q has 4 events
expect(Countly.q.length).to.equal(4);
// Init the SDK with clear_stored_id set to true
initMain(true);
cy.wait(1000);
// Check that the .q is empty
expect(Countly.q.length).to.equal(0);
cy.fetch_local_event_queue().then((rq) => {
// Check that the event queue is empty because processAsyncQueue sends events from .q to event queue and then to request queue
expect(rq.length).to.equal(0);
cy.fetch_local_request_queue().then((rq_2) => {
// Check that events are now in request queue
expect(rq_2.length).to.equal(1);
const eventsArray = JSON.parse(rq_2[0].events);
expect(eventsArray[0].key).to.equal("event_1");
expect(eventsArray[1].key).to.equal("event_2");
expect(eventsArray[2].key).to.equal("event_3");
expect(eventsArray[3].key).to.equal("event_4");
});
});
});
});
// This test checks if calling user_details triggers processAsyncQueue (it sends events from .q to event queue and then to request queue)

@@ -186,0 +147,0 @@ it("Check sending user details empties .q", () => {

@@ -19,3 +19,3 @@ /* eslint-disable cypress/no-unnecessary-waiting */

const SDK_NAME = "javascript_native_web";
const SDK_VERSION = "23.12.5";
const SDK_VERSION = "23.12.6";

@@ -22,0 +22,0 @@ // tests

@@ -22,2 +22,3 @@ /* eslint-disable require-jsdoc */

initMulti("YOUR_APP_KEY", "?utm_source=hehe", undefined);
Countly.q.push(["track_errors"]); // adding this as calling it during init used to cause an error (at v23.12.5)
cy.fetch_local_request_queue().then((rq) => {

@@ -24,0 +25,0 @@ cy.log(rq);

@@ -1,4 +0,25 @@

declare module 'countly-sdk-web';
declare module 'countly-sdk-web' {
namespace Countly {
/**
* It initializes the SDK and exposes it to the window object. It should be called before any other SDK methods in sync implementations.
*
* @param {object} config - Configuration object. Determines the SDK behavior. Some essential keys are:
*
* app_key : "app key" from your Countly server application. (MANDATORY!)
*
* url : Your Countly server URL. You may also use your own server URL or IP here. (MANDATORY!)
*
* debug : Enables SDK logs to be printed into the browser console. (default: false)
*
* For the full list of configuration options, see https://support.count.ly/hc/en-us/articles/360037441932-Web-analytics-JavaScript#h_01HABTQ439HZN7Y6A6F07Y6G0K
*/
function init(config: object): void;
}
export default Countly;
}
interface Window {
Countly: any;
}

@@ -6,3 +6,3 @@ # Countly Implementation Examples

For all projects you should change 'YOUR_APP_KEY' value with your own application's app key, 'https://your.domain.countly' value with your own server url.
For all projects you should change 'YOUR_APP_KEY' value with your own application's app key, 'https://your.server.ly' value with your own server url.

@@ -9,0 +9,0 @@ If you have not separated 'examples' folder from the 'COUNTLY-SDK-WEB' project folder nor made some changes to file names in the periphery, any path to countly.js or the plugins must be still correct.

{
"name": "countly-sdk-web",
"version": "23.12.5",
"version": "23.12.6",
"description": "Countly Web SDK",

@@ -5,0 +5,0 @@ "main": "lib/countly.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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