pdupavillon / express-recaptcha

Implementation of google recaptcha v2 & V3 solutions for express.js
MIT License
128 stars 21 forks source link

Breaking Changes in v4.2.0 #30

Closed KingMarcin closed 5 years ago

KingMarcin commented 5 years ago

var Recaptcha = require('express-recaptcha').Recaptcha; var recaptcha = new Recaptcha('xxx', 'xxx');

This code works in 4.1.1, but throws an error on 4.2.0.

Version 4.2.0 requires adding the V2.

var Recaptcha = require('express-recaptcha').RecaptchaV2;

This is a breaking change, so you should change the version number to 5.0.0 for this release. You should also release an update to 4.2.1 with this change reversed, to help people who depend on your package working as it usually did.

Please see the npm documentation page about semantic versioning for more information.

pdupavillon commented 5 years ago

@KingMarcin agreed, I'll do the change

KingMarcin commented 5 years ago

Wow, that was quick. Great work on the fix and on this package in general. Thanks!

KingMarcin commented 5 years ago

Is it possible for you to still release a version 4.2.1 with the changes reversed? It's quite important, since people using 4.1.1 will be updated to 4.2.0 by default when running npm up and get this breaking change. You can also consider deleting version 4.2.0, but I don't know if that's possible. The spec recommends adding a new version when something like this happens.

pdupavillon commented 5 years ago

@KingMarcin I deprecated to the version 4.2.0 instead

KingMarcin commented 5 years ago

Oh, okay. It works as expected now. Great!

Thanks again.

franck34 commented 5 years ago

Thank you men !