[RRFC] Exclude `node_modules` from Time Machine backups (macOS)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- tooling
Research direction
Start by reviewing the RFC's desired behavior and its referenced Cargo and Poetry implementations, then identify the npm code path that creates or manages node_modules folders. Done means node_modules folders receive the specified macOS backup-exclusion xattr and the behavior is verified on macOS.
Written by the indexing model from the issue text.
Description
Motivation
node_modules often contains a lot of files that change frequently, which can significantly slow down backup solutions like Time Machine, so it would make sense to exclude them from backups.
How
Current Behaviour
node_modules folders are included in Time Machine backups
Desired Behaviour
Exclude node_modules from Time Machine backups using a "sticky exclusion". This can be done by adding the xattr com.apple.metadata:com_apple_backup_excludeItem to the node_modules folders with the value com.apple.backupd encoded as a binary plist:
00000000 62 70 6C 69 73 74 30 30 5F 10 11 63 6F 6D 2E 61 |bplist00_..com.a|
00000010 70 70 6C 65 2E 62 61 63 6B 75 70 64 08 00 00 00 |pple.backupd....|
00000020 00 00 00 01 01 00 00 00 00 00 00 00 01 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 1C |.............|
0000003d
References
Rust already does this for their target folders: https://github.com/rust-lang/cargo/pull/4386
My PR for implementing this for the poetry Python package manager: https://github.com/python-poetry/poetry/pull/4599
- Dominant language
- JavaScript
- Stars
- 777
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from npm/rfcs
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
[RRFC] <title> Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100