@schibsted/niche-ads
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -0,1 +1,8 @@ | ||
### [0.3.1](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/compare/v0.3.0...v0.3.1) (2021-12-14) | ||
### Miscellaneous Chores | ||
- change naming of no-generic-externalid_src ([#13](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/issues/13)) ([7098733](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/commit/7098733b5bc6ebb2279b0b3c933f5ee06bee9b3f)) | ||
- update linters (major) ([#10](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/issues/10)) ([fbb71ef](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/commit/fbb71ef1e958afee50efdff667aaa0b6bbd8ada8)) | ||
## [0.3.0](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/compare/v0.2.1...v0.3.0) (2021-10-05) | ||
@@ -2,0 +9,0 @@ |
@@ -29,2 +29,6 @@ "use strict"; | ||
function noop() { | ||
return null; | ||
} | ||
const AdContext = /*#__PURE__*/(0, _react.createContext)({}); | ||
@@ -90,3 +94,3 @@ const APPNEXUS_PLACEMENTS_PER_REQUEST_LIMIT = 12; | ||
(0, _collapse.default)(event); | ||
}, [wallpaper]); | ||
}, [wallpaper, chatbot.enabled]); | ||
(0, _react.useEffect)(() => { | ||
@@ -113,3 +117,3 @@ window.addEventListener('message', messageHandler); | ||
...extraKeywords, | ||
'no-generic-externalid_src': Boolean((0, _appnexus.getAdId)()) + Boolean((0, _appnexus.getUserId)()) | ||
'aa-sch-externalid_src': Boolean((0, _appnexus.getAdId)()) + Boolean((0, _appnexus.getUserId)()) | ||
}, | ||
@@ -193,3 +197,3 @@ user: { | ||
return () => null; | ||
return noop; | ||
}, [placementsConfig, adsConfig === null || adsConfig === void 0 ? void 0 : (_adsConfig$placements = adsConfig.placements) === null || _adsConfig$placements === void 0 ? void 0 : _adsConfig$placements.common]); | ||
@@ -202,3 +206,3 @@ const clearPlacements = (0, _react.useCallback)(() => { | ||
setPlacementsConfig([]); | ||
}, []); | ||
}, [placementsConfig]); | ||
const value = (0, _react.useMemo)(() => ({ | ||
@@ -209,3 +213,3 @@ loadAds, | ||
placements | ||
}), [placementsConfig, loadAds, placements]); | ||
}), [placementsConfig, loadAds, placements, clearPlacements]); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AdContext.Provider, { | ||
@@ -212,0 +216,0 @@ value: value, |
@@ -14,3 +14,4 @@ "use strict"; | ||
*/ | ||
function attachWallpaperImageToPageBody(messageListenerEvent = {}, { | ||
function attachWallpaperImageToPageBody( // eslint-disable-next-line default-param-last | ||
messageListenerEvent = {}, { | ||
setWallpaperFunction, | ||
@@ -17,0 +18,0 @@ setBackgroundColorFunction |
{ | ||
"name": "@schibsted/niche-ads", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Package containing ads logic reappearing across our projects", | ||
@@ -33,2 +33,3 @@ "main": "dist/index.js", | ||
"@babel/core": "^7.14.8", | ||
"@babel/eslint-parser": "^7.16.3", | ||
"@babel/preset-env": "^7.14.8", | ||
@@ -39,12 +40,11 @@ "@babel/preset-react": "^7.14.5", | ||
"@release-it/conventional-changelog": "^3.3.0", | ||
"babel-eslint": "^10.1.0", | ||
"eslint": "^7.32.0", | ||
"eslint-config-airbnb": "^18.2.1", | ||
"eslint": "^8.2.0", | ||
"eslint-config-airbnb": "^19.0.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-babel": "^5.3.1", | ||
"eslint-plugin-import": "^2.24.2", | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-react": "^7.25.1", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"eslint-plugin-react": "^7.27.0", | ||
"eslint-plugin-react-hooks": "^4.3.0", | ||
"husky": "^7.0.2", | ||
@@ -51,0 +51,0 @@ "lint-staged": "^11.1.2", |
@@ -21,2 +21,6 @@ import { createContext, useCallback, useMemo, useState, useRef, useEffect } from 'react'; | ||
function noop() { | ||
return null; | ||
} | ||
const AdContext = createContext({}); | ||
@@ -82,3 +86,3 @@ const APPNEXUS_PLACEMENTS_PER_REQUEST_LIMIT = 12; | ||
}, | ||
[wallpaper] | ||
[wallpaper, chatbot.enabled] | ||
); | ||
@@ -114,3 +118,3 @@ | ||
...extraKeywords, | ||
'no-generic-externalid_src': Boolean(getAdId()) + Boolean(getUserId()), | ||
'aa-sch-externalid_src': Boolean(getAdId()) + Boolean(getUserId()), | ||
}, | ||
@@ -183,3 +187,3 @@ user: { | ||
return () => null; | ||
return noop; | ||
}, [placementsConfig, adsConfig?.placements?.common]); | ||
@@ -194,3 +198,3 @@ | ||
setPlacementsConfig([]); | ||
}, []); | ||
}, [placementsConfig]); | ||
@@ -204,3 +208,3 @@ const value = useMemo( | ||
}), | ||
[placementsConfig, loadAds, placements] | ||
[placementsConfig, loadAds, placements, clearPlacements] | ||
); | ||
@@ -207,0 +211,0 @@ |
@@ -8,2 +8,3 @@ /** | ||
function attachWallpaperImageToPageBody( | ||
// eslint-disable-next-line default-param-last | ||
messageListenerEvent = {}, | ||
@@ -10,0 +11,0 @@ { setWallpaperFunction, setBackgroundColorFunction } |
Sorry, the diff of this file is not supported yet
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
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
66632
1152