from typing import Dict


def parse_yarn_lock(json_element: Dict) -> Dict[str, str]:
    """Parse yarn lock json into dict where
    keys are package name + required version and value is locked version
    Example:
      {
        "package@1.2.3": "1.2.3",
        "utilsPackage@^1.2.3": "1.5.0",
        "renderPackage@~1.1.1": "1.1.1"
      }

    Arguments:
        json_element {Dict} -- Root element of json yarn lock

    Returns:
        Dict[str, str] -- Parsed yarn lock into package dict
    """
    return {
        key: dependency.get("version", None)
        for key, dependency in json_element.get("object", {}).items()
    }