node:readline support reading non printable characters such as group separator
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 122k
- Fork
- 37.3k
- Merge medio
- 4g 2h
- PR unite (30g)
- 283
Descrizione
What is the problem this feature will solve?
When using a USB barcode reader on a TTY app that uses node:readline the group separator character \x1d is needed for GS1-128 barcodes. GS1-128 barcodes contain multiple elements defined by an Application Identifier (AI) that is a 2-4 digit code followed by value. Either a defined length is expected for the data or it looks for the group separator character for early termination of the value.
What is the feature you are proposing to solve the problem?
accept some or all non printable characters as inputs to readline
One of the following
- add a flag to turn on that by default is disable to preserve existing implementations
- add an option to explicitly define allowable non printable characters, defaults to an empty list
- both a global flag and a list
What alternatives have you considered?
I've considered writing my own, seems like a bad idea for support and security. I may look into putting in a PR but I'm starting with a feature request.
I've considered rewriting the application into a non NodeJS application.
I've considered just replacing the TTY app with something more "modern" but there are external layers affecting this decision. This wouldn't allow copy/pasta of other characters which could be useful in some edge cases.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando la gestione dell’input TTY di node:readline e il modo in cui attualmente tratta i caratteri non stampabili. L’issue propone un flag globale, una allowlist o entrambi, quindi chi contribuisce dovrebbe prima risolvere questa scelta progettuale. Il lavoro è completo quando il separatore di gruppo può essere letto senza interrompere il comportamento esistente di readline, con una copertura per l’opzione scelta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, nodejs
- Ambito
- cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100