Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.0.0 #8

Merged
merged 8 commits into from
Dec 30, 2021
Merged

Version 1.0.0 #8

merged 8 commits into from
Dec 30, 2021

Conversation

edclement
Copy link
Contributor

@edclement edclement commented Dec 23, 2021

fixes #7
resolves #2
resolves #4
resolves #5
relates to #6

Changes

  • Update all dependencies to latest versions
  • Remove babel from the build process and rely only on TypeScript for transpiling files
  • Use standard-version to manage CHANGELOG and versioning. Version bumped to 1.0.0 in package.json
  • Use commitizen to generate commit messages and commitlint to validate commit msgs
  • Implement ability to collect default prometheus metrics
  • Fix issue where package download counters were not fully accurate
  • Add .npmignore file in preparation for publishing to npm registry
  • breaking - Configuration option enabled changed to metricsEnabled. Avoids collision with other plugin
    configurations that are merged into the configuration object passed to the plugin

TODO

  • Test in Verdaccio instance running in Docker. Initial testing was done in a local/debug instance of Verdaccio without transpiling.
  • Publish to public npm registry after PR is merged.

Ed Clement added 8 commits December 23, 2021 13:54
…nd versioning

Also use commitizen to generate commit messages and commitlint to validate commit msgs

re #5
…sEnabled`

Rename configuration property `enabled` to `metricsEnabled` to avoid collision with other plugin
configurations that are merged into the configuration object passed to the plugin.

BREAKING CHANGE: configuration option `enabled` changed to `metricsEnabled`
Add configuration option `collectDefaultMetrics` that when set to `true` will enable the plugin to
collect default prometheus client metrics (e.g. cpu/ram)

fix #4
…y accurate

During real world testing, the count of package downloads almost always came in lower then it should
have. It seems that sometimes the npm client kills the connection prior to Express thinking the full
response has been sent. The solution seems to be to rely on the `close` event instead of the
`finish` event on the response object.

fix #7
@edclement edclement added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Dec 23, 2021
@edclement edclement self-assigned this Dec 23, 2021
@edclement edclement marked this pull request as ready for review December 29, 2021 19:28
Comment on lines 93 to +94
// the metrics for this request until the response 'finish' event is emitted.
res.once('finish', () => {
res.once('close', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment wasn't updated, so these don't quite match up anymore.

@Splaktar Splaktar merged commit 0a19348 into main Dec 30, 2021
@Splaktar Splaktar deleted the version_1.0.0 branch December 30, 2021 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
2 participants