orama icon indicating copy to clipboard operation
orama copied to clipboard

chore: do not publish source files to npm

Open iShibi opened this issue 2 years ago • 5 comments

30.3 MB Unpacked Size 😨😅

This change will make sure that only the dist folder and other files like LICENSE, README, and package.json get published to npm.

iShibi avatar Aug 05 '22 21:08 iShibi

You're right, but we had some problems in the past while publishing the dist folder only. Let me try pull your branch and test a publication on Verdaccio 🙂

micheleriva avatar Aug 06 '22 09:08 micheleriva

@iShibi for some reason this is not working. Would you mind testing a publication against a local version of Verdaccio?

micheleriva avatar Aug 06 '22 09:08 micheleriva

Publishing works fine for me after bumping the version to 0.0.4 since <=0.0.3 are already available on npm:

lyra-1 --- snip --- lyra-2

iShibi avatar Aug 06 '22 11:08 iShibi

@iShibi I was able to publish on Verdaccio too, but after trying to install from there, I don't get the dist folder

micheleriva avatar Aug 07 '22 08:08 micheleriva

That's weird, because everything works fine for me:

test

iShibi avatar Aug 07 '22 08:08 iShibi

Thanks for the heads up, I'll verify this with my team

micheleriva avatar Aug 08 '22 07:08 micheleriva

@micheleriva Any updates on this?

I tested verdaccio a little more and found out that without the files field it does not publish gitignored folders/files, which in this case are coverage, node_modules, and dist. Just wanted to double check whether you had this files field in the package.json while publishing.

iShibi avatar Aug 10 '22 18:08 iShibi

It could be a valuable part of this to run pnpm run pack as part of the CI pipeline.

I am not suggesting continuous deployment/release, but just ensuring the contents of the package are in a releasable state.

This will give a debug level log of the assets that will pack and we can trust CI instead of reasoning around the differences on specific setups :+1:

simonireilly avatar Aug 15 '22 15:08 simonireilly

Fixed in v0.1.3

micheleriva avatar Aug 26 '22 10:08 micheleriva