mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-12-01 22:14:45 +01:00
24 lines
573 B
Markdown
24 lines
573 B
Markdown
|
# @changesets/config
|
||
|
|
||
|
> Utilities for reading and parsing Changeset's config
|
||
|
|
||
|
[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@changesets/config)
|
||
|
|
||
|
```tsx
|
||
|
import { parse, read, ValidationError } from "@changesets/config";
|
||
|
|
||
|
let config = await read(process.cwd(), workspaces);
|
||
|
|
||
|
let config = parse({ commit: true }, workspaces);
|
||
|
|
||
|
try {
|
||
|
return parse({ commit: true }, workspaces);
|
||
|
} catch (err) {
|
||
|
if (err instanceof ValidationError) {
|
||
|
let message = err.message;
|
||
|
} else {
|
||
|
throw err;
|
||
|
}
|
||
|
}
|
||
|
```
|