Skip to content

Commit 72dd0c3

Browse files
committed
Increase max item size for package index query
1 parent 12645c1 commit 72dd0c3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

re_pages/Packages.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

re_pages/Packages.res

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ type npmData = {
556556
"package": {
557557
"name": string,
558558
"keywords": array<string>,
559-
"description": string,
559+
"description": option<string>,
560560
"version": string,
561561
"links": {"npm": string, "repository": option<string>},
562562
},
@@ -571,7 +571,7 @@ module Response = {
571571
@val external fetchNpmPackages: string => Js.Promise.t<Response.t> = "fetch"
572572

573573
let getStaticProps: Next.GetStaticProps.revalidate<props, unit> = _ctx => {
574-
fetchNpmPackages("https://registry.npmjs.org/-/v1/search?text=keywords:rescript")
574+
fetchNpmPackages("https://registry.npmjs.org/-/v1/search?text=keywords:rescript&size=250")
575575
->Js.Promise.then_(response => {
576576
Response.json(response)
577577
}, _)
@@ -582,7 +582,7 @@ let getStaticProps: Next.GetStaticProps.revalidate<props, unit> = _ctx => {
582582
name: pkg["name"],
583583
version: pkg["version"],
584584
keywords: Resource.filterKeywords(pkg["keywords"]),
585-
description: pkg["description"],
585+
description: Belt.Option.getWithDefault(pkg["description"], ""),
586586
repositoryHref: Js.Null.fromOption(pkg["links"]["repository"]),
587587
npmHref: pkg["links"]["npm"],
588588
}

0 commit comments

Comments
 (0)