Skip to content

test: package.json files field excludes scratch dirs, peerDeps version ranges, npm pack dry-run output #210

Description

@k-deejah

Problem

Three issues affect package publishing, peer dependencies, and the npm package metadata.

1. sorokit-core and @creit.tech/stellar-wallets-kit are listed as dependencies but should be peerDependencies

A component library should not bundle its peer dependencies. Listing them as dependencies means npm installs a separate copy alongside the consumer's own copy, causing version conflicts and bundle bloat. They should be moved to peerDependencies with compatible version ranges.

2. package.json is missing "files" field — npm publish includes all source files

Without a "files" field, npm publish includes everything in the repo: src/, _issues/, _b/, _c/, and other scratch files. This inflates the published package size and exposes development artefacts to consumers.

3. package.json "keywords" array is missing common search terms

The keywords array has 7 entries but misses: "dapp", "defi", "xlm", "freighter", "wallet-kit", "soroban-contracts". These are frequently searched terms that would improve discoverability on npm.

Solution

  1. Move sorokit-core and @creit.tech/stellar-wallets-kit to peerDependencies with ">=0.1.0" ranges.
  2. Add "files": ["dist", "README.md", "LICENSE", "CHANGELOG.md"] to package.json.
  3. Add the 6 missing keywords to the keywords array.

Acceptance Criteria

  • sorokit-core and stellar-wallets-kit in peerDependencies
  • "files" field limits publish to dist/, README.md, LICENSE, CHANGELOG.md
  • keywords array includes the 6 new search terms
  • npm pack --dry-run shows only the expected files
  • npm run build passes

Note for Contributors: Write a clear PR description. Include the output of npm pack --dry-run before and after the files field change.

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programhelp wantedExtra attention is needed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions