Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Pass command helper to command's `eject` method

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

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia dal punto di ingresso eject(helper: Helper) del comando e traccia il modo in cui la CLI distribuisce le operazioni eject e costruisce le istanze di Helper. Confronta la chiave di configurazione dell'helper con il nome del comando, quindi verifica il completamento rispetto al comportamento di logging e aggiornamento di dojorc segnalato per my-command.

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

Descrizione

bug help wanted

Bug

eject is currently treated as a command rather than an operation on commands, and as such any given command's eject method is passed a unique Helper rather than that associated with the command. As a result, it is not possible to access the command's options in the dojorc, as the helper's configuration uses eject as its internal key, so helper.configuration.get() actually reads from the non-existent eject key. This also means that calling helper.configuration.set() from within eject methods across commands results in multiple writes to the same object.

Package Version:

Code

// dojorc
{
    "my-command": {
          "hello": "world"
    }
}

```typescript
eject(helper: Helper) {
    console.log(helper.configuration.get());
    helper.configuration.set({ "hello": "dojo 2 world" });
}

Expected behavior:

{ "hello": "world" } is logged to the console and the dojorc is updated to:

{
    "my-command": { "hello": "dojo 2 world" }
}

Actual behavior:

{} is logged to the console as there is no eject key, and the dojorc is updated to:

{
    "my-command": { "hello": "world" },
    "eject": { "hello": "dojo 2 world" }
}
Lingua principale
TypeScript
Stelle
27
Fork
30
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 dojo/cli

Tutte le issue di dojo/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.