Test that the About screen credits every package the app ships

Open
#24 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
76/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, react-native, typescript
Domain
mobile, testing

Research direction

Start with apps/mobile/src/licenses.test.ts and read its current dependency checks, then inspect the package.json files for the @hermit/* packages used by the app and apps/mobile/worklets/wallet/package.json. Add a test that checks each third-party dependency has a matching packages entry in apps/mobile/src/licenses.ts, and update missing entries. Run pnpm --filter @hermit/mobile test; done means the test passes and the README Credits section still matches.

Written by the indexing model from the issue text.

Description

agent-friendly help wanted

Why

README.md says the About screen credits the open-source projects Hermit is built on, with their licenses, and MIT and Apache-2.0 ask for their notices to ship with the app. Today apps/mobile/src/licenses.test.ts checks only the app's direct dependencies in apps/mobile/package.json. A package that ships through one of Hermit's own packages, or through the wallet worklet, can be missed without a test failing. (#10 added the ones missing today: noble-curves, noble-hashes, the WDK wallet, bare-crypto, bare-node-runtime and bip39.)

What to do

  1. Test first, in apps/mobile/src/licenses.test.ts. Collect the third-party dependencies of every @hermit/* package the app depends on (each one's packages/<name>/package.json), plus apps/mobile/worklets/wallet/package.json. For each, expect an entry in LICENSES (apps/mobile/src/licenses.ts) whose packages covers it. Watch it fail for the entries that have no packages list yet.
  2. Add the matching packages to those entries, for example ["@noble/curves"] on noble-curves.
  3. Stretch, and say so in the pull request if you try it: transitive dependencies too, from pnpm-lock.yaml and apps/mobile/worklets/wallet/package-lock.json. Describe your approach before you write much code.

Done when

  • The test fails when a workspace package or the worklet adds a third-party dependency with no line in licenses.ts, and passes on the default branch.
  • The Credits section in README.md still matches.

How to check

pnpm --filter @hermit/mobile test

Keep in mind

  • Names and SPDX ids aren't translated, so no copy keys change.
  • Read package files with node:fs, as the test does today. No new dependency.
  • One issue per pull request.
Dominant language
TypeScript
Stars
11
Forks
0
Avg merge
10m
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DojoCodingLabs/hermit

All issues in DojoCodingLabs/hermit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.