Skip to content

Commit e35bdca

Browse files
Cleanup (#215)
* Remove unused functions and exports * Bump small deps
1 parent 27d4070 commit e35bdca

6 files changed

Lines changed: 58 additions & 55 deletions

File tree

app/modules/gh-docs/.server/index.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import { getDoc, getMenu } from "./docs";
22
import { getBranches } from "./branches";
3-
import { getLatestVersion, getTags } from "./tags";
4-
import invariant from "tiny-invariant";
3+
import { getTags } from "./tags";
54
import { fixupRefName } from "./doc-url-parser";
65

7-
export { getRepoTarballStream } from "./repo-tarball";
8-
96
export type { Doc } from "./docs";
107

118
const REPO = process.env.SOURCE_REPO!;
@@ -19,12 +16,6 @@ export function getRepoBranches() {
1916
return getBranches(REPO);
2017
}
2118

22-
export async function getLatestRepoTag(): Promise<string> {
23-
let tags = await getTags(REPO);
24-
invariant(tags, "Expected tags in getLatestRepoTag");
25-
return getLatestVersion(tags);
26-
}
27-
2819
export function getRepoDocsMenu(ref: string) {
2920
return getMenu(REPO, fixupRefName(ref));
3021
}

app/modules/gh-docs/.server/md.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export async function processMarkdown(
3636
return { attributes, raw, html };
3737
}
3838

39-
export async function getProcessor(options?: ProcessorOptions) {
39+
async function getProcessor(options?: ProcessorOptions) {
4040
let [
4141
{ unified },
4242
{ default: remarkGfm },
@@ -76,7 +76,7 @@ type InternalPlugin<
7676
Output,
7777
> = Unified.Plugin<[ProcessorOptions?], Input, Output>;
7878

79-
export async function loadPlugins() {
79+
async function loadPlugins() {
8080
let [{ visit, SKIP }, { htmlEscape }] = await Promise.all([
8181
import("unist-util-visit"),
8282
import("escape-goat"),

app/modules/gh-docs/.server/repo-tarball.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function getRepoTarballStream(
3838
* code in this app can continue to work the same for local dev as in
3939
* production.
4040
*/
41-
export async function getLocalTarballStream(): Promise<NodeJS.ReadableStream> {
41+
async function getLocalTarballStream(): Promise<NodeJS.ReadableStream> {
4242
invariant(
4343
process.env.LOCAL_REPO_RELATIVE_PATH,
4444
"Expected LOCAL_REPO_RELATIVE_PATH",

app/modules/gh-docs/.server/tags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ global.tagsCache ??= new LRUCache<string, string[]>({
4646

4747
// TODO: implementation details of the react router site leaked into here cause
4848
// I'm in a hurry now, sorry!
49-
export async function getAllReleases(
49+
async function getAllReleases(
5050
owner: string,
5151
repo: string,
5252
primaryPackage: string,

package-lock.json

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

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@
2626
"escape-goat": "^4.0.0",
2727
"express": "^4.21.2",
2828
"express-rate-limit": "^8.0.1",
29-
"follow-redirects": "^1.15.9",
29+
"follow-redirects": "^1.15.11",
3030
"front-matter": "^4.0.2",
3131
"gray-matter": "^4.0.3",
3232
"gunzip-maybe": "^1.4.2",
3333
"hast-util-from-html": "^2.0.3",
34-
"isbot": "^5.1.28",
34+
"hast-util-to-html": "^9.0.5",
35+
"isbot": "^5.1.31",
3536
"lodash.merge": "^4.6.2",
3637
"lru-cache": "^7.18.3",
3738
"mdast": "^2.3.2",
@@ -45,10 +46,10 @@
4546
"rehype-autolink-headings": "^7.1.0",
4647
"rehype-slug": "^6.0.0",
4748
"rehype-stringify": "^10.0.1",
48-
"remark-gfm": "^4.0.0",
49+
"remark-gfm": "^4.0.1",
4950
"remark-parse": "^11.0.0",
50-
"remark-rehype": "^11.1.1",
51-
"semver": "^7.7.0",
51+
"remark-rehype": "^11.1.2",
52+
"semver": "^7.7.2",
5253
"shiki": "^0.14.7",
5354
"tar": "^6.1.14",
5455
"tar-stream": "^3.1.7",
@@ -68,7 +69,7 @@
6869
"@types/morgan": "^1.9.10",
6970
"@types/node": "^22.18.6",
7071
"@types/parse-link-header": "^2.0.3",
71-
"@types/react": "^19.1.13",
72+
"@types/react": "^19.1.14",
7273
"@types/react-dom": "^19.1.9",
7374
"@types/semver": "^7.7.1",
7475
"@types/tar": "^6.1.13",
@@ -82,8 +83,8 @@
8283
"dotenv-cli": "^10.0.0",
8384
"happy-dom": "^18.0.1",
8485
"oxlint": "^1.18.0",
85-
"postcss": "^8.5.1",
86-
"postcss-import": "^16.1.0",
86+
"postcss": "^8.5.6",
87+
"postcss-import": "^16.1.1",
8788
"prettier": "^3.6.2",
8889
"prettier-plugin-tailwindcss": "^0.6.14",
8990
"tailwindcss": "^3.4.17",

0 commit comments

Comments
 (0)