Skip to content

Commit

Permalink
Update API reference generator's dependencies (#1180)
Browse files Browse the repository at this point in the history
Co-authored-by: KnorpelSenf <shtrog@gmail.com>
  • Loading branch information
rojvv and KnorpelSenf authored Jan 16, 2025
1 parent 63c6635 commit dd25c78
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 45 deletions.
44 changes: 22 additions & 22 deletions site/api/api_gen.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createCache } from "deno_cache/mod.ts";
import { createCache } from "@deno/cache-dir";
import { modules } from "../modules.ts";
import * as fs from "std/fs/mod.ts";
import * as path from "std/path/mod.ts";
import { doc } from "deno_doc/mod.ts";
import * as fs from "@std/fs";
import * as path from "@std/path";
import { doc } from "@deno/doc";
import { renderToString } from "preact-render-to-string";
import { Class } from "./components/Class.tsx";
import { Function } from "./components/Function.tsx";
Expand All @@ -11,7 +11,7 @@ import {
DocNodeClass,
DocNodeFunction,
DocNodeNamespace,
} from "deno_doc/types.d.ts";
} from "@deno/doc/types";
import { ToC } from "./components/ToC.tsx";
import { JSX } from "preact/jsx-runtime";
import { Interface } from "./components/Interface.tsx";
Expand Down Expand Up @@ -51,23 +51,23 @@ Deno.stdout.writeSync(
);
const cache = createCache({ root: ".cache" });
const dot = enc.encode(".");
const refs: Array<Ref> = await Promise
.all(
paths.map(
async ([id, path, slug, name, description, shortdescription]) => {
const nodes = await doc(id, { load: cache.load });
Deno.stdout.writeSync(dot);
return [
nodes.sort((a, b) => a.name.localeCompare(b.name)),
path,
slug,
name,
description,
shortdescription,
];
},
),
);

const refs = await Promise.all(paths.map(
async (
[id, path, slug, name, description, shortdescription],
): Promise<Ref> => {
const nodes = Object.values(await doc([id], { load: cache.load })).flat();
Deno.stdout.writeSync(dot);
return [
nodes.sort((a, b) => a.name.localeCompare(b.name)),
path,
slug,
name,
description,
shortdescription,
];
},
));
Deno.stdout.writeSync(enc.encode("done\n"));

function namespaceGetLink(
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/Class.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
type DocNodeClass,
type JsDocTag,
type ParamIdentifierDef,
} from "deno_doc/types.d.ts";
} from "@deno/doc/types";
import { Method } from "./Class/Method.tsx";
import { Properties } from "./Properties.tsx";
import { Constructors } from "./Class/Constructors.tsx";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/Class/Constructors.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClassConstructorDef } from "deno_doc/types.d.ts";
import { ClassConstructorDef } from "@deno/doc/types";
import { CodeBlock } from "../CodeBlock.tsx";
import { Loc } from "../Loc.tsx";
import { P } from "../P.tsx";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/Class/Method.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
DocNodeFunction,
InterfaceMethodDef,
JsDoc,
} from "deno_doc/types.d.ts";
} from "@deno/doc/types";
import { Params, TsType, TypeParams_ } from "../TsType.tsx";
import { LinkGetter } from "../types.ts";
import { CodeBlock } from "../CodeBlock.tsx";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/Function.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DocNodeFunction } from "deno_doc/types.d.ts";
import { DocNodeFunction } from "@deno/doc/types";
import { LinkGetter } from "./types.ts";
import { H1 } from "./H1.tsx";
import { H2 } from "./H2.tsx";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/Function/Parameters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
JsDocTagParam,
ObjectPatPropDef,
ParamDef,
} from "deno_doc/types.d.ts";
} from "@deno/doc/types";
import { LinkGetter } from "../types.ts";
import { H3 } from "../H3.tsx";
import { CodeBlock } from "../CodeBlock.tsx";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/Function/ReturnType.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JsDoc, JsDocTagReturn, TsTypeDef } from "deno_doc/types.d.ts";
import { JsDoc, JsDocTagReturn, TsTypeDef } from "@deno/doc/types";
import { LinkGetter } from "../types.ts";
import { CodeBlock } from "../CodeBlock.tsx";
import { TsType } from "../TsType.tsx";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/Interface.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DocNodeInterface, DocNodeNamespace } from "deno_doc/types.d.ts";
import { DocNodeInterface, DocNodeNamespace } from "@deno/doc/types";
import { Properties } from "./Properties.tsx";
import { H1 } from "./H1.tsx";
import { P } from "./P.tsx";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/Loc.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Location } from "deno_doc/types.d.ts";
import { Location } from "@deno/doc/types";

