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

feat: npm updates, security zero, test corrections #296

Merged
merged 8 commits into from
Apr 18, 2022
Merged

Conversation

matt-forster
Copy link
Contributor

@matt-forster matt-forster commented Apr 14, 2022

  • refactor: improve close flow, more accurate logging
  • test: correctly clean up recursive dir test
  • chore(dependencies): update dev deps, bring security notices to zero
  • chore: remove add from lint

BREAKING CHANGE: drop support for node v10 (out of LTS)

@matt-forster matt-forster self-assigned this Apr 14, 2022
@matt-forster matt-forster changed the title chore: npm updates, security zero, test corrections feat: npm updates, security zero, test corrections Apr 14, 2022
@matt-forster matt-forster marked this pull request as ready for review April 14, 2022 21:50
Comment on lines 144 to 161
close() {
this.log.info('Server closing...');
this.server.maxConnections = 0;
return Promise.map(Object.keys(this.connections), (id) => Promise.try(this.disconnectClient.bind(this, id)))
this.log.info('Closing connections:', Object.keys(this.connections).length);

return Promise.all(Object.keys(this.connections).map((id) => this.disconnectClient(id)))
.then(() => new Promise((resolve) => {
this.server.close((err) => {
this.log.info('Server closing...');
if (err) this.log.error(err, 'Error closing server');
resolve('Closed');
});
}))
.then(() => this.removeAllListeners());
.then(() => {
this.log.debug('Removing event listeners...')
this.removeAllListeners();
return;
});
}
Copy link

Choose a reason for hiding this comment

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

Definitely like this extra detail in the logging.

Copy link

@Xjph Xjph left a comment

Choose a reason for hiding this comment

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

👍

@matt-forster matt-forster merged commit bc8abb1 into main Apr 18, 2022
@matt-forster matt-forster deleted the npm-updates branch April 18, 2022 21:50
@botovance
Copy link
Contributor

🎉 This PR is included in version 4.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants