{
    "definitions": {
        "dependency-map": {
            "$ref": "#/definitions/string-map"
        },
        "email": {
            "description": "email address",
            "pattern": "@",
            "type": "string"
        },
        "keyword": {
            "pattern": "^[a-z0-9](?:[_\\.\\- ]?[a-z0-9]+)*$",
            "type": "string"
        },
        "license-object": {
            "additionalProperties": false,
            "properties": {
                "type": {
                    "pattern": "[a-zA-Z0-9 _\\-\\.]+",
                    "type": "string"
                },
                "url": {
                    "$ref": "#/definitions/uri-http"
                }
            },
            "required": [
                "type",
                "url"
            ],
            "type": "object"
        },
        "operating-system": {
            "enum": [
                "aix",
                "darwin",
                "freebsd",
                "linux",
                "macos",
                "openbsd",
                "sunos",
                "win32",
                "windows"
            ],
            "type": "string"
        },
        "path": {
            "minLength": 1,
            "type": "string"
        },
        "path-map": {
            "additionalProperties": false,
            "patternProperties": {
                ".+": {
                    "$ref": "#/definitions/path"
                }
            },
            "type": "object"
        },
        "person": {
            "description": "author, contributor, or maintainer",
            "oneOf": [
                {
                    "$ref": "#/definitions/person-object"
                }
            ]
        },
        "person-object": {
            "properties": {
                "email": {
                    "$ref": "#/definitions/email"
                },
                "name": {
                    "pattern": "[a-zA-Z ]",
                    "type": "string"
                },
                "url": {
                    "$ref": "#/definitions/uri-http"
                }
            },
            "required": [
                "name"
            ],
            "type": "object"
        },
        "repo-object": {
            "additionalProperties": false,
            "properties": {
                "type": {
                    "pattern": "[a-zA-Z]",
                    "type": "string"
                },
                "url": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/uri-http"
                        },
                        {
                            "$ref": "#/definitions/uri-git"
                        }
                    ]
                }
            },
            "required": [
                "type",
                "url"
            ],
            "type": "object"
        },
        "semver": {
            "description": "semantic version",
            "pattern": "^\\d+\\.\\d+\\.\\d+",
            "type": "string"
        },
        "string-map": {
            "additionalProperties": false,
            "patternProperties": {
                ".+": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "uri-git": {
            "pattern": "^git://",
            "type": "string"
        },
        "uri-http": {
            "pattern": "^https?://",
            "type": "string"
        }
    },
    "description": "Schema for package.json.",
    "properties": {
        "__stdlib__": {
            "description": "project meta data",
            "properties": {
                "envs": {
                    "description": "supported environments",
                    "properties": {
                        "browser": {
                            "type": "boolean"
                        },
                        "node": {
                            "type": "boolean"
                        }
                    },
                    "type": "object"
                },
                "stability": {
                    "description": "package stability",
                    "type": "string"
                }
            },
            "required": [],
            "type": "object"
        },
        "author": {
            "$ref": "#/definitions/person",
            "description": "package author"
        },
        "bin": {
            "$ref": "#/definitions/path-map",
            "description": "package executables"
        },
        "browser": {
            "description": "main package entry point for a browser environment",
            "oneOf": [
                {
                    "$ref": "#/definitions/path"
                },
                {
                    "$ref": "#/definitions/path-map"
                }
            ]
        },
        "bugs": {
            "additionalProperties": false,
            "description": "bug reporting",
            "properties": {
                "url": {
                    "$ref": "#/definitions/uri-http"
                }
            },
            "required": [
                "url"
            ],
            "type": "object"
        },
        "contributors": {
            "description": "package contributors",
            "items": {
                "$ref": "#/definitions/person"
            },
            "minItems": 1,
            "type": "array",
            "_uniqueItems": true
        },
        "dependencies": {
            "$ref": "#/definitions/dependency-map",
            "description": "package dependencies"
        },
        "description": {
            "description": "package description",
            "minLength": 1,
            "type": "string"
        },
        "devDependencies": {
            "$ref": "#/definitions/dependency-map",
            "description": "package development dependencies"
        },
        "directories": {
            "additionalProperties": false,
            "description": "package directories",
            "properties": {
                "benchmark": {
                    "$ref": "#/definitions/path"
                },
                "bin": {
                    "$ref": "#/definitions/path"
                },
                "data": {
                    "$ref": "#/definitions/path"
                },
                "doc": {
                    "$ref": "#/definitions/path"
                },
                "example": {
                    "$ref": "#/definitions/path"
                },
                "include": {
                    "$ref": "#/definitions/path"
                },
                "lib": {
                    "$ref": "#/definitions/path"
                },
                "man": {
                    "$ref": "#/definitions/path"
                },
                "scripts": {
                    "$ref": "#/definitions/path"
                },
                "src": {
                    "$ref": "#/definitions/path"
                },
                "test": {
                    "$ref": "#/definitions/path"
                }
            },
            "required": [],
            "type": "object"
        },
        "engines": {
            "$ref": "#/definitions/string-map",
            "description": "supported engines"
        },
        "gypfile": {
            "description": "boolean instructing npm that a package is a binary addon that needs compiling and that npm should invoke node-gyp",
            "type": "boolean"
        },
        "homepage": {
            "$ref": "#/definitions/uri-http",
            "description": "package homepage"
        },
        "keywords": {
            "description": "package keywords",
            "items": {
                "$ref": "#/definitions/keyword"
            },
            "type": "array",
            "_uniqueItems": true
        },
        "license": {
            "description": "package license",
            "minLength": 1,
            "type": "string"
        },
        "licenses": {
            "description": "package licenses",
            "items": {
                "$ref": "#/definitions/license-object"
            },
            "minItems": 1,
            "type": "array",
            "_uniqueItems": true
        },
        "main": {
            "$ref": "#/definitions/path",
            "description": "main package entry point"
        },
        "maintainers": {
            "description": "package maintainers",
            "items": {
                "$ref": "#/definitions/person"
            },
            "minItems": 1,
            "type": "array",
            "_uniqueItems": true
        },
        "name": {
            "description": "package name",
            "pattern": "^@?[a-z](?:[-\\/]?[_a-z0-9]+)*$",
            "type": "string"
        },
        "os": {
            "description": "supported operating systems",
            "items": {
                "$ref": "#/definitions/operating-system"
            },
            "type": "array",
            "_uniqueItems": true
        },
        "repositories": {
            "description": "package repositories",
            "items": {
                "$ref": "#/definitions/repo-object"
            },
            "minItems": 1,
            "type": "array",
            "_uniqueItems": true
        },
        "repository": {
            "$ref": "#/definitions/repo-object",
            "description": "package repository"
        },
        "scripts": {
            "$ref": "#/definitions/string-map",
            "description": "package scripts"
        },
        "types": {
            "$ref": "#/definitions/path",
            "description": "package TypeScript definitions"
        },
        "unpkg": {
            "$ref": "#/definitions/path",
            "description": "main package entry point for the unpkg CDN"
        },
        "version": {
            "$ref": "#/definitions/semver",
            "description": "package version"
        }
    },
    "required": [
        "name",
        "version",
        "description",
        "author",
        "contributors",
        "main",
        "scripts",
        "homepage",
        "repository",
        "bugs",
        "dependencies",
        "devDependencies",
        "engines",
        "license",
        "keywords"
    ],
    "type": "object"
}