Compare commits

...

3 Commits

Author SHA1 Message Date
shamoon 5873f8e7d5 2.1.2
Docker CI / Docker Build & Push (push) Has been cancelled
Docs / Test Build Docs (push) Has been cancelled
Docs / Build & Deploy Docs (push) Has been cancelled
Lint / Linting Checks (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled
2026-08-21 09:58:19 -07:00
shamoon 6099837373 Merge branch 'dev' 2026-08-21 09:52:58 -07:00
shamoon f0bd255adb Fix yaml parsing in 2.1.1 (#7037) 2026-08-21 09:48:25 -07:00
3 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "homepage",
"version": "2.1.1",
"version": "2.1.2",
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
+1 -1
View File
@@ -1,7 +1,7 @@
import * as yaml from "js-yaml";
const EMPTY_DOCUMENT_ERROR = "expected a document, but the input is empty";
const DEFAULT_SCHEMA = yaml.CORE_SCHEMA.withTags(yaml.timestampTag, yaml.mergeTag);
const DEFAULT_SCHEMA = yaml.CORE_SCHEMA.withTags(yaml.timestampTag, yaml.mergeTag, yaml.legacyMapTag);
export function loadYaml(input, options) {
try {
+10
View File
@@ -25,6 +25,16 @@ describe("utils/config/yaml", () => {
});
});
it("preserves v4 handling of non-string keys", () => {
// an unsubstituted {{HOMEPAGE_VAR_*}} parses as a flow mapping key
expect(loadYaml("- Plex:\n widget:\n key: {{HOMEPAGE_VAR_PLEX_KEY}}\n")).toEqual([
{ Plex: { widget: { key: { "[object Object]": null } } } },
]);
expect(loadYaml("- Backups:\n - 2024-01-01:\n href: http://x\n")).toEqual([
{ Backups: [{ [String(new Date("2024-01-01T00:00:00.000Z"))]: { href: "http://x" } }] },
]);
});
it("still rejects invalid YAML", () => {
expect(() => loadYaml("value: [\n")).toThrow();
});