@@ -13,14 +13,6 @@ impl TestFiles {
1313 & self . files
1414 }
1515
16- pub fn react ( ) -> Self {
17- Self {
18- files : vec ! [ TestFile :: new(
19- "https://cdn.jsdelivr.net/npm/react@17.0.2/cjs/react.development.js" ,
20- ) ] ,
21- }
22- }
23-
2416 /// These are kept in sync with <https://github.com/privatenumber/minification-benchmarks/tree/d8d54ceeb206d318fa288b152904adf715b076b2>
2517 /// for checking against minification size in `tasks/minsize/minsize.snap`.
2618 pub fn minifier ( ) -> Self {
@@ -42,6 +34,31 @@ impl TestFiles {
4234 }
4335 }
4436
37+ pub fn formatter ( ) -> Self {
38+ Self {
39+ files : [
40+ // Small JSX (61L / 2.46KB)
41+ "https://cdn.jsdelivr.net/gh/oxc-project/benchmark-files@main/RadixUIAdoptionSection.jsx" ,
42+ // Small TS (191L / 8.23KB)
43+ "https://cdn.jsdelivr.net/gh/vuejs/core@v3.5.24/packages/compiler-core/src/errors.ts" ,
44+ // Medium TSX (389L / 11.7KB)
45+ "https://cdn.jsdelivr.net/gh/outline/outline@v1.0.1/app/scenes/Search/Search.tsx" ,
46+ // Medium JS (426L / 12.3KB)
47+ "https://cdn.jsdelivr.net/gh/prettier/prettier@3.6.2/src/main/core.js" ,
48+ // Medium TS (619L / 17.3KB)
49+ "https://cdn.jsdelivr.net/gh/vercel/next.js@v16.0.2/packages/next/src/server/next.ts" ,
50+ // Large TSX (995L / 30.5KB)
51+ "https://cdn.jsdelivr.net/gh/vercel/next.js@v16.0.2/packages/next/src/client/index.tsx" ,
52+ // Large JS (1092L / 27.2KB)
53+ "https://cdn.jsdelivr.net/gh/prettier/prettier@3.6.2/src/language-js/comments/handle-comments.js" ,
54+ // Large TS (2370L / 76.1KB)
55+ "https://cdn.jsdelivr.net/gh/honojs/hono@v4.10.5/src/types.ts" ,
56+ // Extra large TSX (11180L / 346KB)
57+ "https://cdn.jsdelivr.net/gh/excalidraw/excalidraw@v0.18.0/packages/excalidraw/components/App.tsx" ,
58+ ] . into_iter ( ) . map ( TestFile :: new) . collect ( ) ,
59+ }
60+ }
61+
4562 pub fn minimal ( ) -> Self {
4663 Self {
4764 files : [
@@ -54,25 +71,22 @@ impl TestFiles {
5471 }
5572
5673 pub fn complicated ( ) -> Self {
57- let files = Self :: complicated_urls ( ) . into_iter ( ) . map ( TestFile :: new) . collect ( ) ;
58- Self { files }
59- }
60-
61- fn complicated_urls ( ) -> [ & ' static str ; 6 ] {
62- [
63- // TypeScript syntax (2.81MB)
64- "https://cdn.jsdelivr.net/gh/microsoft/TypeScript@v5.3.3/src/compiler/checker.ts" ,
65- // Real world app tsx (1.0M)
66- "https://cdn.jsdelivr.net/gh/oxc-project/benchmark-files@main/cal.com.tsx" ,
67- // Real world content-heavy app jsx (3K)
68- "https://cdn.jsdelivr.net/gh/oxc-project/benchmark-files@main/RadixUIAdoptionSection.jsx" ,
69- // Heavy with classes (554K)
70- "https://cdn.jsdelivr.net/npm/pdfjs-dist@4.0.269/build/pdf.mjs" ,
71- // ES5 (6.7M)
72- "https://cdn.jsdelivr.net/npm/antd@4.16.1/dist/antd.js" ,
73- // TypeScript syntax (189K)
74- "https://cdn.jsdelivr.net/gh/microsoft/TypeScript@v5.3.3/src/compiler/binder.ts" ,
75- ]
74+ Self {
75+ files : [
76+ // TypeScript syntax (2.81MB)
77+ "https://cdn.jsdelivr.net/gh/microsoft/TypeScript@v5.3.3/src/compiler/checker.ts" ,
78+ // Real world app tsx (1.0M)
79+ "https://cdn.jsdelivr.net/gh/oxc-project/benchmark-files@main/cal.com.tsx" ,
80+ // Real world content-heavy app jsx (3K)
81+ "https://cdn.jsdelivr.net/gh/oxc-project/benchmark-files@main/RadixUIAdoptionSection.jsx" ,
82+ // Heavy with classes (554K)
83+ "https://cdn.jsdelivr.net/npm/pdfjs-dist@4.0.269/build/pdf.mjs" ,
84+ // ES5 (6.7M)
85+ "https://cdn.jsdelivr.net/npm/antd@4.16.1/dist/antd.js" ,
86+ // TypeScript syntax (189K)
87+ "https://cdn.jsdelivr.net/gh/microsoft/TypeScript@v5.3.3/src/compiler/binder.ts" ,
88+ ] . into_iter ( ) . map ( TestFile :: new) . collect ( ) ,
89+ }
7690 }
7791}
7892
0 commit comments