Comparing version 2.2.3 to 2.3.0
# libhoney-js changelog | ||
## [2.3.0] - 2021-04-28 | ||
### Enhancements | ||
- add "stdout" transmission implementation (#119) | [@jharley](https://github.com/jharley) | ||
### Fixed | ||
- fix npm publish (#110) | [@vreynolds](https://gihtub.com/vreynolds) | ||
### Maintenance | ||
- Bump y18n from 4.0.0 to 4.0.1 (#113) | ||
## [2.2.2] - 2021-03-18 | ||
@@ -4,0 +18,0 @@ |
@@ -177,3 +177,3 @@ 'use strict'; | ||
const USER_AGENT = "libhoney-js/2.2.2"; | ||
const USER_AGENT = "libhoney-js/2.3.0"; | ||
@@ -354,2 +354,12 @@ const _global = | ||
class StdoutTransmission { | ||
sendEvent(ev) { | ||
process.stdout.write(JSON.stringify(ev) + "\n"); | ||
} | ||
sendPresampledEvent(ev) { | ||
process.stdout.write(JSON.stringify(ev) + "\n"); | ||
} | ||
} | ||
class NullTransmission { | ||
@@ -927,2 +937,3 @@ sendEvent(_ev) {} | ||
// - "console": an implementation that logs correct json objects to the console for all events sent. | ||
// - "stdout": an implementation that logs correct json objects to standard out, useful for environments where console.log is not ideal (e.g. AWS Lambda) | ||
// - "null": an implementation that does nothing | ||
@@ -1351,2 +1362,4 @@ transmission: "base", | ||
return ConsoleTransmission; | ||
case "stdout": | ||
return StdoutTransmission; | ||
default: | ||
@@ -1369,3 +1382,3 @@ throw new Error( | ||
throw new Error( | ||
".transmission must be one of 'base'/'worker'/'mock'/'writer'/'console'/'null' or a constructor." | ||
".transmission must be one of 'base'/'worker'/'mock'/'writer'/'console'/'stdout'/'null' or a constructor." | ||
); | ||
@@ -1398,12 +1411,12 @@ } | ||
/** | ||
* Concatenates two arrays while keeping the length of the returned result | ||
* less than the limit. As many elements from arr2 will be appended onto the | ||
* end of arr1 as will remain under the limit. If arr1 is already too long it | ||
* will be truncated to match the limit. Order is preserved; arr2's contents | ||
* will appear after those already in arr1. | ||
* | ||
* Modifies and returns arr1. | ||
*/ | ||
function concatWithMaxLimit(arr1, arr2, limit) { | ||
/** | ||
* Concatenates two arrays while keeping the length of the returned result | ||
* less than the limit. As many elements from arr2 will be appended onto the | ||
* end of arr1 as will remain under the limit. If arr1 is already too long it | ||
* will be truncated to match the limit. Order is preserved; arr2's contents | ||
* will appear after those already in arr1. | ||
* | ||
* Modifies and returns arr1. | ||
*/ | ||
function concatWithMaxLimit(arr1, arr2, limit) { | ||
// if queue is full or somehow over the max | ||
@@ -1410,0 +1423,0 @@ if (arr1.length >= limit) { |
@@ -196,3 +196,3 @@ 'use strict'; | ||
const USER_AGENT = "libhoney-js/2.2.2"; | ||
const USER_AGENT = "libhoney-js/2.3.0"; | ||
@@ -373,2 +373,12 @@ const _global = | ||
class StdoutTransmission { | ||
sendEvent(ev) { | ||
process.stdout.write(JSON.stringify(ev) + "\n"); | ||
} | ||
sendPresampledEvent(ev) { | ||
process.stdout.write(JSON.stringify(ev) + "\n"); | ||
} | ||
} | ||
class NullTransmission { | ||
@@ -951,2 +961,3 @@ sendEvent(_ev) {} | ||
// - "console": an implementation that logs correct json objects to the console for all events sent. | ||
// - "stdout": an implementation that logs correct json objects to standard out, useful for environments where console.log is not ideal (e.g. AWS Lambda) | ||
// - "null": an implementation that does nothing | ||
@@ -1375,2 +1386,4 @@ transmission: "base", | ||
return ConsoleTransmission; | ||
case "stdout": | ||
return StdoutTransmission; | ||
default: | ||
@@ -1393,3 +1406,3 @@ throw new Error( | ||
throw new Error( | ||
".transmission must be one of 'base'/'worker'/'mock'/'writer'/'console'/'null' or a constructor." | ||
".transmission must be one of 'base'/'worker'/'mock'/'writer'/'console'/'stdout'/'null' or a constructor." | ||
); | ||
@@ -1422,12 +1435,12 @@ } | ||
/** | ||
* Concatenates two arrays while keeping the length of the returned result | ||
* less than the limit. As many elements from arr2 will be appended onto the | ||
* end of arr1 as will remain under the limit. If arr1 is already too long it | ||
* will be truncated to match the limit. Order is preserved; arr2's contents | ||
* will appear after those already in arr1. | ||
* | ||
* Modifies and returns arr1. | ||
*/ | ||
function concatWithMaxLimit(arr1, arr2, limit) { | ||
/** | ||
* Concatenates two arrays while keeping the length of the returned result | ||
* less than the limit. As many elements from arr2 will be appended onto the | ||
* end of arr1 as will remain under the limit. If arr1 is already too long it | ||
* will be truncated to match the limit. Order is preserved; arr2's contents | ||
* will appear after those already in arr1. | ||
* | ||
* Modifies and returns arr1. | ||
*/ | ||
function concatWithMaxLimit(arr1, arr2, limit) { | ||
// if queue is full or somehow over the max | ||
@@ -1434,0 +1447,0 @@ if (arr1.length >= limit) { |
@@ -173,3 +173,3 @@ import superagent from 'superagent'; | ||
const USER_AGENT = "libhoney-js/2.2.2"; | ||
const USER_AGENT = "libhoney-js/2.3.0"; | ||
@@ -350,2 +350,12 @@ const _global = | ||
class StdoutTransmission { | ||
sendEvent(ev) { | ||
process.stdout.write(JSON.stringify(ev) + "\n"); | ||
} | ||
sendPresampledEvent(ev) { | ||
process.stdout.write(JSON.stringify(ev) + "\n"); | ||
} | ||
} | ||
class NullTransmission { | ||
@@ -928,2 +938,3 @@ sendEvent(_ev) {} | ||
// - "console": an implementation that logs correct json objects to the console for all events sent. | ||
// - "stdout": an implementation that logs correct json objects to standard out, useful for environments where console.log is not ideal (e.g. AWS Lambda) | ||
// - "null": an implementation that does nothing | ||
@@ -1352,2 +1363,4 @@ transmission: "base", | ||
return ConsoleTransmission; | ||
case "stdout": | ||
return StdoutTransmission; | ||
default: | ||
@@ -1370,3 +1383,3 @@ throw new Error( | ||
throw new Error( | ||
".transmission must be one of 'base'/'worker'/'mock'/'writer'/'console'/'null' or a constructor." | ||
".transmission must be one of 'base'/'worker'/'mock'/'writer'/'console'/'stdout'/'null' or a constructor." | ||
); | ||
@@ -1399,12 +1412,12 @@ } | ||
/** | ||
* Concatenates two arrays while keeping the length of the returned result | ||
* less than the limit. As many elements from arr2 will be appended onto the | ||
* end of arr1 as will remain under the limit. If arr1 is already too long it | ||
* will be truncated to match the limit. Order is preserved; arr2's contents | ||
* will appear after those already in arr1. | ||
* | ||
* Modifies and returns arr1. | ||
*/ | ||
function concatWithMaxLimit(arr1, arr2, limit) { | ||
/** | ||
* Concatenates two arrays while keeping the length of the returned result | ||
* less than the limit. As many elements from arr2 will be appended onto the | ||
* end of arr1 as will remain under the limit. If arr1 is already too long it | ||
* will be truncated to match the limit. Order is preserved; arr2's contents | ||
* will appear after those already in arr1. | ||
* | ||
* Modifies and returns arr1. | ||
*/ | ||
function concatWithMaxLimit(arr1, arr2, limit) { | ||
// if queue is full or somehow over the max | ||
@@ -1411,0 +1424,0 @@ if (arr1.length >= limit) { |
{ | ||
"name": "libhoney", | ||
"version": "2.2.3", | ||
"version": "2.3.0", | ||
"description": " Honeycomb.io Javascript library", | ||
@@ -5,0 +5,0 @@ "bugs": "https://github.com/honeycombio/libhoney-js/issues", |
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
147010
3845
0