Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .quality-baseline.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"eslint-disable": {
"packages/discord-plays-core/src/logger.ts": 1,
"packages/better-skill-capped/src/router.tsx": 1,
"packages/better-skill-capped/src/vite-env.d.ts": 1,
"packages/delivery/src/client/router.tsx": 1,
Expand Down
93 changes: 20 additions & 73 deletions bun.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@
"@ai-sdk/provider-utils": "5.0.85",
"@grpc/grpc-js": "1.14.7",
"@opentelemetry/api": "1.9.1",
"@typescript-eslint/eslint-plugin": "8.72.2",
"@typescript-eslint/parser": "8.72.2",
"@typescript-eslint/utils": "8.72.2",
"@typescript-eslint/eslint-plugin": "8.74.0",
"@typescript-eslint/parser": "8.74.0",
"@typescript-eslint/utils": "8.74.0",
"@opentelemetry/propagator-jaeger": "2.12.1",
"fast-xml-parser": "5.11.1",
"js-yaml": "5.4.3",
Expand Down Expand Up @@ -251,7 +251,7 @@
"sherpa-onnx-win-ia32": "1.13.8",
"sherpa-onnx-win-x64": "1.13.8",
"socket.io-parser": "4.2.7",
"typescript-eslint": "8.72.2",
"typescript-eslint": "8.74.0",
"effect": "3.22.1"
},
"trustedDependencies": [
Expand Down
2 changes: 1 addition & 1 deletion packages/artifacts/src/infrastructure/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function emptyToUndefined(value: unknown): unknown {
const OriginSchema = z
.url()
.refine((value) => new URL(value).origin === value, {
message: "must be an origin: scheme, host and optional port, no path",
error: "must be an origin: scheme, host and optional port, no path",
});

/**
Expand Down
49 changes: 7 additions & 42 deletions packages/astro-opengraph-images/src/hook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { pathToFileURL } from "node:url";
import { createElement } from "react";
import { expect, test } from "vitest";
import { buildDoneHook } from "./hook.ts";
import { createConsoleLogger } from "astro/logger/console";
import { astroOpenGraphImages } from "./integration.ts";
import type {
FilterFunction,
Expand All @@ -21,44 +22,8 @@ import type {
RenderFunction,
} from "./types.ts";

class TestLogger implements AstroIntegrationLogger {
readonly options = {
destination: {
write: (_message: unknown) => {
// Test log output is intentionally discarded.
},
},
level: "silent" as const,
};
readonly label = "test";

fork(_label: string): TestLogger {
return new TestLogger();
}

info(_message: string): void {
// Test log output is intentionally discarded.
}

warn(_message: string): void {
// Test log output is intentionally discarded.
}

error(_message: string): void {
// Test log output is intentionally discarded.
}

debug(_message: string): void {
// Test log output is intentionally discarded.
}

flush(): void {
// Nothing to flush in the test logger.
}

close(): void {
// Nothing to close in the test logger.
}
function createTestLogger(): AstroIntegrationLogger {
return createConsoleLogger({ level: "silent" }).forkIntegrationLogger("test");
}

test("an async path filter skips a page before reading its output", async () => {
Expand Down Expand Up @@ -98,7 +63,7 @@ test("an async path filter skips a page before reading its output", async () =>
pages: [{ pathname: "/excluded/" }],
dir: pathToFileURL(`${outputDir}/`),
assets: new Map(),
logger: new TestLogger(),
logger: createTestLogger(),
}),
).resolves.toBeUndefined();
} finally {
Expand Down Expand Up @@ -126,7 +91,7 @@ test("a path-filtered-in page still requires Open Graph metadata", async () => {
pages: [{ pathname: "/accepted/" }],
dir: pathToFileURL(`${outputDir}/`),
assets: new Map(),
logger: new TestLogger(),
logger: createTestLogger(),
options: testOptions,
render,
filter,
Expand Down Expand Up @@ -171,7 +136,7 @@ test("an accepted page with Open Graph metadata renders an image", async () => {
pages: [{ pathname: "/rendered/" }],
dir: pathToFileURL(`${outputDir}/`),
assets: new Map(),
logger: new TestLogger(),
logger: createTestLogger(),
options: testOptions,
render,
filter,
Expand Down Expand Up @@ -211,7 +176,7 @@ test("the metadata-aware filter can skip a valid page", async () => {
pages: [{ pathname: "/metadata-skipped/" }],
dir: pathToFileURL(`${outputDir}/`),
assets: new Map(),
logger: new TestLogger(),
logger: createTestLogger(),
options: testOptions,
render,
filter,
Expand Down
2 changes: 1 addition & 1 deletion packages/better-skill-capped/src/components/app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { RouterProvider } from "@tanstack/react-router";
import { PersistQueryClientProvider } from "@tanstack/react-query-persist-client";
import { persistOptions, queryClient } from "#src/lib/query-client";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { Bookmark } from "lucide-react";
import type { ContentItem } from "#src/model/content";
import { Button } from "#components/ui/button";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import Highlighter from "react-highlight-words";
import { Link } from "@tanstack/react-router";
import type {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import Highlighter from "react-highlight-words";
import { Bookmark, Eye, EyeOff } from "lucide-react";
import type { Course, Video } from "#src/model/content";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { CloudDownload } from "lucide-react";
import type { Commentary, Video } from "#src/model/content";
import { getStreamUrl } from "#src/utils/url-utilities";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { Eye, EyeOff } from "lucide-react";
import type { ContentItem } from "#src/model/content";
import { Button } from "#components/ui/button";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";

const linkClass = "underline underline-offset-2 hover:text-foreground";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { ExternalLink } from "lucide-react";
import { Card, CardContent } from "#components/ui/card";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { X } from "lucide-react";
import type { SearchParams } from "#src/routes/search";
import { SEARCH_DEFAULTS } from "#src/routes/search";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState } from "react";
import type React from "react";
import { useState } from "react";
import type { FacetCounts } from "#src/search/run-search";
import { Card, CardContent, CardHeader, CardTitle } from "#components/ui/card";
import { Checkbox } from "#components/ui/checkbox";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import type { Kind } from "#src/model/content";
import { KINDS } from "#src/model/content";
import type { Role } from "#src/model/role";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { ChevronLeft, ChevronRight } from "lucide-react";
import { Button } from "#components/ui/button";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { Search } from "lucide-react";
import { Link } from "@tanstack/react-router";
import { Input } from "#components/ui/input";
Expand Down
2 changes: 1 addition & 1 deletion packages/better-skill-capped/src/components/ui/card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from "react";
import type * as React from "react";

import { cn } from "#lib/utils";

Expand Down
2 changes: 1 addition & 1 deletion packages/better-skill-capped/src/components/ui/input.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from "react";
import type * as React from "react";
import { Input as InputPrimitive } from "@base-ui/react/input";

import { cn } from "#lib/utils";
Expand Down
2 changes: 1 addition & 1 deletion packages/better-skill-capped/src/components/ui/label.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from "react";
import type * as React from "react";

import { cn } from "#lib/utils";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Loaded } from "@shepherdjerred/loaded";
import React from "react";
import type React from "react";
import Highlighter from "react-highlight-words";
import { Link } from "@tanstack/react-router";
import { useContent } from "#src/hooks/use-content";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { Link } from "@tanstack/react-router";
import { Star } from "lucide-react";
import type { Course } from "#src/model/content";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { useQuery } from "@tanstack/react-query";
import { z } from "zod";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Loaded } from "@shepherdjerred/loaded";
import React from "react";
import type React from "react";
import { Link } from "@tanstack/react-router";
import { Star } from "lucide-react";
import { useContent } from "#src/hooks/use-content";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Loaded } from "@shepherdjerred/loaded";
import React from "react";
import type React from "react";
import { useContent } from "#src/hooks/use-content";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/better-skill-capped/src/routes/course.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import { Loaded } from "@shepherdjerred/loaded";
import { createRoute } from "@tanstack/react-router";
import { roleDisplayName } from "#src/model/role";
Expand Down
2 changes: 1 addition & 1 deletion packages/better-skill-capped/src/routes/root.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
import {
type ErrorComponentProps,
Outlet,
Expand Down
4 changes: 2 additions & 2 deletions packages/birmel/src/agent-runtime/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const MemoryCandidateSchema = MemoryCandidateBaseSchema.refine(
distinctRelatedUserCount(candidate.relatedUserIds) >=
RELATIONSHIP_MEMORY_MIN_RELATED_USERS,
{
message:
error:
'A "relationship" memory must list at least two distinct related user IDs. Use scope "user" for a claim about one person, and never repeat the same ID twice.',
path: ["relatedUserIds"],
},
Expand All @@ -306,7 +306,7 @@ export const MemoryCandidateSchema = MemoryCandidateBaseSchema.refine(
distinctRelatedUserCount(candidate.relatedUserIds) <=
USER_MEMORY_MAX_RELATED_USERS,
{
message:
error:
'A "user" memory accepts at most one related user ID. Use scope "relationship" for a claim about two or more people.',
path: ["relatedUserIds"],
},
Expand Down
1 change: 1 addition & 0 deletions packages/discord-plays-core/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export function createGameLogger(): winston.Logger {
level: "info",
format: winston.format.combine(winston.format.json()),
transports: [
// eslint-disable-next-line @typescript-eslint/no-unsafe-class-instance-assignment -- false positive: typescript-eslint#13234 (winston re-exports winston-transport via an import * alias); remove when fixed upstream (AI-947)
new winston.transports.Console({
format: winston.format.combine(
winston.format.colorize(),
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
"@eslint/compat": "^2.1.0",
"@eslint/js": "^10.0.1",
"@typescript-eslint/utils": "^8.72.2",
"@typescript-eslint/utils": "^8.74.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-node": "^0.4.0",
"eslint-import-resolver-typescript": "^4.4.4",
Expand All @@ -52,14 +52,14 @@
"eslint-plugin-sonarjs": "^4.2.0",
"eslint-plugin-unicorn": "^78.0.0",
"jiti": "^2.7.0",
"typescript-eslint": "^8.72.2"
"typescript-eslint": "^8.74.0"
},
"peerDependencies": {
"eslint": "^10.4.0",
"typescript": "^6.0.3"
},
"devDependencies": {
"@typescript-eslint/rule-tester": "^8.72.2",
"@typescript-eslint/rule-tester": "^8.74.0",
"@types/node": "^26.1.1",
"@typescript/native": "npm:typescript@7.0.2",
"vitest": "5.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/homelab/scripts/platform-desired-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ const googleDesiredState = z.strictObject({
(workload) =>
workload.ai_studio_spend_cap_usd <= workload.monthly_budget_usd,
{
message:
error:
"ai_studio_spend_cap_usd must not exceed monthly_budget_usd, or the budget alert would fire only after the cap should have stopped spend",
},
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ function escapePointer(key: string): string {
return key.replaceAll("~", "~0").replaceAll("/", "~1");
}

function childConstruct(parent: Construct, id: string): Construct {
const child = parent.node.tryFindChild(id);
return child instanceof Construct ? child : new Construct(parent, id);
}

function constructsOf(chart: Chart): Construct[] {
return chart.node.findAll().filter((node) => node instanceof Construct);
}

function childEntries(value: unknown): [key: string, child: unknown][] {
return Array.isArray(value)
? value.map((child: unknown, index): [string, unknown] => [
Expand Down Expand Up @@ -39,16 +48,16 @@ function addressLabels(
export function adoptChartAddresses(chart: Chart, sourceChartId: string): void {
const sourceMirror = new Chart(new App(), sourceChartId);
const addresses = new Map<string, string>();
for (const construct of chart.node.findAll()) {
for (const construct of constructsOf(chart)) {
if (construct === chart) continue;
let mirror: Construct = sourceMirror;
for (const id of construct.node.path
.slice(chart.node.path.length + 1)
.split("/"))
mirror = mirror.node.tryFindChild(id) ?? new Construct(mirror, id);
mirror = childConstruct(mirror, id);
addresses.set(Names.toLabelValue(construct), Names.toLabelValue(mirror));
}
for (const construct of chart.node.findAll()) {
for (const construct of constructsOf(chart)) {
if (!ApiObject.isApiObject(construct)) continue;
for (const [pointer, address] of addressLabels(construct.toJson(), [])) {
const sourceAddress = addresses.get(address);
Expand All @@ -74,14 +83,14 @@ export function adoptRootChartAddresses(chart: Chart): void {
*/
export function adoptChartNames(chart: Chart, sourceChartId: string): void {
const sourceMirror = new Chart(new App(), sourceChartId);
for (const construct of chart.node.findAll()) {
for (const construct of constructsOf(chart)) {
if (!ApiObject.isApiObject(construct)) continue;
if (construct.name !== chart.generateObjectName(construct)) continue;
let mirror: Construct = sourceMirror;
for (const id of construct.node.path
.slice(chart.node.path.length + 1)
.split("/"))
mirror = mirror.node.tryFindChild(id) ?? new Construct(mirror, id);
mirror = childConstruct(mirror, id);
construct.addJsonPatch(
JsonPatch.replace(
"/metadata/name",
Expand Down
2 changes: 1 addition & 1 deletion packages/homelab/src/cdk8s/src/resources/cpu-power-cap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const CpuPowerCapOptionsSchema = z
pl2Watts: z.number().positive(),
})
.refine((value) => value.pl2Watts >= value.pl1Watts, {
message: "pl2Watts must be >= pl1Watts",
error: "pl2Watts must be >= pl1Watts",
path: ["pl2Watts"],
});

Expand Down
Loading