Socket
Socket
Sign inDemoInstall

libhoney

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libhoney - npm Package Compare versions

Comparing version 1.3.0 to 2.0.0

31

dist/libhoney.cjs.js

@@ -5,6 +5,6 @@ 'use strict';

var proxy = _interopDefault(require('superagent-proxy'));
var superagent = _interopDefault(require('superagent'));
var url = _interopDefault(require('url'));
var path = _interopDefault(require('path'));
var proxy = _interopDefault(require('superagent-proxy'));
var superagent = _interopDefault(require('superagent'));
var events = require('events');

@@ -179,3 +179,3 @@

const USER_AGENT = "libhoney-js/1.3.0";
const USER_AGENT = "libhoney-js/2.0.0";

@@ -186,4 +186,4 @@ const _global =

: typeof global !== "undefined"
? global
: undefined;
? global
: undefined;

@@ -223,5 +223,5 @@ // how many events to collect in a batch

class BatchEndpointAggregator {
constructor(events$$1) {
constructor(events) {
this.batches = partition(
events$$1,
events,
/* keyfn */

@@ -241,6 +241,6 @@ ev => `${ev.apiHost}_${ev.writeKey}_${ev.dataset}`,

encodeBatchEvents(events$$1) {
encodeBatchEvents(events) {
let first = true;
let numEncoded = 0;
let encodedEvents = events$$1.reduce((acc, ev) => {
let encodedEvents = events.reduce((acc, ev) => {
try {

@@ -455,4 +455,4 @@ let encodedEvent = ev.toJSON(); // directly call toJSON, not JSON.stringify, because the latter wraps it in an additional set of quotes

eachPromise(batches, batch => {
let url$$1 = urljoin(batch.apiHost, "/1/batch", batch.dataset);
let req = superagent.post(url$$1);
let url = urljoin(batch.apiHost, "/1/batch", batch.dataset);
let req = superagent.post(url);
if (this._proxy) {

@@ -1344,11 +1344,2 @@ req = proxy(req, this._proxy);

// this will absolutely go away with the next major version bump. right now in normal node (CJS) usage,
// users have to do: `let Libhoney = require("libhoney").default;`
//
// switching to rollup fixes that (yay!) but we need to keep it working until we do the major bump. hence
// this hack.
if (typeof module !== "undefined") {
Object.defineProperty(Libhoney, "default", { value: Libhoney });
}
module.exports = Libhoney;

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

import proxy from 'superagent-proxy';
import superagent from 'superagent';
import url from 'url';
import path from 'path';
import proxy from 'superagent-proxy';
import superagent from 'superagent';
import { EventEmitter } from 'events';

@@ -174,3 +174,3 @@

const USER_AGENT = "libhoney-js/1.3.0";
const USER_AGENT = "libhoney-js/2.0.0";

@@ -181,4 +181,4 @@ const _global =

: typeof global !== "undefined"
? global
: undefined;
? global
: undefined;

@@ -448,4 +448,4 @@ // how many events to collect in a batch

eachPromise(batches, batch => {
let url$$1 = urljoin(batch.apiHost, "/1/batch", batch.dataset);
let req = superagent.post(url$$1);
let url = urljoin(batch.apiHost, "/1/batch", batch.dataset);
let req = superagent.post(url);
if (this._proxy) {

@@ -1337,11 +1337,2 @@ req = proxy(req, this._proxy);

// this will absolutely go away with the next major version bump. right now in normal node (CJS) usage,
// users have to do: `let Libhoney = require("libhoney").default;`
//
// switching to rollup fixes that (yay!) but we need to keep it working until we do the major bump. hence
// this hack.
if (typeof module !== "undefined") {
Object.defineProperty(Libhoney, "default", { value: Libhoney });
}
export default Libhoney;
{
"name": "libhoney",
"version": "1.3.0",
"version": "2.0.0",
"description": " Honeycomb.io Javascript library",

@@ -11,3 +11,3 @@ "bugs": "https://github.com/honeycombio/libhoney-js/issues",

"engines": {
"node": "6.* || 8.* || >= 10.*"
"node": "8.* || >= 10.*"
},

@@ -41,3 +41,3 @@ "module": "dist/libhoney.es.js",

"babel-polyfill": "^6.26.0",
"eslint": "^5.15.3",
"eslint": "^6.5.1",
"husky": "^0.14.3",

@@ -47,8 +47,8 @@ "jest": "^24.5.0",

"lint-staged": "^7.2.0",
"prettier": "^1.14.0",
"rollup": "^0.66.6",
"rollup-plugin-commonjs": "^9.1.4",
"rollup-plugin-json": "^3.1.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-replace": "^2.0.0",
"prettier": "^1.18.2",
"rollup": "^1.25.1",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.2.0",
"superagent-mocker": "^0.5.2"

@@ -61,2 +61,5 @@ },

},
"resolutions": {
"https-proxy-agent": "^3.0.0"
},
"jest": {

@@ -63,0 +66,0 @@ "testPathIgnorePatterns": ["dist/", "/node_modules/"]

@@ -7,3 +7,3 @@ # libhoney [![CircleCI](https://circleci.com/gh/honeycombio/libhoney-js.svg?style=svg&circle-token=c7056d820eeaa624756e03c3da01deab9d647663)](https://circleci.com/gh/honeycombio/libhoney-js) [![npm version](https://badge.fury.io/js/libhoney.svg)](https://badge.fury.io/js/libhoney)

Requires any current LTS release of Node.js. Currently v6, v8, and v10. Also tested against v11 but not guaranteed until LTS.
Requires any current LTS release of Node.js. Currently v8, and >= v10.

@@ -10,0 +10,0 @@ - [Usage and Examples](https://docs.honeycomb.io/sdk/javascript/)

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