Closed Sekhmet closed 2 years ago
Currently npm package will include all files in the repository, including source code, tests, and repository config.
This PR uses package.json's files property to limit those to only needed files.
package.json
files
Run npm pack --dry-run.
npm pack --dry-run
npm notice npm notice 📦 borsh@0.6.0 npm notice === Tarball Contents === npm notice 11.3kB LICENSE-APACHE npm notice 15.3kB lib/index.js npm notice 1.7kB package.json npm notice 2.7kB README.md npm notice 1.8kB lib/index.d.ts npm notice 1.0kB LICENSE-MIT.txt npm notice === Tarball Details === npm notice name: borsh npm notice version: 0.6.0 npm notice filename: borsh-0.6.0.tgz npm notice package size: 10.1 kB npm notice unpacked size: 33.8 kB npm notice shasum: b5e12624db0884d7ad753dc0a11337fba370a4de npm notice integrity: sha512-D4/Tg//Ybk70/[...]3DxjYz1rECCmA== npm notice total files: 6 npm notice borsh-0.6.0.tgz
npm notice npm notice 📦 borsh@0.6.0 npm notice === Tarball Contents === npm notice 9B .prettierignore npm notice 160B borsh-ts/test/fuzz/corpus/004b705c22403d1c22ceab37181f6340b5b269b7faee05d97fe65b1ab91cd171 npm notice 163B borsh-ts/test/fuzz/corpus/25b2da453a8cb0d574d31a06f0a57fc7b5f2cb5c08ba00ff900a79ebd0637da7 npm notice 168B borsh-ts/test/fuzz/corpus/2f6f8117189cb82e111a13b3ffb19fcaf35deef41f8c084726c5aac5a4551696 npm notice 160B borsh-ts/test/fuzz/corpus/4eb3f263ac0d9bac83d67e28d3381c64c61654579dc455a9e5ccaa54bc093721 npm notice 164B borsh-ts/test/fuzz/corpus/5a0ac0f8936af102c2ea974ba237896a8ee4dffebd27b65c8101a1d8897d6409 npm notice 155B borsh-ts/test/fuzz/corpus/67fc403d488908e0a27d74a2de056c34c40850bbe61b9ebc82cf48365484f4fc npm notice 155B borsh-ts/test/fuzz/corpus/7fa19d2ffc291390ebe8a238baae9bddbd620d018f803540e09ac1bc82ec3a6c npm notice 155B borsh-ts/test/fuzz/corpus/824d229c23c200a937bcd558a5c55d25830a8efffb9e8661a81e2db3584ca512 npm notice 168B borsh-ts/test/fuzz/corpus/9d6a787b7d95c13bb67d02137cf3e506f550fcfa19363050d1e4917250d83d32 npm notice 160B borsh-ts/test/fuzz/corpus/a330e2fd8d25278e3d28205107e67373646fe7c5370030819ccc13990375ca73 npm notice 155B borsh-ts/test/fuzz/corpus/a53d5be4493c7cccab1d70bdaf44b17f2cd52501f1b5567ed05406163cf96fef npm notice 170B borsh-ts/test/fuzz/corpus/b7361e727623b1cdafda1411e27c119009d0fcccbdddd5fe669c8c02bf04f7dd npm notice 155B borsh-ts/test/fuzz/corpus/b98f80e8a618038000215158136c1f2dbd9ed3cad450556faf7b18db4184b42e npm notice 164B borsh-ts/test/fuzz/corpus/bec080831059d96afd82176d6e8ee36819bb22b7304f4e23f61d189a6c221f92 npm notice 160B borsh-ts/test/fuzz/corpus/cf94b13d93b7accf950d3d2a1be308f7d25d21f81622a7ffc7da3733c03eb572 npm notice 8B CNAME npm notice 21B CODEOWNERS npm notice 109B borsh-ts/test/fuzz/corpus/d2897d4dc13f861fb5e7caf8e5b7e1c9962a36c8489ada9cb0f798c1ec967eb7 npm notice 155B borsh-ts/test/fuzz/corpus/dfbc571f6a049f8f66f2fcb510fffc51f5c78078db2a2fb5cf19b0bd840291ee npm notice 174B borsh-ts/test/fuzz/corpus/e08ccfae0c2fd6432c8e1bf841050f0b2d78fa519ac76f178db0757d1bd3e96e npm notice 155B borsh-ts/test/fuzz/corpus/ecd71b60d1820dbbcb06d1f981ab86d16876888bb7ba665637c5717c0a8916b2 npm notice 11.3kB LICENSE-APACHE npm notice 703B borsh-ts/test/fuzz/borsh-roundtrip.js npm notice 594B borsh-ts/test/fuzz/transaction-example/enums.js npm notice 15.3kB lib/index.js npm notice 4.3kB borsh-ts/test/fuzz/transaction-example/key_pair.js npm notice 533B borsh-ts/test/fuzz/transaction-example/serialize.js npm notice 6.0kB borsh-ts/test/serialize.test.js npm notice 3.2kB borsh-ts/test/fuzz/transaction-example/signer.js npm notice 9.1kB borsh-ts/test/fuzz/transaction-example/transaction.js npm notice 1.6kB package.json npm notice 582B tsconfig.json npm notice 2.7kB README.md npm notice 170B borsh-ts/test/fuzz/transaction-example/enums.d.ts npm notice 1.8kB lib/index.d.ts npm notice 12.2kB borsh-ts/index.ts npm notice 1.9kB borsh-ts/test/fuzz/transaction-example/key_pair.d.ts npm notice 1.4kB borsh-ts/test/fuzz/transaction-example/serialize.d.ts npm notice 2.8kB borsh-ts/test/fuzz/transaction-example/signer.d.ts npm notice 4.1kB borsh-ts/test/fuzz/transaction-example/transaction.d.ts npm notice 1.0kB LICENSE-MIT.txt npm notice 262B .eslintrc.yml npm notice 466B borsh-ts/.eslintrc.yml npm notice 49B borsh-ts/test/.eslintrc.yml npm notice 242B .travis.yml npm notice 565B .github/workflows/borsh.yml npm notice === Tarball Details === npm notice name: borsh npm notice version: 0.6.0 npm notice filename: borsh-0.6.0.tgz npm notice package size: 23.7 kB npm notice unpacked size: 86.0 kB npm notice shasum: f6b29a3bfa335f197048426b890cf347c0efde0c npm notice integrity: sha512-9yad0Vm46G84v[...]EjexbjkFcV36w== npm notice total files: 47 npm notice borsh-0.6.0.tgz
Currently npm package will include all files in the repository, including source code, tests, and repository config.
This PR uses
package.json
'sfiles
property to limit those to only needed files.Tests
Run
npm pack --dry-run
.After
Before