Yarn · Schema

Yarn Workspace package.json

JSON Schema describing a Yarn (Berry / v4) workspace manifest — the subset of package.json fields that Yarn reads, including Yarn-specific extensions like `workspaces`, `packageManager`, `resolutions`, `dependenciesMeta`, and `peerDependenciesMeta`.

Package ManagerJavaScriptNode.jsMonorepoWorkspacesPlug'n'PlayOpen-SourceBerryYarn 4

Properties

Name Type Description
name string The package name. For a monorepo root this may be omitted in favor of `private: true`.
version string Semver version of the workspace.
private boolean If true, the workspace cannot be published. Required on the monorepo root.
description string
license string SPDX license identifier.
homepage string
repository object
packageManager string Corepack pinning field. Example: `yarn@4.5.0`.
workspaces object Glob patterns identifying child workspaces, or an object form with `packages` and `nohoist`.
dependencies object Runtime dependencies. Values may use any supported Yarn protocol.
devDependencies object
peerDependencies object
optionalDependencies object
bundleDependencies array
resolutions object Forced resolutions overriding the normal dependency graph. Yarn-only; honored project-wide from the root manifest.
dependenciesMeta object Per-dependency metadata.
peerDependenciesMeta object
scripts object Project scripts executed by `yarn run` via the portable @yarnpkg/shell interpreter.
bin object
engines object
publishConfig object Fields applied at publish time only.
installConfig object
languageName string Yarn linker language. Most workspaces use `node`.
View JSON Schema on GitHub

JSON Schema

yarn-pkg-workspace-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/yarn-pkg/main/json-schema/yarn-pkg-workspace-schema.json",
  "title": "Yarn Workspace package.json",
  "description": "JSON Schema describing a Yarn (Berry / v4) workspace manifest — the subset of package.json fields that Yarn reads, including Yarn-specific extensions like `workspaces`, `packageManager`, `resolutions`, `dependenciesMeta`, and `peerDependenciesMeta`.",
  "type": "object",
  "required": ["name"],
  "additionalProperties": true,
  "properties": {
    "name": {
      "type": "string",
      "description": "The package name. For a monorepo root this may be omitted in favor of `private: true`."
    },
    "version": {
      "type": "string",
      "description": "Semver version of the workspace."
    },
    "private": {
      "type": "boolean",
      "description": "If true, the workspace cannot be published. Required on the monorepo root."
    },
    "description": {
      "type": "string"
    },
    "license": {
      "type": "string",
      "description": "SPDX license identifier."
    },
    "homepage": {
      "type": "string",
      "format": "uri"
    },
    "repository": {
      "oneOf": [
        {"type": "string"},
        {
          "type": "object",
          "properties": {
            "type": {"type": "string"},
            "url": {"type": "string", "format": "uri"},
            "directory": {"type": "string"}
          }
        }
      ]
    },
    "packageManager": {
      "type": "string",
      "pattern": "^yarn@",
      "description": "Corepack pinning field. Example: `yarn@4.5.0`."
    },
    "workspaces": {
      "description": "Glob patterns identifying child workspaces, or an object form with `packages` and `nohoist`.",
      "oneOf": [
        {
          "type": "array",
          "items": {"type": "string"}
        },
        {
          "type": "object",
          "properties": {
            "packages": {
              "type": "array",
              "items": {"type": "string"}
            },
            "nohoist": {
              "type": "array",
              "items": {"type": "string"}
            }
          }
        }
      ]
    },
    "dependencies": {
      "type": "object",
      "additionalProperties": {"type": "string"},
      "description": "Runtime dependencies. Values may use any supported Yarn protocol."
    },
    "devDependencies": {
      "type": "object",
      "additionalProperties": {"type": "string"}
    },
    "peerDependencies": {
      "type": "object",
      "additionalProperties": {"type": "string"}
    },
    "optionalDependencies": {
      "type": "object",
      "additionalProperties": {"type": "string"}
    },
    "bundleDependencies": {
      "type": "array",
      "items": {"type": "string"}
    },
    "resolutions": {
      "type": "object",
      "additionalProperties": {"type": "string"},
      "description": "Forced resolutions overriding the normal dependency graph. Yarn-only; honored project-wide from the root manifest."
    },
    "dependenciesMeta": {
      "type": "object",
      "description": "Per-dependency metadata.",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "built": {"type": "boolean"},
          "optional": {"type": "boolean"},
          "unplugged": {"type": "boolean"}
        }
      }
    },
    "peerDependenciesMeta": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "optional": {"type": "boolean"}
        }
      }
    },
    "scripts": {
      "type": "object",
      "additionalProperties": {"type": "string"},
      "description": "Project scripts executed by `yarn run` via the portable @yarnpkg/shell interpreter."
    },
    "bin": {
      "oneOf": [
        {"type": "string"},
        {
          "type": "object",
          "additionalProperties": {"type": "string"}
        }
      ]
    },
    "engines": {
      "type": "object",
      "additionalProperties": {"type": "string"}
    },
    "publishConfig": {
      "type": "object",
      "description": "Fields applied at publish time only.",
      "properties": {
        "access": {"type": "string", "enum": ["public", "restricted"]},
        "registry": {"type": "string", "format": "uri"},
        "main": {"type": "string"},
        "module": {"type": "string"},
        "types": {"type": "string"},
        "bin": {
          "oneOf": [
            {"type": "string"},
            {
              "type": "object",
              "additionalProperties": {"type": "string"}
            }
          ]
        }
      }
    },
    "installConfig": {
      "type": "object",
      "properties": {
        "hoistingLimits": {
          "type": "string",
          "enum": ["workspaces", "dependencies", "none"]
        },
        "selfReferences": {"type": "boolean"}
      }
    },
    "languageName": {
      "type": "string",
      "description": "Yarn linker language. Most workspaces use `node`."
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/yarn-pkg-workspace"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.