synthesisui 0.16.182 → 0.16.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/doctor/style-ledger.js +25 -0
- package/package.json +1 -1
|
@@ -83,6 +83,7 @@ export function buildLedger(cli, seen) {
|
|
|
83
83
|
files: 0,
|
|
84
84
|
because: BECAUSE[reason],
|
|
85
85
|
examples: [],
|
|
86
|
+
unreadable: [],
|
|
86
87
|
seenFiles: new Set(),
|
|
87
88
|
};
|
|
88
89
|
group.uses += 1;
|
|
@@ -94,6 +95,30 @@ export function buildLedger(cli, seen) {
|
|
|
94
95
|
line: f.line,
|
|
95
96
|
text: f.text.replace(/\s+/g, " ").trim().slice(0, 160),
|
|
96
97
|
});
|
|
98
|
+
/**
|
|
99
|
+
* SÓ `shape-not-read`, E SÓ TEXTO DISTINTO - as duas restrições vieram de medir, não de supor.
|
|
100
|
+
*
|
|
101
|
+
* DAS QUATRO RAZÕES, uma só é alcançável por um leitor novo. `value-not-read` diz que a forma FOI
|
|
102
|
+
* lida e o valor está fora das escalas deles - texto não ensina nada a leitor nenhum. `computed`
|
|
103
|
+
* é montado em runtime e não existe na fonte. `component-not-admitted` é o portão, não a leitura.
|
|
104
|
+
* Sobra `shape-not-read`: "nenhum leitor desta versão entende esta forma", que é exatamente a
|
|
105
|
+
* frase que um leitor novo responde.
|
|
106
|
+
*
|
|
107
|
+
* E TEXTO DISTINTO, porque a primeira versão disto reprovou no spec do repo vivo: guardar todo
|
|
108
|
+
* fragmento deu 723 215 bytes no dashboard dele, contra um teto de 65 536. Oito mil cópias da
|
|
109
|
+
* mesma string não ensinam mais que uma - o que um leitor precisa é da variedade de FORMAS.
|
|
110
|
+
*
|
|
111
|
+
* O teto de 512 é declarado e não mudo: `uses` continua contando tudo, então a diferença entre o
|
|
112
|
+
* contado e o que viajou é visível em vez de silenciosa.
|
|
113
|
+
*/
|
|
114
|
+
if (reason === "shape-not-read" &&
|
|
115
|
+
group.unreadable.length < 512 &&
|
|
116
|
+
!group.unreadable.some((u) => u.text === f.text))
|
|
117
|
+
group.unreadable.push({
|
|
118
|
+
file: f.file,
|
|
119
|
+
line: f.line,
|
|
120
|
+
text: f.text.replace(/\s+/g, " ").trim().slice(0, 400),
|
|
121
|
+
});
|
|
97
122
|
groups.set(key, group);
|
|
98
123
|
}
|
|
99
124
|
return {
|
package/package.json
CHANGED