frinyvonnick / gitmoji-changelog

A changelog generator for gitmoji 😜
https://www.npmjs.com/package/gitmoji-changelog
MIT License
390 stars 49 forks source link

:bug:(preset-node) read-pkg-up rename key #192

Closed chengcyber closed 3 years ago

chengcyber commented 4 years ago

Fix https://github.com/frinyvonnick/gitmoji-changelog/issues/181

package read-pkg-up has a breaking change on return object shape.

See:

  1. pkg -> package https://github.com/sindresorhus/read-pkg-up/commit/1c15896aefca09af0be050eb27819ac6970362d4#diff-168726dbe96b3ce427e7fedce31bb0bc
  2. package -> packageJson https://github.com/sindresorhus/read-pkg-up/commit/8140c731da0c4ddfedd549d55660acf0ee53ee1d#diff-168726dbe96b3ce427e7fedce31bb0bc
frinyvonnick commented 3 years ago

Hi @chengcyber thank you for opening this merge request 🙏

I don't understand how you can experience this issue since I did not update this dependency and it is covered by e2e tests. Can you explain it to me?

chengcyber commented 3 years ago

I got an existing repository, which has already been installed a upgraded version of read-pkg-up. then, i install the gitmoji-changelog, since the read-pkg-up is another version, the read-pkg-up will be located at project_root/node_modules/gitmoji-changelog/read-pkg-up. when i run gitmoji cli, it requires the top level read-pkg-up at project_root/node_modules/read-pkg-up, which is a edge case this PR is fixing

frinyvonnick commented 3 years ago

I would prefer to explicitly update the dependency rather than handling edge cases like that. Can you update your PR accordingly, please 🙏 ?