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

@account-kit/logging

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@account-kit/logging - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0

dist/esm/utils.d.ts

15

./dist/esm/index.js
import { createClientLogger } from "./client.js";
import { noopLogger } from "./noop.js";
import { createServerLogger } from "./server.js";
export function createLogger(context) {
const innerLogger = typeof window === "undefined"
? createServerLogger(context)
: createClientLogger(context);
const innerLogger = (() => {
try {
return typeof window === "undefined"
? createServerLogger(context)
: createClientLogger(context);
}
catch (e) {
console.error("[Safe to ignore] failed to initialize metrics", e);
return noopLogger;
}
})();
const logger = {

@@ -8,0 +17,0 @@ ...innerLogger,

3

dist/esm/client.js

@@ -8,4 +8,5 @@ import { AnalyticsBrowser } from "@segment/analytics-next";

import { DevDestinationPlugin } from "./plugins/devDestination.js";
import { isClientDevMode } from "./utils.js";
export function createClientLogger(context) {
const isDev = window.location.hostname.includes("localhost");
const isDev = isClientDevMode();
if (isDev && !WRITE_IN_DEV) {

@@ -12,0 +13,0 @@ // If we don't have a write key, we don't want to log anything

import { createClientLogger } from "./client.js";
import { noopLogger } from "./noop.js";
import { createServerLogger } from "./server.js";
export function createLogger(context) {
const innerLogger = typeof window === "undefined"
? createServerLogger(context)
: createClientLogger(context);
const innerLogger = (() => {
try {
return typeof window === "undefined"
? createServerLogger(context)
: createClientLogger(context);
}
catch (e) {
console.error("[Safe to ignore] failed to initialize metrics", e);
return noopLogger;
}
})();
const logger = {

@@ -8,0 +17,0 @@ ...innerLogger,

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

export declare const VERSION = "4.0.1";
export declare const VERSION = "4.1.0";
// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.0.1";
export const VERSION = "4.1.0";
//# sourceMappingURL=version.js.map

@@ -1,2 +0,2 @@

export declare const VERSION = "4.0.1";
export declare const VERSION = "4.1.0";
//# sourceMappingURL=version.d.ts.map
{
"name": "@account-kit/logging",
"version": "4.0.1",
"version": "4.1.0",
"description": "Core logging library for Account Kit packages",

@@ -64,3 +64,3 @@ "author": "Alchemy",

},
"gitHead": "840465b053f8fa8971715fc8d9ef4401632f87e4"
"gitHead": "f6b6f15f4fe349850995264a549ca53a821859f0"
}

@@ -9,2 +9,3 @@ import { AnalyticsBrowser } from "@segment/analytics-next";

import type { EventsSchema, InnerLogger, LoggerContext } from "./types";
import { isClientDevMode } from "./utils.js";

@@ -14,3 +15,3 @@ export function createClientLogger<Schema extends EventsSchema = []>(

): InnerLogger<Schema> {
const isDev = window.location.hostname.includes("localhost");
const isDev = isClientDevMode();
if (isDev && !WRITE_IN_DEV) {

@@ -17,0 +18,0 @@ // If we don't have a write key, we don't want to log anything

import { createClientLogger } from "./client.js";
import { noopLogger } from "./noop.js";
import { createServerLogger } from "./server.js";

@@ -12,6 +13,12 @@ import type { EventLogger, EventsSchema, LoggerContext } from "./types";

export function createLogger(context: LoggerContext): EventLogger {
const innerLogger =
typeof window === "undefined"
? createServerLogger(context)
: createClientLogger(context);
const innerLogger = (() => {
try {
return typeof window === "undefined"
? createServerLogger(context)
: createClientLogger(context);
} catch (e) {
console.error("[Safe to ignore] failed to initialize metrics", e);
return noopLogger;
}
})();

@@ -18,0 +25,0 @@ const logger: EventLogger = {

// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.0.1";
export const VERSION = "4.1.0";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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