export function Loc(
{ children: { location } }: { children: { location: Location } },
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/Properties.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClassPropertyDef, InterfacePropertyDef } from "deno_doc/types.d.ts";
import { ClassPropertyDef, InterfacePropertyDef } from "@deno/doc/types";
import { PropertyName } from "./PropertyName.tsx";
import { TsType } from "./TsType.tsx";
import { LinkGetter } from "./types.ts";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/ToC.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DocNode, DocNodeKind } from "deno_doc/types.d.ts";
import { DocNode, DocNodeKind } from "@deno/doc/types";
import { H1 } from "./H1.tsx";
import { P } from "./P.tsx";
import { Sector } from "./Sector.tsx";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/TsType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
TsTypeParamDef,
TsTypePredicateDef,
TsTypeRefDef,
} from "deno_doc/types.d.ts";
} from "@deno/doc/types";
import { JSX } from "preact/jsx-runtime";
import { PropertyName } from "./PropertyName.tsx";
import { LinkGetter } from "./types.ts";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/TypeAlias.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DocNodeNamespace, DocNodeTypeAlias } from "deno_doc/types.d.ts";
import { DocNodeNamespace, DocNodeTypeAlias } from "@deno/doc/types";
import { TsType } from "./TsType.tsx";
import { LinkGetter } from "./types.ts";
import { H1 } from "./H1.tsx";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/TypeParams.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TsTypeParamDef } from "deno_doc/types.d.ts";
import { TsTypeParamDef } from "@deno/doc/types";
import { LinkGetter } from "./types.ts";
import { H4 } from "./H4.tsx";
import { CodeBlock } from "./CodeBlock.tsx";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/Variable.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DocNodeVariable } from "deno_doc/types.d.ts";
import { DocNodeVariable } from "@deno/doc/types";
import { H1 } from "./H1.tsx";
import { P } from "./P.tsx";
import { LinkGetter } from "./types.ts";
Expand Down
2 changes: 1 addition & 1 deletion site/api/components/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TsTypeParamDef } from "deno_doc/types.d.ts";
import { TsTypeParamDef } from "@deno/doc/types";

export function newGetLink(
oldGetLink: (r: string) => string | null,
Expand Down
14 changes: 7 additions & 7 deletions site/api/deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"reset": "rm -rf .cache"
},
"imports": {
"std/": "https://deno.land/std@0.220.0/",
"preact": "https://esm.sh/preact@10.19.6/",
"preact/": "https://esm.sh/preact@10.19.6/",
"preact-render-to-string": "https://esm.sh/preact-render-to-string@6.4.0/",
"deno_doc/": "https://deno.land/x/deno_doc@0.117.0/",
"deno_cache/": "https://deno.land/x/deno_cache@0.7.1/",
"marked-smartypants": "https://esm.sh/marked-smartypants@1.1.6/"
"@deno/cache-dir": "jsr:@deno/cache-dir@^0.16.0",
"@deno/doc": "jsr:@deno/doc@^0.165.0",
"@std/fs": "jsr:@std/fs@^1.0.9",
"@std/path": "jsr:@std/path@^1.0.8",
"preact": "npm:preact@^10.25.4",
"preact-render-to-string": "npm:preact-render-to-string@^6.5.13",
"marked-smartypants": "npm:marked-smartypants@^1.1.9"
},
"exclude": [
".cache"
Expand Down
2 changes: 1 addition & 1 deletion site/api/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type DocNode } from "deno_doc/types.d.ts";
import { type DocNode } from "@deno/doc/types";

export type Ref = [
nodes: DocNode[],
Expand Down

0 comments on commit dd25c78

Please sign in to comment.