> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talosjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# issue:convert

> Convert issue YAML files into module issues.json bundles

Converts existing local issue YAML files into `issues.json` arrays for modules or packages. It discovers destinations when none are provided, parses each `*.yml` file, sorts by file name, and writes a pretty JSON array.

## Usage

```bash theme={null}
talos issue:convert [options]
```

## Examples

Convert every module or package that owns an `issues/` directory:

```bash theme={null}
talos issue:convert
```

Convert one destination:

```bash theme={null}
talos issue:convert --destination=user
```

Convert multiple destinations:

```bash theme={null}
talos issue:convert --destination=spa,user
```

Pass repeated destination flags:

```bash theme={null}
talos issue:convert --destination=spa --destination=admin
```

## Options

| Option          | Description                                                                             | Default                               |
| --------------- | --------------------------------------------------------------------------------------- | ------------------------------------- |
| `--destination` | Destination modules or packages to convert. Accepts comma-separated or repeated values. | Every owner of an `issues/` directory |
| `--cwd`         | Working directory.                                                                      | Current directory                     |

## Discovery

A destination name is resolved under `modules/` first, then `packages/`. When `--destination` is omitted, the command discovers every module or package that owns an `issues/` directory.

If a requested destination is not found under either root, the command reports an error and counts that destination as a failure.

## Output paths

The command reads the destination type from `<name>.yml`. If the type is `spa`, `storybook`, `swagger`, or `admin`, it writes:

```text theme={null}
src/shared/issues.json
```

For every other type, and when no type descriptor is present, it writes:

```text theme={null}
src/issues.json
```

Missing output directories are created before writing.

## Conversion

The command reads every `*.yml` file in the destination `issues/` directory and converts each valid YAML document to JSON. Invalid or unreadable issue files are skipped with a warning. The resulting array is sorted by file name and written with a trailing newline.

A destination with no `issues/` directory is a warning and not a failure. A destination with an empty `issues/` directory writes `[]`.

## Exit codes

The command exits non-zero when no destinations can be discovered, or when any requested destination fails to convert.
