Update js-yaml to 4.1.0

This fixes an issue resolving aliases inside merge keys, but also
changes the formatting to quote less than the input YAML does when
dumping YAML.
This commit is contained in:
Oliver Hamlet
2022-08-23 19:47:54 +01:00
parent a28b6648c6
commit 888b685adb
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -18,6 +18,6 @@ permalink: /convert-settings/
<p>Note that the download link that appears above after converting YAML does not work in Internet Explorer or Edge. Users of those browsers will need to copy the content of the TOML text box into a <code>settings.toml</code> file they create themselves, or use a different browser</code>.</p>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.4.3/js-yaml.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tomlify-j0.4@3.0.0/tomlify.min.js"></script>
<script src="/js/convert.js"></script>
+1 -1
View File
@@ -37,7 +37,7 @@ function upgradeOldYaml(yaml) {
function yamlToToml(evt) {
try {
const settings = upgradeOldYaml(jsyaml.safeLoad(evt.target.value));
const settings = upgradeOldYaml(jsyaml.load(evt.target.value));
const options = {
space: 2,
+2 -2
View File
@@ -34,7 +34,7 @@ function isRegexEntry(name) {
}
function readMasterlist(response) {
var masterlist = jsyaml.safeLoad(response.data);
var masterlist = jsyaml.load(response.data);
document.getElementById('progress').classList.add('hidden');
/* Do search here. */
@@ -53,7 +53,7 @@ function readMasterlist(response) {
console.log("Match: " + JSON.stringify(masterlist["plugins"][index]));
var code = document.createElement('code');
code.className = 'loot-search-result';
code.textContent = ' - ' + jsyaml.safeDump(masterlist["plugins"][index]).replace(new RegExp('\n', 'g'), '\n ').trim();
code.textContent = ' - ' + jsyaml.dump(masterlist["plugins"][index]).replace(new RegExp('\n', 'g'), '\n ').trim();
resultsDiv.appendChild(code);
}
}
+1 -1
View File
@@ -24,6 +24,6 @@ permalink: /search/
<div id="progress" class="mdl-spinner mdl-js-spinner mdl-spinner--single-color is-active hidden"></div>
<div id="results" class="mdl-shadow--2dp"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.4.3/js-yaml.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js"></script>
<script src="https://unpkg.com/github-api@2.3.0/dist/GitHub.bundle.min.js"></script>
<script src="/js/search.js"></script>