huan / brolog

Logger for AngularJS in Browser like Npmlog
https://huan.github.io/brolog
Apache License 2.0
10 stars 1 forks source link

Version Number issue #154

Closed hcfw007 closed 2 years ago

hcfw007 commented 2 years ago

Hi, I noticed that recently you upgraded the node requirement for brolog to node 16. In 1.12.4 there was no node version requirement. I think it is a breaking change, as it caused some node 10 apps breaking down when publishing new packages.

huan commented 2 years ago

Thanks for the report.

Please feel free to submit a PR to fix it and I'd like to merge & publish it to NPM.

hcfw007 commented 2 years ago

As far as I know, you can nolonger unpublish a package in NPM. So it's not possible to changed 1.15 into 2.0 etc. What I'm suggesting is that node version requirements changes should be regarded as breaking change and main version number change is due.

huan commented 2 years ago

I have checked the version change history and found that:

  1. The v1.12 has not required Node.js 16
  2. The v1.14 has been added to the Node.js 16 requirement.

See:

https://github.com/huan/brolog/commit/f300ab563effa90e77e36e2489a165a1d1a004ea#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L3

I think the versioning is no problem because the minor version has been bumped.

You can lock your dependencies in the package.json so that you can always use a specific version of the brolog, for example:

  'brolog': '~1.12'

You can learn how to specify a selective version format at https://semver.npmjs.com/

For example:

image

hcfw007 commented 2 years ago

I am aware of locking minor version with tilde mark. The reason I raised this issue is wechaty@0.62.3 has a dependency of brolog with ^ mark so that a recent build of node 10 wechaty app failed. I have solved the problem, however I thought it was something you overlooked. If you found it OK, it's also fine with me. You have my complete support.

huan commented 2 years ago

We can fix this problem by publishing a new version of wechaty@0.62.4 and locking the brolog by changing the ^ to ~.

However, we are working on the wechaty v1.x recently, and upgrading to the latest version of Wechaty with Node.js v16 is recommended.

Feel free to send PR if you believe there's anything that needs to be fixed, thank you very much.

huan commented 2 years ago

@hcfw007 Is there anything that needs to be discussed/solved with this issue?

Could you please help me to close it if it has already been solved? Thanks!

hcfw007 commented 2 years ago

Question answered, so the issue should be closed. Thank.