-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Problem
The .npmignore file currently excludes critical files that must be included in the published npm package.
File: .npmignore (line 11)
Excluded files:
package.json- Required by npm and package managersREADME.md- Essential documentation for usersLICENSE- Legal requirement for open-source distribution
Impact
This configuration will result in a broken and potentially unusable npm package:
🚨 Critical Issues:
- No package.json: The package cannot be installed or used properly without this file
- No README.md: Users have no documentation or instructions on how to use the SDK
- No LICENSE: Legal uncertainty for users - they don't know the terms under which they can use the code
- Unprofessional appearance: Missing essential files makes the package appear incomplete or poorly maintained
npm Package Requirements:
According to npm best practices, these files should always be included:
package.jsonis mandatory for any npm packageREADME.mdis automatically displayed on npmjs.com and is expected by all developersLICENSEfile is required for open-source packages to clarify usage rights
Why This Is Critical
For a cryptography SDK like relayer-sdk:
- Developers need clear documentation (README) to use the SDK correctly
- Licensing information (LICENSE) is crucial for compliance and security audits
- Missing
package.jsonmeans the package cannot function at all - This issue will break the published package completely
Suggested Fix
Remove the following entries from .npmignore:
# Remove these lines from .npmignore:
# package.json
# README.md
# LICENSE
Or better yet, use a whitelist approach in .npmignore instead of a blacklist - only include what you need in the published package:
# Example whitelist approach:
# Include only dist/, README.md, LICENSE, and package.json
*
!dist/**
!README.md
!LICENSE
!package.json
Benefits:
- ✅ Complete, usable npm package
- ✅ Proper documentation for users
- ✅ Clear licensing terms
- ✅ Professional package appearance
- ✅ Compliance with npm best practices
Context
This issue was identified as part of a comprehensive configuration audit of the relayer-sdk.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels