nf publish gives no warning for invalid contents entries or a package with no contents

Aperta
#262 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli

Direzione di ricerca

Start at the publish command and trace how it calls readPackageContents from @nanoforge-dev/registry; the issue says that function returns problems and that invalid entries are omitted from the archive. Check how the command handles flags and reports the file list. Done means it warns about those problems and an otherwise empty package, and refuses to publish in both cases unless the chosen force flag is set.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

command:publish enhancement
Which package is this feature request for?

@nanoforge-dev/cli

Which command is this feature request for?

publish

Feature

nf publish gives no warning when the manifest's contents has entries @nanoforge-dev/registry can't read (an invalid kind, or a path like ./src/). Those paths are left out of the archive without a word, and the registry may refuse the manifest only after the upload. A manifest with no contents publishes only the manifest and the README/LICENSE/CHANGELOG files, with no warning either.

Ideal solution or implementation

Print the problems that readPackageContents returns as warnings before the file list, and warn when nothing but the root files would be packed. Refuse in both cases unless a flag such as --force is given.

Alternative solutions or implementations

Warnings only, never refusing.

Other context

Found during the feat/registry-lib change (not merged yet): @nanoforge-dev/registry moves from the editor to libs/registry, and nf install/publish/unpublish use it.

Lingua principale
TypeScript
Stelle
2
Fork
2
Merge medio
2g 18h
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NanoForge-dev/CLI

Tutte le issue di NanoForge-dev/CLI

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.