From e21316f008062bb2e591ab77df114ce5a8a3d0f1 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Mon, 10 Jun 2024 00:32:59 +0300 Subject: [PATCH] JS yaml: Disable resolveKnownTags for JSON tests --- docker/node/testers/js-yaml-json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docker/node/testers/js-yaml-json b/docker/node/testers/js-yaml-json index 76b5573..d4045aa 100755 --- a/docker/node/testers/js-yaml-json +++ b/docker/node/testers/js-yaml-json @@ -4,8 +4,10 @@ const fs = require('fs') const YAML = require('yaml') const src = fs.readFileSync('/dev/stdin').toString() -const docs = YAML.parseAllDocuments(src).map(doc => { - if (doc.errors.length !== 0) throw doc.errors[0] - return JSON.stringify(doc.toJSON(), null, 2) + '\n' -}) +const docs = YAML.parseAllDocuments(src, { resolveKnownTags: false }).map( + doc => { + if (doc.errors.length !== 0) throw doc.errors[0] + return JSON.stringify(doc.toJSON(), null, 2) + '\n' + } +) fs.writeSync(1, docs.join(''))