GitShow/tj/node-prune
tj

node-prune

Remove unnecessary files from node_modules (.md, .ts, ...)

by tj
Star on GitHubFork

Go

4.4k stars132 forks19 contributorsQuiet · 3y agoSince 2017v1.0.1MIT

Meet the team

See all 19 on GitHub →
tj
tj63 contributions
reggi
reggi5 contributions
phanindra48
phanindra482 contributions
axetroy
axetroy2 contributions
jhegg
jhegg1 contribution
fengmk2
fengmk21 contribution
rokoroku
rokoroku1 contribution
worst-developer
worst-developer1 contribution

Languages

View on GitHub →
Go100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
42
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · Last activity 3y ago
See all on GitHub →
andrejsoucek
Exclude Flag Pattern Matching Limited to Filename OnlyOpenIssue

Issue description by Claude Summary The flag in node-prune only matches against the base filename/directory name () rather than the full path, making it impossible to exclude files or directories within specific node modules. Current Behavior When using the flag with glob patterns, the pattern is only matched against the filename or directory name, not the full path relative to the target directory. Source Code Reference:** Expected Behavior The exclude patterns should be able to match against the full relative path, allowing for more granular control over what gets excluded. Use Case Example When trying to preserve image assets in a specific package while still allowing pruning of images elsewhere: Problem Scenarios Scenario 1: Package-specific exclusions Scenario 2: Path-specific exclusions Current Workaround The only current workaround is to exclude the entire filename/directory name globally: This is too broad and prevents legitimate pruning in other locations. Proposed Solution Modify the exception matching logic to support both filename patterns and path-based patterns: Alternative Solution Add a separate flag that specifically matches against full paths, keeping the current behavior for backward compatibility.

andrejsoucek · 6mo ago
daguitosama
Unable to get from GitHubOpenIssue

Something happen and you can no longer get this package from GH, it gives you a 503. `

daguitosama · 1y ago
int0x27
Support for armv7lOpenIssue

Currently fails on 32bit Raspberry PI / also in linux/arm Docker containers: I found that using "arch=arm" does work, but this workaround is a bit ugly in Dockerfiles:

int0x27 · 3y ago

Recent fixes

View closed PRs →
tobb-it
Replace go get with go installMergedPR

Since version 1.17 of Go is deprecated. It is suggested to work with instead. https://go.dev/doc/go-get-install-deprecation

tobb-it · 1y ago
schabr06
Exclude Files / Modules ClosedIssue

Hello I am wondering if there is anyway to exclude certain node_modules or directories form being removed while running the prune, it seems to me that in this file it specifies ( https://github.com/tj/node-prune/blob/1159d4cac8090ca0b4a3d900ae81efb72558ea8a/internal/prune/prune.go#L92) that test directories are to be pruned and I have an instance in which I need keep my test folder, but it is getting pruned away. Thanks

schabr06 · 3y ago
amirraouf
tj/node-prune crit platform linux/arm64 is not supported.ClosedIssue

Machine: Mac M1 - MacOs 11.5.2 (20G95) That happened while trying to build Ohmyforms using docker-compose That's the part failed at the dockerfile After pulling the images needed, it failed with this message

amirraouf · 4y ago
Structured data for AI agents

Repository: tj/node-prune. Description: Remove unnecessary files from node_modules (.md, .ts, ...) Stars: 4428, Forks: 132. Primary language: Go. Languages: Go (100%). License: MIT. Latest release: v1.0.1 (8y ago). Open PRs: 5, open issues: 21. Last activity: 3y ago. Community health: 42%. Top contributors: tj, reggi, phanindra48, axetroy, jhegg, fengmk2, rokoroku, worst-developer, qWici, techmexdev and others.

·@ofershap

Replace github.com with gitshow.dev