Extract the shell-syntax scanner from parse-command.ts into its own module
Les mainteneurs répondent en général sous 3 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 44/100
- Type d'issue
- Refactorisation
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- typescript
- Domaine
- developer-experience
Piste de recherche
Read src/shared/parse-command.ts, focusing on scanShellSyntax, skipHeredoc, walkBodyPayloads, and the placeholder and line-continuation helpers; use PR #2068 for context. Extract the scanner and its private helpers into src/shared/parse-command-scanner.ts, making their shared state explicit. Run the existing test suite; done when it passes without assertion changes and parseCommand's exported contract is unchanged.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
scanShellSyntax in src/shared/parse-command.ts is roughly two thirds of the file — 2,150 of 3,230 lines — and its two largest pieces, skipHeredoc and walkBodyPayloads, are inner closures that share mutable scanner state. Moving it into a module of its own would let each rule be read and tested on its own.
- Move
scanShellSyntaxand the helpers only it uses (skipHeredoc,walkBodyPayloads, the placeholder and line-continuation helpers) into e.g.src/shared/parse-command-scanner.ts, leavingparseCommandand the tokenizer as its only consumer. - Make the state the two closures share explicit at the boundary — which quote or substitution the scanner is inside, the results collected so far, the nesting depth — passed or returned as a named object instead of captured.
- Change no behavior:
parseCommand's exported contract stays as is, and the existing test suite stays green with no assertion changes.
Context: PR #2068 (https://github.com/Zoo-Code-Org/Zoo-Code/pull/2068), commit b193815dddcd6e82e80bf31bc5ea84dd15bd48e4.
- Langage dominant
- TypeScript
- Étoiles
- 2k
- Forks
- 301
- Merge moyen
- 3 j 14 h
- PR mergées (30 j)
- 103
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de Zoo-Code-Org/Zoo-Code
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Zoo-Code-Org/Zoo-Code#2773 · 1 commentaire ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Zoo-Code-Org/Zoo-Code#2717 · 1 commentaire ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
Zoo-Code-Org/Zoo-Code#2515 ·
Les mainteneurs répondent en général sous 3 jours
-
fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on WindowsPeut-être pris @easonLiangWorldedtech l’a pris il y a 15 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Zoo-Code-Org/Zoo-Code#2514 ·
Les mainteneurs répondent en général sous 3 jours
-
[BUG] search_files hides matching text on long linesPeut-être pris @DananjayaNadun l’a pris il y a 9 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Zoo-Code-Org/Zoo-Code#2496 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de Zoo-Code-Org/Zoo-Code
Issues similaires
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
ci
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
ClickHouse/clickhouse-js#1248 ·
Les mainteneurs répondent en général sous 1 jour
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltOuvertetechnik
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
AhmedNAgy25/analysor#25 ·
Les mainteneurs répondent en général sous 1 jour