Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@giphy/js-analytics

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@giphy/js-analytics - npm Package Compare versions

Comparing version 1.8.0 to 1.8.1

4

dist/pingback.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var js_util_1 = require("@giphy/js-util");
var throttle_debounce_1 = require("throttle-debounce");
var send_pingback_1 = require("./send-pingback");
var session_1 = require("./session");
var util_1 = require("./util");
var js_util_1 = require("@giphy/js-util");
var send_pingback_1 = require("./send-pingback");
var queuedPingbacks = {};

@@ -9,0 +9,0 @@ var loggedInUserId = '';

@@ -9,8 +9,5 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSession = exports.addLastSearchResponseId = exports.SESSION_STORAGE_KEY = void 0;
var cookie_1 = __importDefault(require("cookie"));
var js_util_1 = require("@giphy/js-util");
var uuid_1 = require("uuid"); // v1 only for pingback verfication

@@ -73,3 +70,3 @@ exports.SESSION_STORAGE_KEY = 'responseIds';

user: {
user_id: cookie_1.default.parse(document ? document.cookie : {}).giphy_pbid,
user_id: js_util_1.getPingbackId(),
logged_in_user_id: loggedInUserId || '',

@@ -76,0 +73,0 @@ random_id: getRandomId(),

@@ -11,3 +11,3 @@ {

"name": "@giphy/js-analytics",
"version": "1.8.0",
"version": "1.8.1",
"main": "dist/index.js",

@@ -25,6 +25,5 @@ "types": "dist/index.d.ts",

"@giphy/js-types": "^2.1.0",
"@giphy/js-util": "^1.9.2",
"@giphy/js-util": "^1.10.0",
"@types/uuid": "^8.3.0",
"append-query": "^2.1.0",
"cookie": "0.4.1",
"throttle-debounce": "^2.3.0",

@@ -40,3 +39,3 @@ "uuid": "^8.3.0"

},
"gitHead": "08c96511def29fa490ccc1d506e36e2eeb3c591f"
"gitHead": "688351c9d7bb9a5ae8799468c6611125d8da01ac"
}
import { IGif, IUser } from '@giphy/js-types'
import { getPingbackId } from '@giphy/js-util'
import pingback from '../pingback'

@@ -45,5 +46,6 @@ import { addLastSearchResponseId, SESSION_STORAGE_KEY } from '../session'

random_id: gl.giphyRandomId,
user_id: getPingbackId(),
})
})
const position = { top: 0, left: 20 } as ClientRect
const position = { top: 0, left: 20 } as any
test('no response id', () => {

@@ -92,2 +94,3 @@ pingback({

random_id: gl.giphyRandomId,
user_id: getPingbackId(),
})

@@ -124,2 +127,3 @@ const [event] = session.events

random_id: gl.giphyRandomId,
user_id: getPingbackId(),
})

@@ -126,0 +130,0 @@ })

@@ -0,8 +1,8 @@

import { PingbackEventType } from '@giphy/js-types'
import { forEach, Logger } from '@giphy/js-util'
import { debounce } from 'throttle-debounce'
import { sendPingback } from './send-pingback'
import { createSession } from './session'
import { Pingback, PingbackRequestAction } from './types'
import { getAction } from './util'
import { PingbackEventType } from '@giphy/js-types'
import { forEach, Logger } from '@giphy/js-util'
import { sendPingback } from './send-pingback'

@@ -9,0 +9,0 @@ type ActionMap = { [key: string]: PingbackRequestAction[] }

@@ -1,5 +0,5 @@

import cookie from 'cookie'
import { PingbackEventType } from '@giphy/js-types'
import { getPingbackId } from '@giphy/js-util'
import { v1 as uuid } from 'uuid' // v1 only for pingback verfication
import { PingbackRequestAction } from './types'
import { v1 as uuid } from 'uuid' // v1 only for pingback verfication

@@ -38,3 +38,3 @@ type SessionEvent = {

if (existing) {
var searchResponseIds = JSON.parse(existing)
const searchResponseIds = JSON.parse(existing)
if (searchResponseIds[searchResponseIds.length - 1] !== responseId) {

@@ -78,3 +78,3 @@ sessionStorage.setItem(SESSION_STORAGE_KEY, JSON.stringify([...searchResponseIds, responseId]))

user: {
user_id: cookie.parse(document ? document.cookie : ({} as any)).giphy_pbid,
user_id: getPingbackId(),
logged_in_user_id: loggedInUserId || '',

@@ -81,0 +81,0 @@ random_id: getRandomId(),

Sorry, the diff of this file is not supported yet

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