vbuch / node-signpdf

Simple signing of PDFs in node.
MIT License
679 stars 176 forks source link

Ignore unnecessary files on the release #193

Closed erikn69 closed 10 months ago

erikn69 commented 11 months ago

Before

 === Tarball Details ===
 name:          node-signpdf
 version:       1.5.0
 filename:      node-signpdf-1.5.0.tgz
 package size:  876.1 kB
 unpacked size: 1.1 MB
 shasum:        493997f08b7a6ec8d1ac34622860ba8e19fbc6de
 integrity:     sha512-mVvCGShYKX09X[...]nR15STDvUHefw==
 total files:   101

After

npm publish --dry-run

 📦  node-signpdf@1.5.0
 === Tarball Contents ===
 1.1kB LICENSE
 7.0kB README.md
 1.1kB dist/helpers/const.js
 2.4kB dist/helpers/extractSignature.js
 1.3kB dist/helpers/findByteRange.js
 1.5kB dist/helpers/index.js
 600B  dist/helpers/pdfkit/abstract_reference.js
 4.2kB dist/helpers/pdfkit/pdfobject.js
 4.4kB dist/helpers/pdfkitAddPlaceholder.js
 697B  dist/helpers/pdfkitReferenceMock.js
 1.7kB dist/helpers/plainAddPlaceholder/createBufferPageWithAnnotation.js
 691B  dist/helpers/plainAddPlaceholder/createBufferRootWithAcroform.js
 1.0kB dist/helpers/plainAddPlaceholder/createBufferTrailer.js
 856B  dist/helpers/plainAddPlaceholder/findObject.js
 723B  dist/helpers/plainAddPlaceholder/getIndexFromRef.js
 1.1kB dist/helpers/plainAddPlaceholder/getPageRef.js
 723B  dist/helpers/plainAddPlaceholder/getPagesDictionaryRef.js
 3.8kB dist/helpers/plainAddPlaceholder/index.js
 1.8kB dist/helpers/plainAddPlaceholder/readPdf.js
 3.8kB dist/helpers/plainAddPlaceholder/readRefTable.js
 1.5kB dist/helpers/plainAddPlaceholder/xrefToRefMap.js
 1.3kB dist/helpers/removeTrailingNewLine.js
 7.4kB dist/signpdf.js
 959B  dist/SignPdfError.js
 2.0kB package.json

 === Tarball Details ===
 name:          node-signpdf
 version:       1.5.0
 filename:      node-signpdf-1.5.0.tgz
 package size:  14.7 kB
 unpacked size: 53.5 kB
 shasum:        1d6d796b4a5c3e4662cdc50e7126fddcde3e6439
 integrity:     sha512-e+RsYOqJJggm/[...]CEy6CYk+XnKRQ==
 total files:   25
vbuch commented 11 months ago

Back when this was actively develped I remember I somehow used the 'src' files. Actually, as stated in the README, back then the idea was not to make this a library. Little did I know on its usage. From my current point of view I'm totally fine with this but... it will be released as a major version as it cuts a lot from the package. Will get it released this way soon. Thanks for your PR.

coveralls commented 11 months ago

Pull Request Test Coverage Report for Build 5880625375


Totals Coverage Status
Change from base Build 5600970535: 0.0%
Covered Lines: 331
Relevant Lines: 331

💛 - Coveralls
erikn69 commented 11 months ago

it cuts a lot from the package

Yes, it does, but only when npm i node-signpdf If you want to keep src on this version, I could separate the tests from the src folder

vbuch commented 11 months ago

I like unit tests close to units. Also it does make total sense to omit src. So it will just be a a new version. Nothing much to it. It will be pretty safe to upgrade to it but I'll do it as a major just to make sure we don't break that 1 person using the /src files. I just need some time to check the project out, see what else is getting in this version, write a changelog and whatever a new version entails. Will do in the coming week or so.

vbuch commented 9 months ago

Sorry for the delay @erikn69. It's out with 2.0.0