mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
tools: make metadata parsing less permissive
PR-URL: https://github.com/nodejs/node/pull/19512 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
committed by
Myles Borins
parent
2fb47a5cbf
commit
aa3be00b08
@@ -21,14 +21,14 @@ function extractAndParseYAML(text) {
|
||||
// js-yaml.safeLoad() throws on error
|
||||
const meta = yaml.safeLoad(text);
|
||||
|
||||
const added = meta.added || meta.Added;
|
||||
const added = meta.added;
|
||||
if (added) {
|
||||
// Since semver-minors can trickle down to previous major versions,
|
||||
// features may have been added in multiple versions.
|
||||
meta.added = arrify(added);
|
||||
}
|
||||
|
||||
const deprecated = meta.deprecated || meta.Deprecated;
|
||||
const deprecated = meta.deprecated;
|
||||
if (deprecated) {
|
||||
// Treat deprecated like added for consistency.
|
||||
meta.deprecated = arrify(deprecated);
|
||||
|
||||
Reference in New Issue
Block a user