Skip to content

Commit db1bcf0

Browse files
committed
refactor(scripts/ci): move common command options to one dedicated object
1 parent 1f4ed58 commit db1bcf0

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

scripts/ci/main.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
import { permissionArgs, runCommands } from '@encode/ci/lib';
22

33
export async function main(): Promise<void> {
4+
const commonCommandOptions: Deno.CommandOptions = {
5+
stderr: 'piped',
6+
stdout: 'piped',
7+
};
8+
49
await runCommands([
510
{
611
name: 'Biome checks',
712
args: [
813
Deno.execPath(),
914
{
15+
...commonCommandOptions,
1016
args: ['run', ...permissionArgs('biome'), 'npm:@biomejs/biome', 'ci'],
11-
stderr: 'piped',
12-
stdout: 'piped',
1317
},
1418
],
1519
},
@@ -18,9 +22,8 @@ export async function main(): Promise<void> {
1822
args: [
1923
Deno.execPath(),
2024
{
25+
...commonCommandOptions,
2126
args: ['check'],
22-
stderr: 'piped',
23-
stdout: 'piped',
2427
},
2528
],
2629
},
@@ -29,9 +32,8 @@ export async function main(): Promise<void> {
2932
args: [
3033
Deno.execPath(),
3134
{
35+
...commonCommandOptions,
3236
args: ['test', ...permissionArgs(), '--coverage', '--shuffle'],
33-
stderr: 'piped',
34-
stdout: 'piped',
3537
},
3638
],
3739
},

0 commit comments

Comments
 (0)