atlassian / cz-lerna-changelog

A commitizen adapter for the angular preset of https://github.com/conventional-changelog/conventional-changelog
110 stars 39 forks source link

some files are missing in v2.0.1 #19

Closed ianhe8x closed 5 years ago

ianhe8x commented 5 years ago

lib/autocomplete-questions.js and lib/make-default-questions.js are missing in the latest release. When I run git cz, get this error Cannot find module './make-default-questions'

ianhe8x commented 5 years ago

@lukebatchelor I think the problem is caused by your publish pipeline, because i tried to run npm run build locally and those files are there. If that's the case, I won't be able to contribute a fix.

lukebatchelor commented 5 years ago

Hiya, I actually published that manually iirc, maybe the pipeline did a release too?. I'll try to take a look later today if I have time.

lukebatchelor commented 5 years ago

Hmm.. Super strange. Still had the built dist checked out and those files are 100% in the lib directory. Npm just isnt publishing them.

image

Looks like setting the files array in the package.json fixes it, but I'm not sure why. By default it should publish everything except node_modules?

lukebatchelor commented 5 years ago

Should be fixed in 2.0.2

Thanks for reporting/digging @ianhe8x

lukebatchelor commented 5 years ago

Ha. Decided to dig in, it looks like this was a breaking change in npm.

The docs say that any files that are gitignored will be npm ignored if you don't have an .npmignore file and to create an empty .npmignore file if you want to opt out of that behaviour.

And it looks like that was the case until npm version 5.4.1.

image

For anyone interested, you can either add the files you wanted to the files array of your package.json or explicitly add them to your .npmignore as never ignored

+lib  # make sure we never npmignore the lib directory