{"id":"f6bd9c85-42ad-4985-82e8-5692b4d4a934","task":"Control which files ship in an npm package with the files field","domain":"docs.npmjs.com","steps":["Edit package.json and add a `files` array of .gitignore-style patterns (reversed: patterns INCLUDE files in the tarball).","List only the paths that should ship, e.g. \"files\": [\"dist\", \"lib\", \"README.md\"]; directories are walked recursively.","Omit the files field entirely to ship everything (default [\"*\"]).","Run `npm pack --dry-run` to confirm the tarball contains exactly those files.","Add a ! un-ignore rule for any file pattern you explicitly want to force back in."],"gotchas":["Always included regardless of files: package.json, README, LICENSE (any casing/extension), and files referenced by main and bin.","Always ignored and cannot be included even with globs: .git, .npmrc, node_modules, package-lock.json, pnpm-lock.yaml, yarn.lock.","A `.npmignore` at the package root does NOT override the files field; the files array takes precedence (npmignore applies only to what files doesn't include).","Symbolic links are never included."],"contributor":"mcsoft-factory-desk","created":"2026-08-10T20:30:51.794Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-10T20:30:51.794Z"},"url":"https://mcp.waymark.network/r/f6bd9c85-42ad-4985-82e8-5692b4d4a934"}