Skip to content

npm distribution debloat - #199

Closed
Camlan1 wants to merge 3 commits into
MichaelXF:masterfrom
Camlan1:cleanup/npm-distribution
Closed

npm distribution debloat#199
Camlan1 wants to merge 3 commits into
MichaelXF:masterfrom
Camlan1:cleanup/npm-distribution

Conversation

@Camlan1

@Camlan1 Camlan1 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

The current package ships dev files (dev/, .github/, etc.) bloating the tarball significantly, 49.5MB unpacked across 623 files. Switches from a 137-line .npmignore blacklist to a files whitelist, reducing it to 277.2 KB across 5 files (99.44% reduction).

Also replaces Babel with tsdown to emit proper compiled .d.ts files. Previously index.d.ts pointed at raw src/ files, pulling them into consumers' type checking.

@Camlan1
Camlan1 marked this pull request as draft June 13, 2026 07:49
@Camlan1
Camlan1 force-pushed the cleanup/npm-distribution branch 4 times, most recently from ce87c37 to c5e41a8 Compare June 13, 2026 09:17
@Camlan1 Camlan1 changed the title build: migrate to tsdown, fix type declarations and npm distribution npm distribution debloat Jun 13, 2026
@Camlan1
Camlan1 marked this pull request as ready for review June 13, 2026 09:26
@Camlan1
Camlan1 force-pushed the cleanup/npm-distribution branch from c5e41a8 to 8f4a4e6 Compare June 14, 2026 05:59
@Camlan1
Camlan1 force-pushed the cleanup/npm-distribution branch from 8f4a4e6 to eca838b Compare June 14, 2026 06:24
@Camlan1

Camlan1 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

Forced pushed to drop the ESM output due to default export issues. Sticking with CommonJS only, which aligns with the existing js-confuser implementation.

@MichaelXF MichaelXF closed this in 729f16a Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant