@financial-times/ads-display
Advanced tools
Comparing version 4.0.2 to 4.0.3-beta.5
@@ -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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
8
0
6
1590
70103
1
2
2
1
- Removed@financial-times/ads-legacy-o-ads@4.3.0(transitive)
- Removed@financial-times/ads-moat-integration@4.3.0(transitive)
- Removed@financial-times/ads-permutive@4.3.0(transitive)
- Removed@financial-times/ads-personalised-consent@4.3.0(transitive)
- Removed@financial-times/privacy-legislation-client@1.3.0(transitive)
- Removedreact-dom@16.14.0(transitive)
- Removedscheduler@0.19.1(transitive)
Updated@financial-times/ads-legacy-o-ads@file:../legacy-o-ads
Updated@financial-times/ads-moat-integration@file:../moat-integration
Updated@financial-times/ads-personalised-consent@file:../personalised-consent