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

@timberio/core

Package Overview
Dependencies
Maintainers
5
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@timberio/core - npm Package Compare versions

Comparing version 0.16.0 to 0.17.0

11

dist/cjs/base.js

@@ -85,4 +85,11 @@ "use strict";

// Build the initial log
const initialLog = Object.assign({ dt: new Date(), level,
message }, log);
const initialLog = Object.assign({
// Implicit date timestamp
dt: new Date() }, log, {
// Explicit level
level,
// Explicit message
message,
// Finally, add the definitive schema
$schema: "https://raw.githubusercontent.com/timberio/log-event-json-schema/v4.1.0/schema.json" });
// Pass the log through the middleware pipeline

@@ -89,0 +96,0 @@ const transformedLog = await this._middleware.reduceRight((fn, pipedLog) => fn.then(pipedLog), Promise.resolve(initialLog));

2

dist/cjs/base.test.js

@@ -19,3 +19,3 @@ "use strict";

});
it("should use the preProcess pipeline", async () => {
it("should add an implicit `dt` timestamp", async () => {
// Fixtures

@@ -22,0 +22,0 @@ const message = "Test";

@@ -83,4 +83,11 @@ import { LogLevel } from "@timberio/types";

// Build the initial log
const initialLog = Object.assign({ dt: new Date(), level,
message }, log);
const initialLog = Object.assign({
// Implicit date timestamp
dt: new Date() }, log, {
// Explicit level
level,
// Explicit message
message,
// Finally, add the definitive schema
$schema: "https://raw.githubusercontent.com/timberio/log-event-json-schema/v4.1.0/schema.json" });
// Pass the log through the middleware pipeline

@@ -87,0 +94,0 @@ const transformedLog = await this._middleware.reduceRight((fn, pipedLog) => fn.then(pipedLog), Promise.resolve(initialLog));

@@ -14,3 +14,3 @@ import Base from "./base";

});
it("should use the preProcess pipeline", async () => {
it("should add an implicit `dt` timestamp", async () => {
// Fixtures

@@ -17,0 +17,0 @@ const message = "Test";

{
"name": "@timberio/core",
"version": "0.16.0",
"version": "0.17.0",
"description": "Timber.io - logging core",

@@ -40,6 +40,6 @@ "keywords": [

"dependencies": {
"@timberio/tools": "^0.16.0",
"@timberio/types": "^0.16.0"
"@timberio/tools": "^0.17.0",
"@timberio/types": "^0.17.0"
},
"gitHead": "13fe691283afc3d96d5bc1ff7b13173f55389621"
"gitHead": "4e067b488fd87e43621d053b58e665bf55632bd8"
}

@@ -19,3 +19,3 @@ import Base from "./base";

it("should use the preProcess pipeline", async () => {
it("should add an implicit `dt` timestamp", async () => {
// Fixtures

@@ -22,0 +22,0 @@ const message = "Test";

@@ -129,6 +129,17 @@ import {

const initialLog: ITimberLog = {
// Implicit date timestamp
dt: new Date(),
// Overwrite defaults / add context, with `log` object
...log,
// Explicit level
level,
// Explicit message
message,
...log
// Finally, add the definitive schema
$schema:
"https://raw.githubusercontent.com/timberio/log-event-json-schema/v4.1.0/schema.json"
};

@@ -135,0 +146,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

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