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

@financial-times/ads-display

Package Overview
Dependencies
Maintainers
8
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/ads-display - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3-beta.5

dist/main.scss

41

dist/ads-display.cjs.js

@@ -10,4 +10,4 @@ 'use strict';

var oTracking = require('@financial-times/o-tracking');
var adsPersonalisedConsent = require('@financial-times/ads-personalised-consent');
var nTracking = require('@financial-times/n-tracking');
var adsPersonalisedConsent = require('@financial-times/ads-personalised-consent');
var adsPermutive = require('@financial-times/ads-permutive');

@@ -116,2 +116,16 @@

let pc;
const _getPersonalisedConsent = async () => {
if (!pc) {
try {
pc = adsPersonalisedConsent.getPersonalisedConsent();
} catch (e) {
console.warn('Failed to initialise PersonaliseConsent', e);
}
}
return pc;
};
const DEFAULT_ADS_API_HOST = 'https://ads-api.ft.com/v2';

@@ -342,5 +356,8 @@

user,
host
host,
pc
}) => {
if (user) {
var _pc$isAllowed;
if (user && pc !== null && pc !== void 0 && (_pc$isAllowed = pc.isAllowed()) !== null && _pc$isAllowed !== void 0 && _pc$isAllowed.demographic) {
return fetchUserData(host);

@@ -386,5 +403,7 @@ }

}) {
const pc = await _getPersonalisedConsent();
const adsApiRequests = [getUserData({
user,
host
host,
pc
}), getPageData({

@@ -492,16 +511,2 @@ page,

let pc;
const _getPersonalisedConsent = async () => {
if (!pc) {
try {
pc = adsPersonalisedConsent.getPersonalisedConsent();
} catch (e) {
console.warn('Failed to initialise PersonaliseConsent', e);
}
}
return pc;
};
/**

@@ -508,0 +513,0 @@ * @typedef {Object} oAdsMetricPayload

@@ -6,4 +6,4 @@ import oAds from '@financial-times/ads-legacy-o-ads';

import oTracking from '@financial-times/o-tracking';
import { getPersonalisedConsent } from '@financial-times/ads-personalised-consent';
import { broadcast } from '@financial-times/n-tracking';
import { getPersonalisedConsent } from '@financial-times/ads-personalised-consent';
import adsPermutive from '@financial-times/ads-permutive';

@@ -104,2 +104,16 @@

let pc;
const _getPersonalisedConsent = async () => {
if (!pc) {
try {
pc = getPersonalisedConsent();
} catch (e) {
console.warn('Failed to initialise PersonaliseConsent', e);
}
}
return pc;
};
const DEFAULT_ADS_API_HOST = 'https://ads-api.ft.com/v2';

@@ -330,5 +344,8 @@

user,
host
host,
pc
}) => {
if (user) {
var _pc$isAllowed;
if (user && pc !== null && pc !== void 0 && (_pc$isAllowed = pc.isAllowed()) !== null && _pc$isAllowed !== void 0 && _pc$isAllowed.demographic) {
return fetchUserData(host);

@@ -374,5 +391,7 @@ }

}) {
const pc = await _getPersonalisedConsent();
const adsApiRequests = [getUserData({
user,
host
host,
pc
}), getPageData({

@@ -480,16 +499,2 @@ page,

let pc;
const _getPersonalisedConsent = async () => {
if (!pc) {
try {
pc = getPersonalisedConsent();
} catch (e) {
console.warn('Failed to initialise PersonaliseConsent', e);
}
}
return pc;
};
/**

@@ -496,0 +501,0 @@ * @typedef {Object} oAdsMetricPayload

{
"name": "@financial-times/ads-display",
"version": "4.0.2",
"description": "Bring ads to your page with the FT specific o-ads configuration",
"repository": {
"type": "git",
"url": "git+https://github.com/financial-times/advertising.git"
},
"keywords": [
"ads",
"o-ads",
"frontend"
],
"author": "Financial Times",
"license": "MIT",
"bugs": {
"url": "https://github.com/financial-times/ads-display/issues"
},
"homepage": "https://github.com/financial-times/ads-display#readme",
"lint-staged": {
"**/*.{js,jsx}": [
"npm run prettier",
"npm run lint -- --fix",
"git add"
]
},
"homepage": "https://github.com/Financial-Times/advertising#readme",
"main": "dist/ads-display.cjs.js",

@@ -37,9 +14,10 @@ "module": "dist/ads-display.esm.js",

"require": "./dist/ads-display.cjs.js"
}
},
"./main.scss": "./dist/main.scss"
},
"dependencies": {
"@financial-times/ads-legacy-o-ads": "^4.0.2",
"@financial-times/ads-moat-integration": "^4.0.2",
"@financial-times/ads-permutive": "^4.0.2",
"@financial-times/ads-personalised-consent": "^4.0.2",
"@financial-times/ads-legacy-o-ads": "file:../legacy-o-ads",
"@financial-times/ads-moat-integration": "file:../moat-integration",
"@financial-times/ads-permutive": "file:../permutive",
"@financial-times/ads-personalised-consent": "file:../personalised-consent",
"@financial-times/n-tracking": "^4.0.1",

@@ -50,36 +28,10 @@ "@financial-times/o-tracking": "^4.0.0",

},
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/plugin-transform-react-jsx": "^7.3.0",
"@babel/plugin-transform-runtime": "^7.16.4",
"@babel/preset-env": "^7.4.5",
"browser-resolve": "^2.0.0",
"eslint": "^7.0.0",
"eslint-import-resolver-webpack": "^0.13.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-react": "^7.19.0",
"jest": "^26.0.0",
"jest-fetch-mock": "^3.0.3",
"lint-staged": "^10.0.0",
"prettier": "2.2.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"regenerator-runtime": "^0.13.7"
},
"peerDependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0"
},
"scripts": {
"lint": "eslint . --ext .js,.jsx",
"prettier": "prettier --write '**/*.{js,jsx,json}'",
"copy:scss": "cp src/client/main.scss ./main.scss",
"clean": "rm -rf ./dist",
"test": "jest --colors",
"dev": "NODE_ENV=development rollup -c",
"build": "npm run clean && rollup -c && npm run copy:scss",
"certs": "source ./scripts/demo.sh && certs",
"demo": "source ./scripts/demo.sh && demo",
"demo-https": "source ./scripts/demo.sh && demo_https"
}
}
"rollup": "rollup -c",
"copy:dist": "cp ./src/client/main.scss ./dist/main.scss",
"copy:tmp": "cp ./src/client/main.scss ./main.scss",
"build": "run-s clean rollup copy:*"
},
"version": "4.0.3-beta.5"
}
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