{
  "id": "yarn",
  "name": "Yarn",
  "homepage": "https://yarnpkg.com",
  "description": "A package manager that doubles down as project manager.",
  "icon": "SimpleIcons:yarn",
  "executables": [
    "yarn",
    "yarnpkg"
  ],
  "dotfiles": {
    "paths": [
      "~/.yarnrc.yml",
      "~/.yarnrc"
    ],
    "exclude": [
      "~/.yarn/berry/"
    ],
    "secret": [],
    "side_effect": false,
    "machine_lines": [
      {
        "file": "~/.yarnrc.yml",
        "match": {
          "key_path": [
            "cacheFolder",
            "globalFolder"
          ]
        },
        "scope": "backup"
      },
      {
        "file": "~/.yarnrc",
        "match": {
          "prefix": [
            "yarn-path",
            "--cache-folder"
          ]
        },
        "scope": "backup"
      }
    ],
    "secret_paths": [
      {
        "file": "~/.yarnrc.yml",
        "match": {
          "key_path": [
            "npmAuthToken",
            "npmAuthIdent",
            "npmRegistries.*.npmAuthToken",
            "npmRegistries.*.npmAuthIdent",
            "npmScopes.*.npmAuthToken",
            "npmScopes.*.npmAuthIdent"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Yarn (classic)",
    "description": "Install or add packages with Yarn 1.x. Registry, proxy, cache and mutex options are left out.",
    "quality": "ai-draft",
    "base": "fig:yarn",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/yarn.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "add"
        ],
        "label": "Add packages",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/yarn.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "packages",
            "label": "Packages",
            "type": "string",
            "position": 0,
            "multiple": true,
            "min": 1,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dev",
            "label": "Save to devDependencies",
            "type": "boolean",
            "option": [
              "--dev",
              "-D"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "peer",
            "label": "Save to peerDependencies",
            "type": "boolean",
            "option": [
              "--peer",
              "-P"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "optional",
            "label": "Save to optionalDependencies",
            "type": "boolean",
            "option": [
              "--optional",
              "-O"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "exact",
            "label": "Install exact version",
            "type": "boolean",
            "option": [
              "--exact",
              "-E"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "tilde",
            "label": "Same minor version (tilde)",
            "type": "boolean",
            "option": [
              "--tilde",
              "-T"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "ignore_scripts",
            "label": "Skip lifecycle scripts",
            "type": "boolean",
            "option": [
              "--ignore-scripts"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "ignore_workspace_root",
            "label": "Allow in workspace root",
            "type": "boolean",
            "option": [
              "--ignore-workspace-root-check",
              "-W"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "add",
            "label": "Add dependency",
            "fields": [
              "packages",
              "exact",
              "ignore_scripts"
            ],
            "required": [
              "packages"
            ]
          },
          {
            "id": "add-dev",
            "label": "Add dev dependency",
            "set": {
              "dev": [
                true
              ]
            },
            "lock": [
              "dev"
            ],
            "fields": [
              "packages",
              "exact",
              "ignore_scripts"
            ],
            "required": [
              "packages"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "packages",
              "dev",
              "peer",
              "optional",
              "exact",
              "tilde"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "ignore_scripts",
              "ignore_workspace_root"
            ]
          }
        ]
      },
      {
        "path": [
          "install"
        ],
        "label": "Install dependencies",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/yarn.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "frozen",
            "label": "Fail if lockfile needs update",
            "type": "boolean",
            "option": [
              "--frozen-lockfile"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "prod",
            "label": "Production only",
            "type": "boolean",
            "option": [
              "--production",
              "--prod"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "force",
            "label": "Force reinstall",
            "type": "boolean",
            "option": [
              "--force"
            ],
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "ignore_scripts",
            "label": "Skip lifecycle scripts",
            "type": "boolean",
            "option": [
              "--ignore-scripts"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "offline",
            "label": "Offline (cache only)",
            "type": "boolean",
            "option": [
              "--offline"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_lockfile",
            "label": "Do not read or write lockfile",
            "type": "boolean",
            "option": [
              "--no-lockfile"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "check_files",
            "label": "Verify file tree",
            "type": "boolean",
            "option": [
              "--check-files"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "install",
            "label": "Install from package.json",
            "fields": [
              "frozen",
              "prod",
              "ignore_scripts"
            ],
            "required": []
          },
          {
            "id": "ci",
            "label": "Reproducible (CI) install",
            "set": {
              "frozen": [
                true
              ]
            },
            "lock": [
              "frozen"
            ],
            "fields": [
              "frozen",
              "prod",
              "ignore_scripts"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "frozen",
              "prod",
              "ignore_scripts"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "force",
              "offline",
              "no_lockfile",
              "check_files"
            ]
          }
        ]
      }
    ]
  }
}
