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 1.0.0 to 1.0.1

15

CHANGELOG.md

@@ -1,3 +0,16 @@

## [1.0.0](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/compare/v0.3.2...v1.0.0) (2022-02-15)
### [1.0.1](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/compare/v1.0.0...v1.0.1) (2022-03-16)
### Bug Fixes
- fix retry race condition ([#30](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/issues/30)) ([54593ba](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/commit/54593baf5814429e878b0da58cb7fcddf72e753c))
### Miscellaneous Chores
- update dependency @release-it/conventional-changelog to ^4.2.2 ([#28](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/issues/28)) ([4c8c6c0](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/commit/4c8c6c0a8488ed0bcf81edce1580f97f775695e5))
- update dependency eslint-config-prettier to ^8.4.0 ([#23](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/issues/23)) ([626bf33](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/commit/626bf33e180d64b79c596617a0f47f815e10c2f1))
- update dependency lint-staged to ^12.3.5 ([#27](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/issues/27)) ([6a5ca6a](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/commit/6a5ca6aee475a061fc0456b763e9e5b7e169ba5f))
- update linters ([#25](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/issues/25)) ([2b611eb](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/commit/2b611ebcaa7533b73bf69ab17348531c3dc30194))
- update linters ([#26](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/issues/26)) ([7d7fc35](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/commit/7d7fc35e5659e71624f89ce72d88dd3b3d9f094d))
- update tool packages ([#24](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/issues/24)) ([bd21071](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/commit/bd210710c7de34305f7d7d16cd04f46d07509259))## [1.0.0](https://github.schibsted.io/przemyslaw-babiarz/niche-ads/compare/v0.3.2...v1.0.0) (2022-02-15)
### ⚠ BREAKING CHANGES

@@ -4,0 +17,0 @@

8

dist/AdContext.js

@@ -65,2 +65,3 @@ "use strict";

const [adScriptsReady, setAdScriptsReady] = (0, _react.useState)(false);
const adScriptsReadyRef = (0, _react.useRef)(false);
const placementsConfigRef = (0, _react.useRef)();

@@ -71,2 +72,5 @@ const placementsMediation = (0, _react.useRef)({});

(0, _react.useEffect)(() => {
adScriptsReadyRef.current = adScriptsReady;
}, [adScriptsReady]);
(0, _react.useEffect)(() => {
placementsConfigRef.current = placementsConfig;

@@ -114,3 +118,3 @@ }, [placementsConfig]);

if (!device || !adScriptsReady) {
if (!device || !adScriptsReadyRef.current) {
retryLoadAds.current = {

@@ -153,3 +157,3 @@ pageType,

setPlacementsConfig(newPlacementConfig);
}, [device, adsConfig, adScriptsReady]);
}, [device, adsConfig]);
(0, _react.useEffect)(() => {

@@ -156,0 +160,0 @@ if (retryLoadAds.current) {

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

@@ -38,6 +38,6 @@ "main": "dist/index.js",

"@commitlint/config-conventional": "^16.2.1",
"@release-it/conventional-changelog": "^4.1.0",
"eslint": "^8.9.0",
"@release-it/conventional-changelog": "^4.2.2",
"eslint": "^8.10.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.3.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-babel": "^5.3.1",

@@ -47,9 +47,9 @@ "eslint-plugin-import": "^2.25.4",

"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react": "^7.29.3",
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "^7.0.4",
"lint-staged": "^12.3.4",
"lint-staged": "^12.3.5",
"prettier": "^2.5.1",
"prop-types": "^15.8.1",
"release-it": "^14.12.4",
"release-it": "^14.12.5",
"rimraf": "^3.0.2"

@@ -56,0 +56,0 @@ },

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

const [adScriptsReady, setAdScriptsReady] = useState(false);
const adScriptsReadyRef = useRef(false);
const placementsConfigRef = useRef();

@@ -56,2 +57,6 @@ const placementsMediation = useRef({});

useEffect(() => {
adScriptsReadyRef.current = adScriptsReady;
}, [adScriptsReady]);
useEffect(() => {
placementsConfigRef.current = placementsConfig;

@@ -107,3 +112,3 @@ }, [placementsConfig]);

if (!device || !adScriptsReady) {
if (!device || !adScriptsReadyRef.current) {
retryLoadAds.current = { pageType, keywords, allowlist, blocklist };

@@ -143,3 +148,3 @@

},
[device, adsConfig, adScriptsReady]
[device, adsConfig]
);

@@ -146,0 +151,0 @@

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