list-npm-package-content

List npm package tarball contents to validate published files.

Updated Dec 5, 2024
One-click install
npx skills add https://github.com/yeohj0710/wellnessbox --skill list-npm-package-content-yeohj0710
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: list-npm-package-content
Source: https://github.com/yeohj0710/wellnessbox/tree/main/.agents/skills/list-npm-package-content
Command: npx skills add https://github.com/yeohj0710/wellnessbox --skill list-npm-package-content-yeohj0710

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pnpm, and includes scripts (resource) components.

What problem does it solve?

List npm package tarball contents to validate what will be published. This skill helps ensure packaging reliability by showing the exact files included and excluded according to package.json, .npmignore, and .gitignore.

Core Features & Use Cases

  • Lists the exact contents of the package tarball as it would be published to npm.
  • Respects files constraints from package.json, .npmignore, and .gitignore, and documents always included and excluded files.
  • Useful for debugging npm publish issues and ensuring package integrity.

Quick Start

Run the script from the package directory to build, pack, and list the tarball contents.

Frequently Asked Questions about list-npm-package-content

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I preview npm package tarball contents before publishing?

Preview npm package contents by building and packing the package with pnpm, then using tar to enumerate the tarball files. This validates exactly what will be published based on your configuration files.

How does npm publish handle files constraints from package.json, .npmignore, and .gitignore?

npm publish respects files constraints from package.json, .npmignore, and .gitignore to determine included and excluded files. Listing the tarball contents documents these constraints and ensures packaging reliability.

Do I need pnpm to list what files will be included in my npm package?

Yes, you need pnpm installed to build and pack the package into a tarball. The skill requires pnpm to generate the tarball and tar to enumerate its contents for validation.

What is the best way to debug npm publish issues related to missing or extra files?

The best way to debug npm publish file issues is to list the exact tarball contents. This shows included and excluded files according to package.json, .npmignore, and .gitignore, ensuring package integrity.

Why does my npm package tarball include files listed in .gitignore?

npm packaging resolves files constraints from package.json, .npmignore, and .gitignore. Listing the tarball contents helps identify always included or excluded files, clarifying why specific files appear despite ignore rules.

Can I validate package integrity for my npm publish without sending it to the registry?

Yes, you can validate package integrity locally by building and packing the package with pnpm. Listing the generated tarball contents shows exactly what will be published without requiring a registry upload.