From 06deb20e92a8d6bc4d51164c31522ca034be2917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Mon, 20 May 2024 14:06:02 +0200 Subject: [PATCH] Update SDK TS defs and improve extensions getter functions (#10978) --- sdk.d.ts | 3 +++ sdk.mjs | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sdk.d.ts b/sdk.d.ts index 4d7c1fd2..8fab23ee 100644 --- a/sdk.d.ts +++ b/sdk.d.ts @@ -80,4 +80,7 @@ export function normalizeColor(text: string): string; export function getThirdPartyExtensions( readmePath?: string, ): Promise; +export function getThirdPartyLibraries( + readmePath?: string, +): Promise; export const collator: Intl.Collator; diff --git a/sdk.mjs b/sdk.mjs index 2e80cf4c..617ebdca 100644 --- a/sdk.mjs +++ b/sdk.mjs @@ -197,8 +197,8 @@ export const getThirdPartyExtensions = async ( ) => normalizeNewlines(await fs.readFile(readmePath, 'utf8')) .split('## Third-Party Extensions')[1] - .split('\n\n')[2] - .split('\n') + .split('|\n\n')[0] + .split('|\n|') .slice(2) .map((line) => { let [module, author] = line.split(' | '); @@ -228,8 +228,8 @@ export const getThirdPartyLibraries = async ( ) => normalizeNewlines(await fs.readFile(readmePath, 'utf8')) .split('## Third-Party Libraries')[1] - .split('\n\n')[2] - .split('\n') + .split('|\n\n')[0] + .split('|\n|') .slice(2) .map((line) => { let [module, author] = line.split(' | ');