Atualizar cborg de 6.x para 7.x
Comparação da API pública de cborg 6.2.1 e 7.0.0, calculada automaticamente a partir dos tipos TypeScript. Uma assinatura alterada é uma possível mudança incompatível, não uma certeza.
Resumo
| Caminhos de importação removidos | 0 |
|---|---|
| Exports removidos | 0 |
| Assinaturas alteradas | 0 |
| Membros de classes ou interfaces removidos | 2 |
| Membros de classes ou interfaces alterados | 0 |
| Novas descontinuações | 0 |
| Mudanças de requisitos (engines, dependências peer) | 0 |
| Novos exports | 0 |
Exports removidos
Nenhuma detectada.
Assinaturas alteradas
Nenhuma detectada.
Membros de classes ou interfaces removidos
| member | import | Antes |
|---|---|---|
ByteWriter.chunks | cborg/interface | (number[] | ByteView<ArrayBufferLike>)[] |
DecodeOptions.strictUtf8 | cborg/interface | boolean | undefined |
Membros de classes ou interfaces alterados
Nenhuma detectada.
Novas descontinuações
Nenhuma detectada.
Mudanças de requisitos (engines, dependências peer)
Nenhuma detectada.
Changelog entre estas versões
Texto publicado pelos autores do pacote, exibido como está.
7.0.0
### ⚠ BREAKING CHANGES
* **json:** validate numeric fractions and exponents
* **json:** cborg/json sorts map keys by UTF-8 bytes, not UTF-16 code units.
* **encode:** encoded float16 subnormals that are not powers of two (multiples of 2^-24 below 2^-14) are now a 3 byte f9 item, not 5 bytes. Anyone hashing or comparing those bytes sees different output.
* **encode:** anyone encoding boxed Number, String, Boolean or BigInt objects now gets the primitive's bytes. Before, they got an empty map or an index-keyed map (new String('a') gave {"0":"a"}).
* **decode:** the decode option strictUtf8 is removed. Callers still passing it get replacement-character decoding instead of an error. Rename it to rejectInvalidUtf8.
* **encode:** encode() of a Map whose keys encode to equal bytes, and encodeInto() with a destination that is not a Uint8Array, now throw. Both produced malformed or corrupt output before. Output from
* **encode:** type-level only. ByteWriter in cborg/interface drops chunks and requires pushArr(number[]) and pushBytes(Uint8Array). TypeScript code implementing ByteWriter or reading writer.chunks will not compile. No runtime export or encoded output changed.
### Features
* **bench:** compare base and head in separate processes and comment on PRs ([#237](https://github.com/rvagg/cborg/issues/237)) ([bc02bfd](https://github.com/rvagg/cborg/commit/bc02bfde4569bd1639ef5263e176b5215acff614))
* **cli:** annotate tags and decode CIDs in diagnostic output ([1db60bc](https://github.com/rvagg/cborg/commit/1db60bca45f78f8c951d897fea12b86c332d57cb))
* **cli:** expand tag 24 embedded CBOR in diagnostic output ([2a66a4d](https://github.com/rvagg/cborg/commit/2a66a4d3e8dfa711384b1270a6f51cf3483c4dd5))
### Bug Fixes
* **cli:** make diagnostic output consistent and reject malformed input ([#240](https://github.com/rvagg/cborg/issues/240)) ([e0b5a0d](https://github.com/rvagg/cborg/commit/e0b5a0de53c1e9b4f8d6048983c7edfe1ce40bc7))
* **cli:** validate --width, reject lossy JSON output, drop stack traces ([#238](https://github.com/rvagg/cborg/issues/238)) ([60f70da](https://github.com/rvagg/cborg/commit/60f70da2a5afc4b80e9f70691c6bbfa14e791908))
* **decode:** reject duplicate tagged-Map keys before values ([cc8d7cb](https://github.com/rvagg/cborg/commit/cc8d7cb76f76aa27ee9c5bf793c85bd8f87f8d75))
* **decode:** rename strictUtf8 to rejectInvalidUtf8 ([#234](https://github.com/rvagg/cborg/issues/234)) ([fa82030](https://github.com/rvagg/cborg/commit/fa82030d5cabef6a730ad3e6f2c4a1273a8002f2))
* **encode:** encode all float16 subnormals as float16 ([#236](https://github.com/rvagg/cborg/issues/236)) ([3b0ad88](https://github.com/rvagg/cborg/commit/3b0ad88f028ebc8686273755524194ae101543c6))
* **encode:** reject duplicate map keys and invalid encode inputs ([#233](https://github.com/rvagg/cborg/issues/233)) ([1ca3eb7](https://github.com/rvagg/cborg/commit/1ca3eb73c933f59c7d2a60853024159abaee8695))
* **encode:** unbox Number, String, Boolean and BigInt objects ([#23Dê estes dados ao seu agente de IA
Vigia é um servidor MCP gratuito: seu agente de programação verifica versões, mudanças incompatíveis e vulnerabilidades antes de escrever código. Sem cadastro, sem chave de API.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Adicionar ao CursorAdicionar ao VS Code★ Estrela no GitHub
Qualquer outro cliente MCP
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }Skill para agentes (SKILL.md): diz ao agente quando usar o Vigia · GitHub Action para pull requests
Perguntas frequentes
Quais são as mudanças incompatíveis ao atualizar cborg de 6 para 7?
Entre cborg 6.2.1 e 7.0.0, o Vigia encontrou 0 exports removidos, 0 assinaturas alteradas e 2 membros de classes ou interfaces removidos ou alterados.
O que foi descontinuado em cborg 7?
0 exports ou membros foram marcados como descontinuados em cborg 7.0.0.
Para agentes
GET https://vigia.coredls.cloud/v1/packages/npm/cborg/upgrade?from=6.2.1&to=7.0.0