@ombori/ga-settings
Advanced tools
Comparing version 2.162.0 to 2.167.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.167.1](https://github.com/ombori/gridapp/compare/v2.167.0...v2.167.1) (2022-02-02) | ||
### Bug Fixes | ||
* avoid logging in test env ([5d51c10](https://github.com/ombori/gridapp/commit/5d51c10901e9bd1875dacce4e751f9dcc3c83807)) | ||
# [2.162.0](https://github.com/ombori/gridapp/compare/v2.161.3...v2.162.0) (2022-01-25) | ||
@@ -8,0 +19,0 @@ |
@@ -22,4 +22,13 @@ "use strict"; | ||
var DEVELOPMENT_ID = 'XXXXXXXXXXXXXXXXXXXXXXXX'; | ||
var log = function () { | ||
var data = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
data[_i] = arguments[_i]; | ||
} | ||
if (process.env.NODE_ENV === 'test') | ||
return; | ||
console.log.apply(console, data); | ||
}; | ||
var getDevSettings = function () { | ||
console.log('Settings development mode', process.cwd()); | ||
log('Settings development mode', process.cwd()); | ||
var settings; | ||
@@ -51,3 +60,3 @@ try { | ||
if (gridapp && !hasLoadedSettings.current) { | ||
console.log('Settings ready', gridapp); | ||
log('Settings ready', gridapp); | ||
var gridappSettings = gridapp.getSettings(); | ||
@@ -62,3 +71,3 @@ setSettings(gridappSettings); | ||
else { | ||
console.log('Settings production mode'); | ||
log('Settings production mode'); | ||
try { | ||
@@ -65,0 +74,0 @@ handler(); |
{ | ||
"name": "@ombori/ga-settings", | ||
"version": "2.162.0", | ||
"version": "2.167.1", | ||
"main": "dist/index.js", | ||
@@ -19,3 +19,3 @@ "license": "UNLICENSED", | ||
}, | ||
"gitHead": "3c3e820a943317ae470aaaec0e1d90d7aab3d746" | ||
"gitHead": "9d574b7fd7146de0e1add87e35b02f20a04c63c0" | ||
} |
@@ -82,4 +82,10 @@ import { useEffect, useState, useRef } from 'react'; | ||
const log = (...data: any[]): void => { | ||
if (process.env.NODE_ENV === 'test') return; | ||
console.log(...data); | ||
}; | ||
const getDevSettings = () => { | ||
console.log('Settings development mode', process.cwd()); | ||
log('Settings development mode', process.cwd()); | ||
let settings: any; | ||
@@ -118,3 +124,3 @@ try { | ||
if (gridapp && !hasLoadedSettings.current) { | ||
console.log('Settings ready', gridapp); | ||
log('Settings ready', gridapp); | ||
const gridappSettings = gridapp.getSettings(); | ||
@@ -129,3 +135,3 @@ setSettings(gridappSettings); | ||
} else { | ||
console.log('Settings production mode'); | ||
log('Settings production mode'); | ||
try { | ||
@@ -132,0 +138,0 @@ handler(); |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
34527
595
2