Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Remove tests from npm package to reduce npm package size #388

Merged
merged 1 commit into from Jan 17, 2024
Merged

Remove tests from npm package to reduce npm package size #388

merged 1 commit into from Jan 17, 2024

Conversation

boidolr
Copy link
Contributor

@boidolr boidolr commented Aug 15, 2023

Excluding the tests from the package reduces its install size by about half (tested with npm 9.8.0).
Before:

❯ npm pack
...
npm notice === Tarball Details ===
npm notice name:          @cloudflare/kv-asset-handler
npm notice version:       0.3.0
npm notice filename:      cloudflare-kv-asset-handler-0.3.0.tgz
npm notice package size:  25.3 kB
npm notice unpacked size: 112.1 kB
npm notice shasum:        11f0af0749a400ddadcca16dcd6f4696d7036991
npm notice integrity:     sha512-9CB/MKf/wdvbf[...]DlNrDcDhdWHSQ==
npm notice total files:   25

After:

❯ npm pack
...
npm notice === Tarball Details ===
npm notice name:          @cloudflare/kv-asset-handler
npm notice version:       0.3.0
npm notice filename:      cloudflare-kv-asset-handler-0.3.0.tgz
npm notice package size:  19.8 kB
npm notice unpacked size: 66.0 kB
npm notice shasum:        ffd10c82056c54dd2b0cd59017f16fbca88dd956
npm notice integrity:     sha512-e1CuDkBEtFcu+[...]0zISBUJOnC9TQ==
npm notice total files:   13

@boidolr boidolr requested a review from a team as a code owner August 15, 2023 19:01
@kristianfreeman kristianfreeman merged commit 3d6cd63 into cloudflare:main Jan 17, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants