Skip to content

Commit

Permalink
spdx complied license name in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
darsan-in committed May 18, 2024
1 parent 0d5c99c commit 79ade3e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions lib/serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import {

import { siteSearchBoxFieldName } from "../rjsconfig.json";


import { relative, basename, join, dirname } from "path";

function aggregateRatingSerializer(
Expand Down Expand Up @@ -146,7 +145,9 @@ function videoObjectSerializer(
return serializedVideoObject;
}

function nutritionalInfoSerializer(nutritionalInfo: NutritionInfoOptions): Record<string, any> {
function nutritionalInfoSerializer(
nutritionalInfo: NutritionInfoOptions,
): Record<string, any> {
const serializedNutritionalInfo = {
"@type": "NutritionInformation",
calories: nutritionalInfo.calories,
Expand Down Expand Up @@ -260,7 +261,7 @@ export function serializeArticle(

export function serializeBreadCrumb(
breadCrumbData: breadCrumbListOptions,
): Record<string, any> {
): Record<string, any> | null {
if (breadCrumbData.breadCrumbMetas.length > 1) {
const serializedJsonLD: Record<string, any> = {
"@context": "https://schema.org",
Expand All @@ -281,7 +282,7 @@ export function serializeBreadCrumb(
return serializedJsonLD;
} else {
console.log("BreadCrumb not possible");
process.exit();
return null;
}
}

Expand Down Expand Up @@ -836,7 +837,7 @@ export function serializeProfilePage(
ProfilePageData: ProfilePageOptions,
): Record<string, any> {
//remove non-alphanumeric characters except hyphen and underscore
ProfilePageData.uid = ProfilePageData.uid.replace(/[^a-zA-Z0-9-_]/g, '')
ProfilePageData.uid = ProfilePageData.uid.replace(/[^a-zA-Z0-9-_]/g, "");

const serializedJsonLD: Record<string, any> = {
"@context": "https://schema.org",
Expand Down Expand Up @@ -916,7 +917,7 @@ export function serializeEventsPage(
"@type": "PerformingGroup",
name: `${instance.performers.slice(0, -1).join(", ")} and ${instance.performers.at(-1)}`,
}
: {
: {
"@type": "Person",
name: instance.performers[0],
},
Expand Down Expand Up @@ -1029,7 +1030,7 @@ function offerSerializer(offerMetaData: Offers): Record<string, any> {
itemCondition: offerMetaData.itemCondition,
hasMerchantReturnPolicy: returnPolicySerializer(
offerMetaData.hasMerchantReturnPolicy ??
({} as MerchantReturnPolicy),
({} as MerchantReturnPolicy),
),
shippingDetails: shippingDetailsSerializer(
offerMetaData.shippingDetails ?? ({} as OfferShippingDetails),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"Generator"
],
"author": "CRESTEEM <connect@cresteem.com>",
"license": "Apache License 2.0",
"license":"Apache-2.0",
"maintainers": [
"CRESTEEM <connect@cresteem.com>",
"DARSAN <darsan@cresteem.com>"
Expand Down

0 comments on commit 79ade3e

Please sign in to comment.