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.2.0 to 1.3.0

14

dist/send-pingback.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var append_query_1 = __importDefault(require("append-query"));
var js_util_1 = require("@giphy/js-util");
// TODO remove api key
var pingBackUrl = 'https://pingback.giphy.com/pingback?apikey=l0HlIwPWyBBUDAUgM';
exports.sendPingback = function (session) {
return fetch(pingBackUrl, {
var headers = new Headers();
var qs = js_util_1.getGiphySDKRequestParams();
headers.set('Content-Type', 'application/json');
return fetch(append_query_1.default(pingBackUrl, qs), {
method: 'POST',
body: JSON.stringify({ sessions: [session] }),
headers: {
'Content-Type': 'application/json',
},
headers: headers,
});
};
//# sourceMappingURL=send-pingback.js.map

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

"name": "@giphy/js-analytics",
"version": "1.2.0",
"version": "1.3.0",
"main": "dist/index.js",

@@ -25,3 +25,4 @@ "types": "dist/index.d.ts",

"@giphy/js-types": "^1.2.0",
"@giphy/js-util": "^1.4.1",
"@giphy/js-util": "^1.5.0",
"append-query": "^2.1.0",
"cookie": "0.4.0",

@@ -32,2 +33,3 @@ "dompurify": "^1.0.10",

"devDependencies": {
"@types/append-query": "^2.0.0",
"@types/cookie": "^0.3.3",

@@ -39,3 +41,3 @@ "@types/dompurify": "^0.0.32",

},
"gitHead": "a31befebdb938e83d5cb115be2a0017e1188e993"
"gitHead": "2f66705d00005eb35a91d63d6dc76b32c78b04e3"
}

@@ -71,3 +71,3 @@ import { IGif, IUser } from '@giphy/js-types'

// remove api key
expect(url).toBe('https://pingback.giphy.com/pingback?apikey=l0HlIwPWyBBUDAUgM')
expect(url).toContain('https://pingback.giphy.com/pingback?apikey=l0HlIwPWyBBUDAUgM')
expect(session.user).toEqual({

@@ -74,0 +74,0 @@ logged_in_user_id: String(user.id),

import { Session } from './session'
import appendQuery from 'append-query'
import { getGiphySDKRequestParams } from '@giphy/js-util'
// TODO remove api key
const pingBackUrl = 'https://pingback.giphy.com/pingback?apikey=l0HlIwPWyBBUDAUgM'
export const sendPingback = (session: Session) =>
fetch(pingBackUrl, {
export const sendPingback = (session: Session) => {
const headers = new Headers()
const qs = getGiphySDKRequestParams()
headers.set('Content-Type', 'application/json')
return fetch(appendQuery(pingBackUrl, qs), {
method: 'POST',
body: JSON.stringify({ sessions: [session] }),
headers: {
'Content-Type': 'application/json',
},
headers,
})
}

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