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

@schibsted/niche-ads

Package Overview
Dependencies
Maintainers
4
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schibsted/niche-ads - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

6

CHANGELOG.md

@@ -0,1 +1,7 @@

### [0.3.2](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/compare/v0.3.1...v0.3.2) (2021-12-15)
### Bug Fixes
- fix clearplacenets reloading ([#14](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/issues/14)) ([4951993](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/commit/4951993a91ac2d4d7011bdaaa7ca608df4833857))
### [0.3.1](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/compare/v0.3.0...v0.3.1) (2021-12-14)

@@ -2,0 +8,0 @@

8

dist/AdContext.js

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

const [adScriptsReady, setAdScriptsReady] = (0, _react.useState)(false);
const placementsConfigRef = (0, _react.useRef)();
const placementsMediation = (0, _react.useRef)({});
const retryLoadAds = (0, _react.useRef)(false);
const scriptsLoadPromise = (0, _react.useRef)();
(0, _react.useEffect)(() => {
placementsConfigRef.current = placementsConfig;
}, [placementsConfig]);
const adReadyObserver = (0, _react.useCallback)(ready => {

@@ -198,3 +202,3 @@ setAdScriptsReady(ready);

const clearPlacements = (0, _react.useCallback)(() => {
placementsConfig.forEach(placementConfig => {
placementsConfigRef.current.forEach(placementConfig => {
cleanUpPlacement(placementConfig.targetId);

@@ -204,3 +208,3 @@ });

setPlacementsConfig([]);
}, [placementsConfig]);
}, []);
const value = (0, _react.useMemo)(() => ({

@@ -207,0 +211,0 @@ loadAds,

{
"name": "@schibsted/niche-ads",
"version": "0.3.1",
"version": "0.3.2",
"description": "Package containing ads logic reappearing across our projects",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -49,2 +49,3 @@ import { createContext, useCallback, useMemo, useState, useRef, useEffect } from 'react';

const [adScriptsReady, setAdScriptsReady] = useState(false);
const placementsConfigRef = useRef();
const placementsMediation = useRef({});

@@ -54,2 +55,6 @@ const retryLoadAds = useRef(false);

useEffect(() => {
placementsConfigRef.current = placementsConfig;
}, [placementsConfig]);
const adReadyObserver = useCallback((ready) => {

@@ -190,3 +195,3 @@ setAdScriptsReady(ready);

const clearPlacements = useCallback(() => {
placementsConfig.forEach((placementConfig) => {
placementsConfigRef.current.forEach((placementConfig) => {
cleanUpPlacement(placementConfig.targetId);

@@ -197,3 +202,3 @@ });

setPlacementsConfig([]);
}, [placementsConfig]);
}, []);

@@ -200,0 +205,0 @@ const value = useMemo(

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