Skip to content

Commit 0cc9ef6

Browse files
authored
fix(yaml): Add extensions?: string[] to RollupYamlOptions types (#1506)
* add extensions?: string[] to RollupYamlOptions * test extension option in yaml/test/types.ts
1 parent d60f6eb commit 0cc9ef6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/yaml/test/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const config: RollupOptions = {
1919
}
2020

2121
return data;
22-
}
22+
},
23+
extensions: ['.yaml', '.yml', '.cff']
2324
})
2425
]
2526
};

packages/yaml/types/index.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ interface RollupYamlOptions {
3737
* @default 'single'
3838
*/
3939
documentMode?: 'single' | 'multi';
40+
41+
/**
42+
* File extensions to process. Useful if you have files that contain YAML but do not have a
43+
* `.yaml` or `.yml` extension.
44+
* @default ['.yaml', '.yml']
45+
*/
46+
extensions?: string[];
4047
}
4148

4249
/**

0 commit comments

Comments
 (0)