Skip to content

Configuration: .npmignore excludes package.json, README.md, and LICENSE #344

@evmparser

Description

@evmparser

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 managers
  • README.md - Essential documentation for users
  • LICENSE - 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.json is mandatory for any npm package
  • README.md is automatically displayed on npmjs.com and is expected by all developers
  • LICENSE file 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.json means 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions