Skip to content

Commit aa99fb3

Browse files
committed
[oxfmt]: Migrate to oxfmt
Change fix command
1 parent 28bd37f commit aa99fb3

607 files changed

Lines changed: 11661 additions & 18177 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ jobs:
1616
- uses: actions/checkout@v4
1717
with:
1818
lfs: true
19-
- uses: denoland/setup-deno@v2
20-
with:
21-
deno-version: v2.4.3
2219

2320
- name: Install pnpm
2421
uses: pnpm/action-setup@v4

.github/workflows/pkg-pr.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ jobs:
3030
node-version: 22.x
3131
cache: 'pnpm'
3232

33-
- uses: denoland/setup-deno@v2
34-
with:
35-
deno-version: v2.x # Run with latest stable Deno.
36-
3733
- name: Install dependencies
3834
run: pnpm install --recursive --frozen-lockfile
3935

.oxfmtrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"ignorePatterns": ["**/*.mdx", "**/*.md"],
4+
"singleQuote": true
5+
}

.vscode/extensions.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,5 @@
33
"[astro]": {
44
"editor.defaultFormatter": "astro-build.astro-vscode"
55
},
6-
"[typescript]": {
7-
"editor.defaultFormatter": null
8-
},
9-
"[javascript]": {
10-
"editor.defaultFormatter": null
11-
},
12-
"emeraldwalk.runonsave": {
13-
"commands": [
14-
{
15-
"match": ".*",
16-
"cmd": "echo \"Formatting ${relativeFile}\" && deno fmt ./${relativeFile}"
17-
}
18-
]
19-
},
20-
"deno.enable": false,
216
"typescript.preferences.importModuleSpecifier": "relative"
227
}

apps/bun-example/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "bun-example",
3-
"module": "index.ts",
4-
"type": "module",
53
"private": true,
4+
"type": "module",
5+
"module": "index.ts",
6+
"dependencies": {
7+
"@typegpu/noise": "workspace:",
8+
"typegpu": "workspace:",
9+
"unplugin-typegpu": "workspace:"
10+
},
611
"devDependencies": {
712
"@types/bun": "latest"
813
},
914
"peerDependencies": {
1015
"typescript": "^5"
11-
},
12-
"dependencies": {
13-
"typegpu": "workspace:",
14-
"unplugin-typegpu": "workspace:",
15-
"@typegpu/noise": "workspace:"
1616
}
1717
}

apps/infra-benchmarks/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "infra-benchmarks",
3-
"private": true,
43
"version": "0.0.0",
4+
"private": true,
5+
"license": "MIT",
56
"scripts": {
67
"discriminated-union": "node --experimental-strip-types --expose-gc src/discriminated-union.ts"
78
},
8-
"license": "MIT",
99
"devDependencies": {
1010
"tinybench": "^3.1.0"
1111
},

apps/infra-benchmarks/src/discriminated-union.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ bench
166166
() =>
167167
({
168168
// oxlint-disable-next-line typescript/no-non-null-assertion
169-
[SYMBOL_TAGS[Math.floor(Math.random() * SYMBOL_TAGS.length)]!]:
170-
true,
169+
[SYMBOL_TAGS[Math.floor(Math.random() * SYMBOL_TAGS.length)]!]: true,
171170
}) as { [K in (typeof SYMBOL_TAGS)[number]]: boolean },
172171
);
173172
},

apps/treeshake-test/bundleWith.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ export type ResultRecord = {
1313
size: number;
1414
};
1515

16-
export async function bundleWithEsbuild(
17-
entryUrl: URL,
18-
outDir: URL,
19-
): Promise<URL> {
16+
export async function bundleWithEsbuild(entryUrl: URL, outDir: URL): Promise<URL> {
2017
const entryFileName = path.basename(entryUrl.pathname, '.ts');
2118
const outPath = new URL(`${entryFileName}.esbuild.js`, outDir);
2219
await esbuild({
@@ -31,10 +28,7 @@ export async function bundleWithEsbuild(
3128
return outPath;
3229
}
3330

34-
export async function bundleWithWebpack(
35-
entryPath: URL,
36-
outDir: URL,
37-
): Promise<URL> {
31+
export async function bundleWithWebpack(entryPath: URL, outDir: URL): Promise<URL> {
3832
const entryFileName = path.basename(entryPath.pathname, '.ts');
3933
const outPath = new URL(`./${entryFileName}.webpack.js`, outDir);
4034

@@ -84,10 +78,7 @@ export async function bundleWithWebpack(
8478
});
8579
}
8680

87-
export async function bundleWithTsdown(
88-
entryUrl: URL,
89-
outDir: URL,
90-
): Promise<URL> {
81+
export async function bundleWithTsdown(entryUrl: URL, outDir: URL): Promise<URL> {
9182
const entryFileName = path.basename(entryUrl.pathname, '.ts');
9283
const outPath = new URL(`./${entryFileName}.tsdown.js`, outDir);
9384

apps/treeshake-test/compareResults.ts

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,11 @@ async function generateReport(
3939
]);
4040

4141
// All unique tests from both branches
42-
const allTests = new Set([
43-
...Object.keys(prGrouped),
44-
...Object.keys(targetGrouped),
45-
]);
42+
const allTests = new Set([...Object.keys(prGrouped), ...Object.keys(targetGrouped)]);
4643

4744
// Split tests into static and dynamic
48-
const staticTests = [...allTests].filter((t) => !t.includes('_from_'))
49-
.toSorted();
50-
const dynamicTests = [...allTests].filter((t) => t.includes('_from_'))
51-
.toSorted();
45+
const staticTests = [...allTests].filter((t) => !t.includes('_from_')).toSorted();
46+
const dynamicTests = [...allTests].filter((t) => t.includes('_from_')).toSorted();
5247

5348
// Summary statistics
5449
let totalDecreased = 0;
@@ -93,8 +88,7 @@ async function generateReport(
9388
output += '## 📊 Bundle Size Comparison\n\n';
9489
output += '| 🟢 Decreased | ➖ Unchanged | 🔴 Increased | ❔ Unknown |\n';
9590
output += '| :---: | :---: | :---: | :---: |\n';
96-
output +=
97-
`| **${totalDecreased}** | **${totalUnchanged}** | **${totalIncreased}** | **${totalUnknown}** |\n\n`;
91+
output += `| **${totalDecreased}** | **${totalUnchanged}** | **${totalIncreased}** | **${totalUnknown}** |\n\n`;
9892

9993
output += `## 👀 Notable results\n\n`;
10094
output += `### Static test results:\n${staticTable}\n\n`;
@@ -104,8 +98,7 @@ async function generateReport(
10498
output += `${allTable}\n\n`;
10599

106100
if (allBundlers.size === 1) {
107-
output +=
108-
`If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.\n`;
101+
output += `If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.\n`;
109102
}
110103

111104
return output;
@@ -115,9 +108,7 @@ async function main() {
115108
const [prFile, targetFile] = process.argv.slice(2);
116109

117110
if (!prFile || !targetFile) {
118-
console.error(
119-
'Usage: compare-results.js <pr-results.json> [target-results.json]',
120-
);
111+
console.error('Usage: compare-results.js <pr-results.json> [target-results.json]');
121112
process.exit(1);
122113
}
123114

@@ -142,10 +133,7 @@ async function main() {
142133
}
143134

144135
// Generate appropriate report
145-
const markdownReport = await generateReport(
146-
prResults,
147-
targetResults,
148-
);
136+
const markdownReport = await generateReport(prResults, targetResults);
149137
console.log(markdownReport);
150138
}
151139

0 commit comments

Comments
 (0)