Skip to content

Commit

Permalink
refactor: import deps from rimbu.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 committed Mar 2, 2024
1 parent 41f5384 commit 9a6ef14
Show file tree
Hide file tree
Showing 19 changed files with 27 additions and 33 deletions.
4 changes: 4 additions & 0 deletions deps/rimbu.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from "https://deno.land/x/[email protected]/stream/mod.ts"
export * from "https://deno.land/x/[email protected]/graph/mod.ts"
export * from "https://deno.land/x/[email protected]/hashed/mod.ts"
export type * from "https://deno.land/x/[email protected]/graph/custom/common/link.ts"
2 changes: 1 addition & 1 deletion doc/components.page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Stream } from "../deps/rimbu.ts"
import { escapeHtml } from "https://deno.land/x/[email protected]/mod.ts"
import { exampleSrc } from "../graph/_example_project.ts"
import outdent from "https://deno.land/x/[email protected]/mod.ts"
Expand Down
2 changes: 1 addition & 1 deletion doc/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
SourceFile,
} from "https://deno.land/x/[email protected]/mod.ts"

import { Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Stream } from "../deps/rimbu.ts"
import {
getAllDecls,
getGraph,
Expand Down
4 changes: 1 addition & 3 deletions doc/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { relative } from "https://deno.land/[email protected]/path/relative.ts"
import { dirname } from "https://deno.land/[email protected]/path/dirname.ts"
import { Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { HashSet } from "https://deno.land/x/[email protected]/hashed/mod.ts"

import { HashSet, Stream } from "../deps/rimbu.ts"
import { Project } from "../deps/ts_morph.ts"

import { colors, hashRGB } from "../render/colors.ts"
Expand Down
2 changes: 1 addition & 1 deletion graph/_example_project.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Stream } from "../deps/rimbu.ts"
import { inMemoryProject } from "./_project.ts"
import outdent from "https://deno.land/x/[email protected]/mod.ts"

Expand Down
2 changes: 1 addition & 1 deletion graph/_format.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Reducer, Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Reducer, Stream } from "../deps/rimbu.ts"
import { encodeVSCodeURI, prettyPrintURI } from "./vscode_uri.ts"

import type { Declaration, DeclDeps } from "./decl_deps.ts"
Expand Down
2 changes: 1 addition & 1 deletion graph/_project.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Reducer, Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Reducer, Stream } from "../deps/rimbu.ts"
import { Project, SourceFile } from "../deps/ts_morph.ts"
import { denoCompilerOptions } from "../utils/project.ts"

Expand Down
2 changes: 1 addition & 1 deletion graph/decl_deps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Stream } from "../deps/rimbu.ts"
import {
type ClassDeclaration,
type FunctionDeclaration,
Expand Down
2 changes: 1 addition & 1 deletion graph/decl_deps_bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
getDeclDeps,
getTopDecl,
} from "./decl_deps.ts"
import { Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Stream } from "../deps/rimbu.ts"
import { getAllDecls } from "./decls.ts"

/**
Expand Down
2 changes: 1 addition & 1 deletion graph/decl_deps_test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { inMemoryProject, withSrc } from "./_project.ts"
import { exampleSrc } from "./_example_project.ts"
import { assertEquals, assertSnapshot } from "../test_deps.ts"
import { Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Stream } from "../deps/rimbu.ts"
import { getAllDecls } from "./decls.ts"
import { asRecord, declDepsSerializer, serializeNoColor } from "./_format.ts"
import { snapshotTest } from "./_snapshot.ts"
Expand Down
5 changes: 1 addition & 4 deletions graph/decls.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
Stream,
StreamSource,
} from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Stream, StreamSource } from "../deps/rimbu.ts"
import { SourceFile } from "../deps/ts_morph.ts"
import { Declaration } from "./decl_deps.ts"

Expand Down
4 changes: 1 addition & 3 deletions graph/graph.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { GraphElement } from "https://deno.land/x/[email protected]/graph/custom/common/link.ts"
import { ArrowGraphHashed } from "https://deno.land/x/[email protected]/graph/mod.ts"
import { Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { ArrowGraphHashed, type GraphElement, Stream } from "../deps/rimbu.ts"
import { type Declaration, type DeclDeps, getDeclDeps } from "./decl_deps.ts"
import { encodeVSCodeURI, type VSCodeURI } from "./vscode_uri.ts"

Expand Down
4 changes: 1 addition & 3 deletions graph/graph_descendants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { ArrowGraph } from "https://deno.land/x/[email protected]/graph/mod.ts"
import { HashMap, HashSet } from "https://deno.land/x/[email protected]/hashed/mod.ts"
import { Reducer } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { type ArrowGraph, HashMap, HashSet, Reducer } from "../deps/rimbu.ts"

export const getConnectionsTo = <T>(graph: ArrowGraph<T>, node: T) =>
graph.getConnectionStreamTo(node).map(([src]) => src)
Expand Down
2 changes: 1 addition & 1 deletion graph/graph_descendants_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArrowGraphHashed } from "https://deno.land/x/[email protected]/graph/mod.ts"
import { ArrowGraphHashed } from "../deps/rimbu.ts"

import { assertEquals } from "../test_deps.ts"
import { graphDescendants } from "./graph_descendants.ts"
Expand Down
2 changes: 1 addition & 1 deletion graph/graph_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Reducer, Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Reducer, Stream } from "../deps/rimbu.ts"
import { exampleSrc } from "./_example_project.ts"
import { inMemoryProject, withSrc } from "./_project.ts"
import { declDepsToGraph, Graph } from "./graph.ts"
Expand Down
2 changes: 1 addition & 1 deletion graph/top_decl_deps_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Stream } from "../deps/rimbu.ts"
import { assertSnapshot } from "../test_deps.ts"
import { exampleSrc } from "./_example_project.ts"
import { inMemoryProject, withSrc } from "./_project.ts"
Expand Down
2 changes: 1 addition & 1 deletion graph/vscode_uri_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { Stream } from "../deps/rimbu.ts"
import { assertEquals } from "../test_deps.ts"
import { declExampleText, exampleSrc } from "./_example_project.ts"
import { inMemoryProject, withSrc } from "./_project.ts"
Expand Down
10 changes: 6 additions & 4 deletions render/data.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import type { GraphElement } from "https://deno.land/x/[email protected]/graph/custom/common/link.ts"
import type { GraphData } from "https://esm.sh/[email protected]"
import type { Opaque } from "https://raw.githubusercontent.com/sindresorhus/type-fest/main/source/opaque.d.ts"

import { ArrowGraphHashed } from "https://deno.land/x/[email protected]/graph/mod.ts"
import { Stream } from "https://deno.land/x/[email protected]/stream/mod.ts"
import { HashSet } from "https://deno.land/x/[email protected]/hashed/mod.ts"
import {
ArrowGraphHashed,
type GraphElement,
HashSet,
Stream,
} from "../deps/rimbu.ts"

import { colors, hashRGB } from "./colors.ts"
import { type LabelOption, mkToLabel } from "./label.ts"
Expand Down
5 changes: 1 addition & 4 deletions utils/resolution_host.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
ResolutionHostFactory,
ts,
} from "../deps/ts_morph.ts"
import { ResolutionHostFactory, ts } from "../deps/ts_morph.ts"

export const deno: ResolutionHostFactory = (
moduleResolutionHost,
Expand Down

0 comments on commit 9a6ef14

Please sign in to comment.