Skip to content

Commit 480a1f4

Browse files
authored
chore: upgrade deps (#453)
1 parent 52129b7 commit 480a1f4

12 files changed

Lines changed: 4457 additions & 5783 deletions

File tree

‎examples/3.cli/perf-trace/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"start": "node --experimental-strip-types index.ts"
1212
},
1313
"dependencies": {
14-
"@opentelemetry/api": "^1.9.0",
14+
"@opentelemetry/api": "^1.9.1",
1515
"@opentelemetry/exporter-trace-otlp-proto": "^0.221.0",
16-
"@opentelemetry/resources": "^2.10.0",
17-
"@opentelemetry/sdk-trace-node": "^2.10.0",
16+
"@opentelemetry/resources": "^2.11.0",
17+
"@opentelemetry/sdk-trace-node": "^2.11.0",
1818
"comark": "workspace:*",
1919
"rangi": "catalog:"
2020
}

‎packages/comark-angular/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
"comark": "workspace:*"
4949
},
5050
"devDependencies": {
51-
"@angular/common": "^22.0.6",
51+
"@angular/common": "^22.1.7",
5252
"@angular/compiler": "catalog:",
5353
"@angular/compiler-cli": "catalog:",
54-
"@angular/core": "^22.0.6",
55-
"@angular/platform-browser": "^22.0.6",
54+
"@angular/core": "^22.1.7",
55+
"@angular/platform-browser": "^22.1.7",
5656
"@angular/platform-server": "catalog:",
5757
"typescript": "catalog:",
5858
"vitest": "catalog:"

‎packages/comark-html/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
},
5252
"devDependencies": {
5353
"beautiful-mermaid": "catalog:",
54-
"katex": "^0.17.0",
54+
"katex": "^0.18.7",
5555
"vitest": "catalog:"
5656
},
5757
"peerDependencies": {

‎packages/comark-react/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"devDependencies": {
5656
"@types/react": "catalog:",
5757
"@types/react-dom": "catalog:",
58-
"react": "^19.2.7",
58+
"react": "catalog:",
5959
"react-dom": "catalog:",
6060
"vitest": "catalog:"
6161
},

‎packages/comark-svelte/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"@vitest/browser": "catalog:",
7373
"@vitest/browser-playwright": "catalog:",
7474
"release-it": "catalog:",
75-
"svelte": "^5.56.4",
75+
"svelte": "^5.57.1",
7676
"svelte-check": "catalog:",
7777
"vitest": "catalog:",
7878
"vitest-browser-svelte": "catalog:"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { State } from 'comark/render'
22
import type { ElementNode } from 'comark'
33

4-
export function br(_: ElementNode, _state: State) {
4+
export function br(_n: ElementNode, _state: State) {
55
return ' \n'
66
}

‎packages/comark/src/internal/stringify/handlers/hr.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { State } from 'comark/render'
22
import type { ElementNode } from 'comark'
33

4-
export function hr(_: ElementNode, state: State, parent?: ElementNode) {
4+
export function hr(_n: ElementNode, state: State, parent?: ElementNode) {
55
if (parent?.[0] === 'p') {
66
return ':hr'
77
}

‎packages/comark/test/auto-close-spec.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
formatCompareMarkdown,
1818
sectionAwareMapOptions,
1919
toGenericAutoCloseOptions,
20+
type SpecOptions,
2021
} from './spec-runner.mjs'
2122

2223
const __dirname = dirname(fileURLToPath(import.meta.url))
@@ -31,7 +32,7 @@ function sectionFromEnv(env: NodeJS.ProcessEnv = process.env): string | undefine
3132
}
3233

3334
/** Map portable SPEC options onto comark's AutoCloseOptions. */
34-
function map(opts: Record<string, unknown>): Record<string, unknown> {
35+
function map(opts: SpecOptions): Record<string, unknown> {
3536
const generic = toGenericAutoCloseOptions(opts)
3637
return {
3738
...generic,
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
/**
2+
* Ambient types for the portable zero-dep SPEC runner (`spec-runner.mjs`).
3+
* Keep in sync with the runtime exports used by Vitest / typecheck.
4+
*/
5+
6+
export interface SpecOptions {
7+
bold: boolean
8+
italic: boolean
9+
boldItalic: boolean
10+
inlineCode: boolean
11+
strikethrough: boolean
12+
links: boolean
13+
images: boolean
14+
linkMode: 'protocol' | 'text-only' | string
15+
incompleteLinkPlaceholder: string
16+
incompleteImagePlaceholder: string
17+
blockMath: boolean
18+
inlineMath: boolean
19+
htmlTags: boolean
20+
tables: boolean
21+
singleTilde: boolean
22+
comparisonOperators: boolean
23+
dropTrailingOpeners: boolean
24+
setextGuard: boolean
25+
streaming: boolean
26+
[key: string]: unknown
27+
}
28+
29+
export interface SpecCase {
30+
position: number
31+
section: string
32+
input: string
33+
expected: string
34+
options: SpecOptions
35+
}
36+
37+
export interface SpecResult {
38+
case: SpecCase
39+
actual: string
40+
passed: boolean
41+
durationMs: number
42+
error?: string
43+
}
44+
45+
export interface SectionSummary {
46+
section: string
47+
total: number
48+
passed: number
49+
failed: number
50+
matchRate: number
51+
durationMs: number
52+
}
53+
54+
export interface RunSummary {
55+
total: number
56+
passed: number
57+
failed: number
58+
matchRate: number
59+
durationMs: number
60+
meanMs: number
61+
medianMs: number
62+
opsPerSec: number
63+
bySection: SectionSummary[]
64+
failures: SpecResult[]
65+
results: SpecResult[]
66+
}
67+
68+
export interface CandidateSummary extends RunSummary {
69+
name: string
70+
}
71+
72+
export interface RankingEntry {
73+
name: string
74+
matchRate: number
75+
passed: number
76+
failed: number
77+
durationMs: number
78+
meanMs: number
79+
opsPerSec: number
80+
}
81+
82+
export interface CompareReport {
83+
filePath: string
84+
caseCount: number
85+
candidates: CandidateSummary[]
86+
ranking: RankingEntry[]
87+
}
88+
89+
export type SpecFn = (input: string, opts: SpecOptions) => string
90+
91+
export type SpecCandidate = SpecFn | { name: string; fn: SpecFn }
92+
93+
export type MapOptions = (opts: SpecOptions, testCase: SpecCase) => SpecOptions
94+
95+
export interface SelectOptions {
96+
section?: string | RegExp | string[]
97+
filter?: (testCase: SpecCase) => boolean
98+
verbose?: boolean
99+
warmup?: number
100+
mapOptions?: MapOptions
101+
printSummary?: boolean
102+
}
103+
104+
export const DEFAULT_SPEC_OPTIONS: SpecOptions
105+
106+
export function resetLegacyWarnings(): void
107+
export function parseOptsAttribute(raw: string): Partial<SpecOptions>
108+
export function resolveOptions(overrides?: Partial<SpecOptions>): SpecOptions
109+
export function applySectionHints(section: string, opts: SpecOptions): SpecOptions
110+
export function decodeEscapes(s: string): string
111+
export function parseSpecCases(md: string, filePath?: string): SpecCase[]
112+
export function loadSpecCases(filePath: string): SpecCase[]
113+
export function matchesSection(sectionTitle: string, filter: string | RegExp | string[]): boolean
114+
export function selectCases(cases: SpecCase[], options?: SelectOptions): SpecCase[]
115+
export function runSpecCases(cases: SpecCase[], fn: SpecFn, options?: SelectOptions): RunSummary
116+
export function printCompareTable(report: CompareReport): void
117+
export function formatCompareMarkdown(report: CompareReport): string
118+
export function compareSpecFile(filePath: string, candidates: SpecCandidate[], options?: SelectOptions): CompareReport
119+
export function toGenericAutoCloseOptions(opts: SpecOptions): Record<string, unknown>
120+
export function sectionAwareMapOptions(opts: SpecOptions, testCase: SpecCase): SpecOptions

‎packages/comark/test/text-escape.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ describe('text node escaping', () => {
9393
const text = 'word]:name'
9494
const { md, node } = await roundTrip(text)
9595
// The colon should be escaped to prevent re-parsing as an inline component.
96-
expect(md).toContain('\:name')
96+
expect(md).toContain('\\:name')
9797
expect(node).toEqual(['p', {}, text])
9898
})
9999
})

0 commit comments

Comments
 (0)