synthesisui 0.16.211 → 0.16.213

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.
@@ -5,7 +5,7 @@ import { pinnedHookVersion } from "../agent-wiring.js";
5
5
  import { isOlderCli } from "../cli-version.js";
6
6
  import { readToken, resolveRegistry } from "../config.js";
7
7
  import { unsentEvents } from "../doctor/ledger.js";
8
- import { CHECKER_SINCE, MATERIALISER_SINCE, READER_SINCE, } from "../install-marks.js";
8
+ import { CHECKER_SINCE, installedBehind, MATERIALISER_SINCE, READER_SINCE, } from "../install-marks.js";
9
9
  import { measuredScope } from "../measured-scope.js";
10
10
  /**
11
11
  * QUAL CLI MEDIU O CENSO EM DISCO - e era o `reader`, um inteiro, até 11/08.
@@ -81,13 +81,7 @@ async function credentials(home) {
81
81
  * nada com `upgrade` - o comando usa o CLI que ela tem. Mandar rodar ali é gastar a atenção dela num
82
82
  * comando que não pode mudar nada, e o caminho de verdade é outro (`connect`).
83
83
  */
84
- function behind(installed, running, since) {
85
- if (!installed || !running)
86
- return null;
87
- if (!isOlderCli(installed, since))
88
- return null;
89
- return isOlderCli(running, since) ? null : installed;
90
- }
84
+ const behind = (installed, running, since) => installedBehind(installed, running, since, isOlderCli);
91
85
  export async function localMisalignments(root,
92
86
  /**
93
87
  * `home` é injetável porque a SESSÃO mora nele e não no repo - e uma verificação que lê o home da
@@ -1,9 +1,11 @@
1
1
  import { readdir, readFile, writeFile } from "node:fs/promises";
2
2
  import { join } from "node:path";
3
3
  import { pinnedHookVersion, wireAgent } from "../agent-wiring.js";
4
+ import { isOlderCli } from "../cli-version.js";
4
5
  import { generateComponentFiles } from "../component-codegen.js";
5
6
  import { readProjectConfig, resolveRegistry } from "../config.js";
6
7
  import { diffLocalDocuments, localChangelogMarkdown, } from "../document-diff.js";
8
+ import { installedBehind, MATERIALISER_SINCE } from "../install-marks.js";
7
9
  import { body, section, snippet } from "../output.js";
8
10
  import { reactMajorOf, readInstalledConvention } from "../project-facts.js";
9
11
  import { fetchChangelog, fetchComponent, fetchDesignSystem, RegistryError, } from "../registry.js";
@@ -112,8 +114,17 @@ async function staleInstall(root, slug, version, base, cli) {
112
114
  why.push("the css is compiled differently now");
113
115
  if (meta?.rulesStamp != null && meta.rulesStamp !== (lock.rules ?? null))
114
116
  why.push("the rules that govern it changed");
115
- if (cli && lock.cli && lock.cli !== cli)
116
- why.push(`these files were written by CLI ${lock.cli}`);
117
+ /**
118
+ * COMPARA `MATERIALISER_SINCE`, e não a string da versão - a mesma correção que o `align` recebeu.
119
+ *
120
+ * O dono rodou `upgrade` em 11/08 e leu *"these files were written by CLI 0.16.210 -
121
+ * re-materializing"* com a marca em 0.16.204: o comando reescrevia, e ANUNCIAVA reescrever,
122
+ * arquivos que sairiam byte a byte iguais. Consertar o alarme e deixar o comando é dizer duas
123
+ * coisas sobre um fato só.
124
+ */
125
+ const staleFiles = installedBehind(lock.cli, cli, MATERIALISER_SINCE, isOlderCli);
126
+ if (staleFiles)
127
+ why.push(`these files were written by CLI ${staleFiles}`);
117
128
  return why.length > 0 ? `${why.join(", ")} - re-materializing` : null;
118
129
  }
119
130
  /**
@@ -68,6 +68,23 @@ const SHAPE_LABEL = {
68
68
  const A_READER_REACHES = new Set([
69
69
  "shape-not-read",
70
70
  "binding-not-read",
71
+ /**
72
+ * `value-not-read` ENTROU EM 11/08, e o docstring acima dizia o contrário por um motivo que
73
+ * envelheceu.
74
+ *
75
+ * Ele dizia: *"a forma FOI lida e o valor está fora das escalas deles - texto não ensina nada a
76
+ * leitor nenhum"*. Verdade quando a resposta era um LEITOR. Só que a resposta dela nunca foi um
77
+ * leitor: é uma TABELA DE ESCALA, e a tabela se escreve exatamente do texto - `sr-only`,
78
+ * `flex flex-col`, `data-[side=top]:top-full`.
79
+ *
80
+ * Sem o texto, esses 15 do repo do dono chegavam como número puro, e qualquer conserto nosso
81
+ * exigia que ELE re-medisse. O princípio é o contrário (dono, 12/08): *"o usuário não pode ficar
82
+ * rodando comandos do CLI para confirmar algo que a gente quer resolver - tudo deve estar no
83
+ * censo na entrada"*.
84
+ *
85
+ * O teto de 512 e o texto DISTINTO continuam valendo, e são eles que pagam a conta do tamanho.
86
+ */
87
+ "value-not-read",
71
88
  ]);
72
89
  const BECAUSE = {
73
90
  "shape-not-read": "no reader in this version understands this shape, so the styles it holds reach no recipe",
@@ -100,4 +100,29 @@ export const CHECKER_SINCE = "0.16.202";
100
100
  *
101
101
  * Um censo medido antes disto carrega as duas leituras erradas.
102
102
  */
103
- export const READER_SINCE = "0.16.210";
103
+ export const READER_SINCE = "0.16.213";
104
+ /**
105
+ * O QUE ESTÁ INSTALADO AQUI FICOU PARA TRÁS - e as DUAS condições que fazem isso ser verdade.
106
+ *
107
+ * `installed` é a versão que escreveu a coisa; `running` é o CLI de hoje; `since` é a última versão
108
+ * em que aquilo mudou de verdade. Nenhuma das duas basta sozinha:
109
+ *
110
+ * o que está instalado é ANTERIOR à última mudança senão reescreve bytes idênticos
111
+ * o CLI de hoje já ALCANÇOU essa mudança senão escreve a mesma coisa velha
112
+ *
113
+ * Nasceu privado dentro do `align` e virou exportado quando o dono rodou `upgrade` em 11/08 e leu
114
+ * *"these files were written by CLI 0.16.210 - re-materializing"* com `MATERIALISER_SINCE` em
115
+ * 0.16.204: o comando ainda comparava a STRING da versão, então ele anunciava reescrever arquivos
116
+ * que sairiam byte a byte iguais. Consertar o alarme e deixar o comando é dizer duas coisas sobre
117
+ * um fato só.
118
+ *
119
+ * `isOlder` entra por parâmetro para este módulo continuar sem import nenhum - ele é lido pelo spec
120
+ * gêmeo da plataforma como TEXTO, e uma dependência aqui é uma dependência lá.
121
+ */
122
+ export function installedBehind(installed, running, since, isOlder) {
123
+ if (!installed || !running)
124
+ return null;
125
+ if (!isOlder(installed, since))
126
+ return null;
127
+ return isOlder(running, since) ? null : installed;
128
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthesisui",
3
- "version": "0.16.211",
3
+ "version": "0.16.213",
4
4
  "description": "Bring SynthesisUI design systems into any project - tokens, typed components, whole pages and an agent-ready CLAUDE.md manifest.",
5
5
  "type": "module",
6
6
  "bin": {