function validateMonorepoPackageManifest(manifest, manifestDirPath) {
    if (!hasValidWorkspacesField(manifest)) {
        throw new Error(`${getManifestErrorMessagePrefix(ManifestFieldNames.Workspaces, manifest, manifestDirPath)} must be a non-empty array if present. Received: ${manifest[ManifestFieldNames.Workspaces]}`);
    }
    if (!hasValidPrivateField(manifest)) {
        throw new Error(`${getManifestErrorMessagePrefix(ManifestFieldNames.Private, manifest, manifestDirPath)} must be "true" if "${ManifestFieldNames.Workspaces}" is present. Received: ${manifest[ManifestFieldNames.Private]}`);
    }
    return manifest;
}
/**
 * Validates the "workspaces" and "private" fields of a package manifest object,
 * i.e. a parsed "package.json" file.
 *
 * Assumes that the manifest's "version" field is already validated.
 *
 * @param manifest - The manifest to validate.
 * @param manifestDirPath - The path to the directory containing the
 * manifest file relative to the root directory.
 * @returns The unmodified manifest, with the "workspaces" and "private" fields
 * typed correctly.
 */
Validates the "workspaces" and "private" fields of a package manifest object,
i.e.

Assumes that the manifest's "version" field is already validated.

@param manifest - The manifest to validate.
@param manifestDirPath - The path to the directory containing the
manifest file relative to the root directory.
@returns The unmodified manifest, with the "workspaces" and "private" fields
typed correctly.
Validates the " workspaces " and " private " fields of a package manifest object i . e . Assumes that the manifest ' s " version " field is already validated . @param manifest - The manifest to validate . @param manifestDirPath - The path to the directory containing the manifest file relative to the root directory . @returns The unmodified manifest with the " workspaces " and " private " fields typed correctly .
function validateMonorepoPackageManifest(manifest, manifestDirPath) {
    if (!hasValidWorkspacesField(manifest)) {
        throw new Error(`${getManifestErrorMessagePrefix(ManifestFieldNames.Workspaces, manifest, manifestDirPath)} must be a non-empty array if present. Received: ${manifest[ManifestFieldNames.Workspaces]}`);
    }
    if (!hasValidPrivateField(manifest)) {
        throw new Error(`${getManifestErrorMessagePrefix(ManifestFieldNames.Private, manifest, manifestDirPath)} must be "true" if "${ManifestFieldNames.Workspaces}" is present. Received: ${manifest[ManifestFieldNames.Private]}`);
    }
    return manifest;
}
function validateMonorepoPackageManifest ( manifest , manifestDirPath ) { if ( ! hasValidWorkspacesField ( manifest ) ) { throw new Error ( ` ${ getManifestErrorMessagePrefix ( ManifestFieldNames . Workspaces , manifest , manifestDirPath ) } ${ manifest [ ManifestFieldNames . Workspaces ] } ` ) ; } if ( ! hasValidPrivateField ( manifest ) ) { throw new Error ( ` ${ getManifestErrorMessagePrefix ( ManifestFieldNames . Private , manifest , manifestDirPath ) } ${ ManifestFieldNames . Workspaces } ${ manifest [ ManifestFieldNames . Private ] } ` ) ; } return manifest ; }
Validates the "workspaces" and "private" fields of a package manifest object,
 i.e.
Validates the " workspaces " and " private " fields of a package manifest object i . e .