@shopify/statsd
Advanced tools
Comparing version 3.0.12 to 4.0.0
@@ -5,15 +5,11 @@ 'use strict'; | ||
var _rollupPluginBabelHelpers = require('./_virtual/_rollupPluginBabelHelpers.js'); | ||
var hotShots = require('hot-shots'); | ||
var changeCase = require('change-case'); | ||
const _excluded = ["logger"]; | ||
const UNKNOWN = 'Unknown'; | ||
class StatsDClient { | ||
constructor(_ref) { | ||
let { | ||
logger | ||
} = _ref, | ||
options = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded); | ||
constructor({ | ||
logger, | ||
...options | ||
}) { | ||
this.statsd = void 0; | ||
@@ -27,7 +23,7 @@ this.logger = console; | ||
this.options = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, options), {}, { | ||
this.options = { ...options, | ||
errorHandler: options.errorHandler ? options.errorHandler : error => { | ||
this.logger.log(`Error occurred in the StatsD client:\n${error.stack || error.message}`); | ||
} | ||
}); | ||
}; | ||
this.statsd = new hotShots.StatsD(this.options); | ||
@@ -34,0 +30,0 @@ } |
{ | ||
"name": "@shopify/statsd", | ||
"version": "3.0.12", | ||
"version": "4.0.0", | ||
"license": "MIT", | ||
@@ -24,3 +24,3 @@ "description": "An opinionated StatsD client for Shopify Node.js servers and other StatsD utilities", | ||
"engines": { | ||
"node": ">=12.14.0" | ||
"node": "^14.17.0 || >=16.0.0" | ||
}, | ||
@@ -46,6 +46,5 @@ "dependencies": { | ||
"require": "./index.js" | ||
}, | ||
"./*": "./*" | ||
} | ||
}, | ||
"gitHead": "70feded397084daea784a8c5a523a61ac4fdb34c" | ||
"gitHead": "ef9afc562672dcda9d7800753dc6b777ecd2d751" | ||
} |
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
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
13015
16
187