Repository navigation
fix(deps): update dependency js-yaml to v5 - #111
renovate[bot] wants to merge 1 commit into
Conversation
3845a37 to
9bfa11c
Compare
318dd8d to
9e32c2a
Compare
Revue — js-yaml 4.3.2 → 5.5.0Verdict : à adapter (adaptations mineures, aucun blocage). Le point critique tient : le frontmatter reste lu en YAML 1.2 core, une date reste une chaîne, et les fixtures de la spec passent toutes. Mais la PR change trois comportements visibles de Ce qui a été lancé
La fusion sur Le point critique : YAML 1.2 core
Comparaison v4 / v5 sous
|
| Entrée | v4 | v5 |
|---|---|---|
bloc vide ---\n--- ou commentaire seul |
invalid, « bloc de frontmatter vide » |
invalid, « expected a document, but the input is empty » (load() lève sur une entrée vide, d'après le changelog 5.0.0) |
clé complexe ? [a, b]\n: c |
ok, { "a,b": "c" } |
invalid : « object-based map does not support complex keys » |
n: 0b101 |
ok, 5 |
ok, "0b101". Conforme au 1.2 core, qui n'a pas d'entier binaire |
Les clés dupliquées restent rejetées (duplicated mapping key). Les deux derniers changements vont dans le sens de la spec : le validateur juge le texte écrit. Le premier est une régression de message : le diagnostic frontmatter-invalid devient « Frontmatter illisible : expected a document… », en anglais. Aucun test ne couvre ce cas, d'où les suites vertes.
Adaptations demandées avant fusion
- Rebaser sur
main(0.20.0), pour que la CI rejoue les 207 fixtures et non les 192 de la base actuelle. - Garder le message du bloc vide : tester
lines.slice(1, end)vide ou fait seulement de blancs et de commentaires avantload(), ou intercepter ce cas, et ajouter le test qui manque (---\n---). - Retirer
@types/js-yamldes devDependencies : la v5 embarque ses types (dist/js-yaml.d.ts), le paquet@typesv4 ne sert plus à rien. - Entrée au CHANGELOG (Modifié) : la mise à jour est sans effet sur le corpus réel, mais une clé complexe rend désormais
frontmatter-invalid, et un0b…reste une chaîne. Profiter de cette entrée pour corriger la note de la 0.19.0 et CLAUDE.md § Frontmatter : Astro 7.4 ne dépend plus de js-yaml (npm ls js-yaml: notre dépendance directe seule). L'argument « la 4.3 qu'Astro tire déjà, dédupliquée » ne vaut plus, et il ne gêne donc pas la v5.
Rien n'a été poussé sur cette branche.
Generated by Claude Code
9e32c2a to
1b5810e
Compare
This PR contains the following updates:
^4.3.2→^5.0.0Release Notes
nodeca/js-yaml (js-yaml)
v5.5.0Compare Source
Changed
argparseto v3.Fixed
,,], and}at the start of block plain scalars, #801.v5.4.3Compare Source
Fixed
line, #802.
v5.4.2Compare Source
Fixed
forceQuotesno longer quotes non-string scalars, #798.v5.4.1Compare Source
Changed
Security
maxTotalMergeKeysto limitCPU usage, #797.
v5.4.0Compare Source
Added
scalarStyleRulesdumper option to customize string formatting.See Scalar styling for details.
Changed
and collection nodes now use
SCALAR_STYLEandCOLLECTION_STYLEvalues;explicit tags use the separate
taggedproperty. Alias nodes now containonly
kindandanchor. This only affects code that directly constructs oredits AST nodes.
sortKeysoption was rewritten using AST mutation to avoidside effects.
loaded values; in particular, whitespace-only strings are now double-quoted.
Fixed
quoteFlowKeysandflowSkipColonSpace,including alias and property-only keys, #786.
1024-character simple-key limit.
needed to preserve trailing newlines.
v5.3.0Compare Source
This release focuses on reworking the documentation and making small
architectural improvements before moving forward.
Added
DUMP_SCHEMA, the default schema used by the dumper.YAMLException.throwAt()for throwing an error at a source position.Changed
EVENT_ID,SCALAR_STYLE,COLLECTION_STYLE, andCHOMPING_MODE, along with their value types. The oldexports are still preserved, but deprecated.
identifymandatory for custom tag definitions. Useidentify: () => falsefor load-only tags.Deprecated
Removed
MERGE_KEYexport (not used anymore after last fixes).Fixed
<<sequence items at merge time, so aliased merge sources arechecked too.
<<outside of a mapping key as the plain string'<<', matchingv4, instead of leaking an internal symbol into the result.
v5.2.3Compare Source
Fixed
!!timestampyears 0000-0099 correctly, #775.unpaired mapping event streams, #784.
parsed AST through
present();dump()and loading are unaffected, #780.v5.2.2Compare Source
Fixed
Security
v5.2.1Compare Source
Fixed
Mapsupport to !!omap (should work whenrealMapTagused)Security
addItem. Regression from v5(usually not critical, because YAML11_SCHEMA is not default anymore).
v5.2.0Compare Source
Added
maxTotalMergeKeys(10000) loader option to limit the total number ofkeys processed by YAML merge (
<<) across oneload()/loadAll()call.maxAliases(-1) loader option to limit the number of YAML aliases perdocument.
Removed
maxMergeSeqLengthreplaced withmaxTotalMergeKeysfor limiting YAML mergeprocessing.
Fixed
1e21)v5.1.0Compare Source
Added
different result value.
Changed
quoteStylenow selects the preferred quote style; use therestored
forceQuotesoption to force quoting non-key strings.v5.0.0Compare Source
Added
JSON_SCHEMAandCORE_SCHEMAwith spec-compliant scalar resolutionrules, and added
YAML11_SCHEMA.realMapTagfor lossless mappings with non-string and complex keys.Object-based mappings now reject complex keys instead of stringifying them.
dump()transformoption for changing the generated AST beforerendering.
dump()optionsseqInlineFirst,flowBracketPadding,flowSkipCommaSpace,flowSkipColonSpace,quoteFlowKeys,quoteStyleandtagBeforeAnchor.test set.
Changed
exports.
CORE_SCHEMA(loader default),JSON_SCHEMA,FAILSAFE_SCHEMA.YAML11_SCHEMA, a combination of all YAML 1.1 tags (YAML 1.1 does notspecify a schema, only "types").
load/dumpdefault behaviour is now specified exactly via schemas:loadusesCORE_SCHEMA, without!!mergeby default.dumpusesYAML11_SCHEMA+CORE_SCHEMAfor the quoting check, toguarantee backward compatibility by default.
!!setis now loaded as a JavaScriptSet.TypeAPI with a tags API. Similar, but more precise andsimpler. See examples for details. Tags can be defined via
defineScalarTag(),defineSequenceTag()anddefineMappingTag(), or as aspread + override of an existing tag.
Schema.extend()toSchema.withTags().markers, block keys, multiline scalars, tag syntax and other things.
load()now throws on empty input instead of returningundefined.js-yaml/browserexport.loadAllsignature with an iterator (still works, but is acandidate for removal).
Removed
safeLoad(),safeLoadAll()andsafeDump()exports.DEFAULT_SCHEMAand the nestedtypesexport.onWarning,legacyandlistener.styles,replacer,noCompatMode,condenseFlow,quotingTypeandforceQuotes. RenamednoArrayIndenttoseqNoIndent.Formatting and representation are now configured through presenter options,
schemas and tag definitions. See migration guide on how to replace.
lib/.Configuration
📅 Schedule: (in timezone Europe/Paris)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.