Skip to content

Commit

Permalink
chore: upgrade prettier (#218)
Browse files Browse the repository at this point in the history
This adds support for yaml and removes the silly newlines in `package{-lock}.json` to avoid conflicts with npm
  • Loading branch information
SimenB committed Sep 17, 2018
1 parent 7fd5477 commit 6a71f47
Show file tree
Hide file tree
Showing 6 changed files with 903 additions and 1,706 deletions.
88 changes: 44 additions & 44 deletions CHANGELOG.md
Expand Up @@ -11,167 +11,167 @@ project adheres to [Semantic Versioning](http://semver.org/).

### Changed

* Allow setting Gauge values to NaN, +Inf, and -Inf
- Allow setting Gauge values to NaN, +Inf, and -Inf

### Added

## [11.1.1] - 2018-06-29

### Changed

* Fixed `processOpenFileDescriptors` metric when no custom config was set
- Fixed `processOpenFileDescriptors` metric when no custom config was set

## [11.1.0] - 2018-06-29

* Added ability to set a name prefix in the default metrics
- Added ability to set a name prefix in the default metrics

### Changed

* Fixed `startTimer` utility to not mutate objects passed as `startLabels`
* Fixed `Counter` to validate labels parameter of `inc()` against initial
- Fixed `startTimer` utility to not mutate objects passed as `startLabels`
- Fixed `Counter` to validate labels parameter of `inc()` against initial
labelset
* Fixed `AggregatorFactory` losing the aggregator method of metrics
- Fixed `AggregatorFactory` losing the aggregator method of metrics

## [11.0.0] - 2018-03-10

### Breaking

* Fixed `gauge.setToCurrentTime()` to use seconds instead of milliseconds
* This conforms to Prometheus
- Fixed `gauge.setToCurrentTime()` to use seconds instead of milliseconds
- This conforms to Prometheus
[best practices](https://prometheus.io/docs/practices/naming/#base-units)
* Dropped support for node 4
- Dropped support for node 4

## [10.2.3] - 2018-02-28

### Breaking

### Changed

* Fixed issue that `registry.getMetricsAsJSON()` ignores registry default labels
- Fixed issue that `registry.getMetricsAsJSON()` ignores registry default labels

### Added

## [10.2.2] - 2017-11-02

### Changed

* Fixed invalid `process_virtual_memory_bytes` reported under linux
- Fixed invalid `process_virtual_memory_bytes` reported under linux

## [10.2.1] - 2017-10-27

### Changed

* Only resolve/reject `clusterMetrics` promise if no callback is provided
- Only resolve/reject `clusterMetrics` promise if no callback is provided

## [10.2.0] - 2017-10-16

### Changed

* Don't add event listeners if cluster module is not used.
* Fixed issue with counters having extra records when using empty labels
- Don't add event listeners if cluster module is not used.
- Fixed issue with counters having extra records when using empty labels

### Added

* Added `reset` to Counter and Gauge
* Added `resetMetrics` to register to calling `reset` of all metric instances
- Added `reset` to Counter and Gauge
- Added `resetMetrics` to register to calling `reset` of all metric instances

## [10.1.1] - 2017-09-26

### Changed

* Update TypeScript definitions and JSDoc comments to match JavaScript sources
* Fix lexical scope of `arguments` in cluster code
- Update TypeScript definitions and JSDoc comments to match JavaScript sources
- Fix lexical scope of `arguments` in cluster code

## [10.1.0] - 2017-09-04

### Added

* Support aggregating metrics across workers in a Node.js cluster.
- Support aggregating metrics across workers in a Node.js cluster.

## [10.0.4] - 2017-08-22

### Changed

* Include invalid values in the error messages
- Include invalid values in the error messages

## [10.0.3] - 2017-08-07

### Added

* Added registerMetric to definitions file
- Added registerMetric to definitions file

### Changed

* Fixed typing of DefaultMetricsCollectorConfiguration in definitions file
* Don't pass timestamps through to pushgateway by default
- Fixed typing of DefaultMetricsCollectorConfiguration in definitions file
- Don't pass timestamps through to pushgateway by default

## [10.0.2] - 2017-07-07

### Changed

* Don't poll default metrics every single tick
- Don't poll default metrics every single tick

## [10.0.1] - 2017-07-06

### Added

* Metrics should be initialized to 0 when there are no labels
- Metrics should be initialized to 0 when there are no labels

## [10.0.0] - 2017-07-04

### Breaking

* Print deprecation warning when metrics are constructed using non-objects
* Print deprecation warning when `collectDefaultMetrics` is called with a number
- Print deprecation warning when metrics are constructed using non-objects
- Print deprecation warning when `collectDefaultMetrics` is called with a number

### Added

* Ability to set default labels by registry
* Allow passing in `registry` as second argument to `collectDefaultMetrics` to
- Ability to set default labels by registry
- Allow passing in `registry` as second argument to `collectDefaultMetrics` to
use that instead of the default registry

### Changed

* Convert code base to ES2015 code (node 4)
* add engines field to package.json
* Use object shorthand
* Remove `util-extend` in favor of `Object.assign`
* Arrow functions over binding or putting `this` in a variable
* Use template strings
* `prototype` -> `class`
- Convert code base to ES2015 code (node 4)
- add engines field to package.json
- Use object shorthand
- Remove `util-extend` in favor of `Object.assign`
- Arrow functions over binding or putting `this` in a variable
- Use template strings
- `prototype` -> `class`

## [9.1.1] - 2017-06-17

### Changed

* Don't set timestamps for metrics that are never updated
- Don't set timestamps for metrics that are never updated

## [9.1.0] - 2017-06-07

### Added

* Ability to merge registries
- Ability to merge registries

### Changed

* Correct typedefs for object constructor of metrics
- Correct typedefs for object constructor of metrics

## [9.0.0] - 2017-05-06

### Added

* Support for multiple registers
* Support for object literals in metric constructors
* Timestamp support
- Support for multiple registers
- Support for object literals in metric constructors
- Timestamp support

### Changed

* Collection of default metrics is now disabled by default. Start collection by
- Collection of default metrics is now disabled by default. Start collection by
running `collectDefaultMetrics()`.

### Deprecated

* Creating metrics with one argument per parameter - use object literals
- Creating metrics with one argument per parameter - use object literals
instead.

[unreleased]: https://github.com/siimon/prom-client/compare/v10.2.2...HEAD
Expand Down
8 changes: 4 additions & 4 deletions appveyor.yml
Expand Up @@ -3,10 +3,10 @@ init:

environment:
matrix:
- nodejs_version: 6
- nodejs_version: 7
- nodejs_version: 8
- nodejs_version: 9
- nodejs_version: 6
- nodejs_version: 7
- nodejs_version: 8
- nodejs_version: 9

install:
- ps: Install-Product node $env:nodejs_version
Expand Down
4 changes: 3 additions & 1 deletion lib/counter.js
Expand Up @@ -156,7 +156,9 @@ function createValue(hashMap, value, timestamp, labels, hash) {
hash = hash || '';
timestamp = isDate(timestamp)
? timestamp.valueOf()
: Number.isFinite(timestamp) ? timestamp : undefined;
: Number.isFinite(timestamp)
? timestamp
: undefined;
if (hashMap[hash]) {
hashMap[hash].value += value;
hashMap[hash].timestamp = timestamp;
Expand Down
4 changes: 3 additions & 1 deletion lib/util.js
Expand Up @@ -30,7 +30,9 @@ exports.setValue = function setValue(hashMap, value, labels, timestamp) {
labels: labels || {},
timestamp: isDate(timestamp)
? timestamp.valueOf()
: Number.isFinite(timestamp) ? timestamp : undefined
: Number.isFinite(timestamp)
? timestamp
: undefined
};
return hashMap;
};
Expand Down

0 comments on commit 6a71f47

Please sign in to comment.