From 885262a52d6bcb6b97abb1862e5607caf02c9981 Mon Sep 17 00:00:00 2001 From: Eliott C Date: Thu, 26 Oct 2023 17:17:47 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Fix=20doc=20job=20(#273)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- packages/doc-internal/fix-cdn-versions.ts | 4 ++-- packages/doc-internal/package.json | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 520cef320..4c8b98174 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ You can run our packages with vanilla JS, without any bundler, by using a CDN or ```html ``` diff --git a/packages/doc-internal/fix-cdn-versions.ts b/packages/doc-internal/fix-cdn-versions.ts index 24639c76f..b9215e6dd 100644 --- a/packages/doc-internal/fix-cdn-versions.ts +++ b/packages/doc-internal/fix-cdn-versions.ts @@ -12,10 +12,10 @@ for (const readme of [ let content = readFileSync(readme, "utf-8"); content = content.replace( - /@huggingface[/]inference@\d([.]\d)?([.]\d)?/g, + /@huggingface[/]inference@\d+([.]\d+)?([.]\d+)?/g, `@huggingface/inference@${inferencePackage.version}` ); - content = content.replace(/@huggingface[/]hub@\d([.]\d)?([.]\d)?/g, `@huggingface/hub@${hubPackage.version}`); + content = content.replace(/@huggingface[/]hub@\d+([.]\d+)?([.]\d+)?/g, `@huggingface/hub@${hubPackage.version}`); writeFileSync(readme, Buffer.from(content)); } diff --git a/packages/doc-internal/package.json b/packages/doc-internal/package.json index 926eb3d86..79d8dce6b 100644 --- a/packages/doc-internal/package.json +++ b/packages/doc-internal/package.json @@ -16,10 +16,10 @@ "doc-hub": "typedoc --tsconfig ../hub/tsconfig.json --githubPages false --plugin typedoc-plugin-markdown --out ../../docs/hub --hideBreadcrumbs --hideInPageTOC --sourceLinkTemplate https://github.com/huggingface/huggingface.js/blob/main/{path}#L{line} ../hub/index.ts", "doc-inference": "typedoc --tsconfig ../inference/tsconfig.json --githubPages false --plugin typedoc-plugin-markdown --out ../../docs/inference --hideBreadcrumbs --hideInPageTOC --sourceLinkTemplate https://github.com/huggingface/huggingface.js/blob/main/{path}#L{line} ../inference/src/index.ts", "doc-agents": "typedoc --tsconfig ../agents/tsconfig.json --githubPages false --plugin typedoc-plugin-markdown --out ../../docs/agents --hideBreadcrumbs --hideInPageTOC --sourceLinkTemplate https://github.com/huggingface/huggingface.js/blob/main/{path}#L{line} ../agents/src/index.ts", - "update-toc": "ts-node --esm update-toc.ts", - "fix-cdn-versions": "ts-node --esm fix-cdn-versions.ts", - "fix-md-links": "ts-node --esm fix-md-links.ts", - "fix-md-headinghashlinks": "ts-node --esm fix-md-headinghashlinks.ts" + "update-toc": "node --experimental-specifier-resolution=node --loader ts-node/esm update-toc.ts", + "fix-cdn-versions": "node --experimental-specifier-resolution=node --loader ts-node/esm fix-cdn-versions.ts", + "fix-md-links": "node --experimental-specifier-resolution=node --loader ts-node/esm fix-md-links.ts", + "fix-md-headinghashlinks": "node --experimental-specifier-resolution=node --loader ts-node/esm fix-md-headinghashlinks.ts" }, "type": "module", "license": "MIT",