Skip to content

chore: use files allow list for the published package - #167

Closed
slagiewka wants to merge 1 commit into
fastify:mainfrom
slagiewka:package_json_files_allow_list
Closed

slagiewka wants to merge 1 commit into
fastify:mainfrom
slagiewka:package_json_files_allow_list

Conversation

@slagiewka

Copy link
Copy Markdown

Eliminates .github, benchmarks, test, types test and config files from the root.
I know that some maintainers want to ship test with the package, I can re-add the directory if needed.

Before

npm pack --dry-run
npm warn gitignore-fallback No .npmignore file found, using .gitignore for file exclusion. Consider creating a .npmignore file to explicitly control published files.
npm notice
npm notice 📦  @fastify/error@4.2.0
npm notice Tarball Contents
npm notice 80B .gitattributes
npm notice 1.4kB .github/dependabot.yml
npm notice 651B .github/workflows/ci.yml
npm notice 293B .github/workflows/lock-threads.yml
npm notice 1.1kB LICENSE
npm notice 5.5kB README.md
npm notice 319B benchmarks/create.js
npm notice 1.1kB benchmarks/instantiate.js
npm notice 547B benchmarks/no-stack.js
npm notice 373B benchmarks/toString.js
npm notice 135B eslint.config.js
npm notice 2.7kB index.js
npm notice 1.7kB package.json
npm notice 6.8kB test/index.test.js
npm notice 10.0kB test/instanceof.test.js
npm notice 1.4kB types/index.d.ts
npm notice 5.3kB types/index.tst.ts
npm notice Tarball Details
npm notice name: @fastify/error
npm notice version: 4.2.0
npm notice filename: fastify-error-4.2.0.tgz
npm notice package size: 8.5 kB
npm notice unpacked size: 39.4 kB
npm notice shasum: aec6d155bf1cfe07917e8dcb28e9c7fff6689d79
npm notice integrity: sha512-LZoHiXtXvoyU3[...]LuGCXBD3XGUXg==
npm notice total files: 17
npm notice
fastify-error-4.2.0.tgz

After

npm pack --dry-run
npm notice
npm notice 📦  @fastify/error@4.2.0
npm notice Tarball Contents
npm notice 1.1kB LICENSE
npm notice 5.5kB README.md
npm notice 2.7kB index.js
npm notice 1.7kB package.json
npm notice 1.4kB types/index.d.ts
npm notice Tarball Details
npm notice name: @fastify/error
npm notice version: 4.2.0
npm notice filename: fastify-error-4.2.0.tgz
npm notice package size: 3.9 kB
npm notice unpacked size: 12.5 kB
npm notice shasum: 999df936f7db3ece53af515b6a0c2d81df72c63b
npm notice integrity: sha512-0Ns6kvtvAwwL2[...]zyzDoptZWQJwA==
npm notice total files: 5
npm notice
fastify-error-4.2.0.tgz

Checklist

@Tony133

Tony133 commented Oct 5, 2026

Copy link
Copy Markdown
Member

Thank you for your contribution and for your interest in this topic. We invite you to check the discussion at fastify/skeleton#42 (comment) to understand the reasons against such a change.

@Tony133 Tony133 closed this Oct 5, 2026
@slagiewka
slagiewka deleted the package_json_files_allow_list branch October 5, 2026 15:47
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.

2 participants