Skip to content

Commit

Permalink
registry: pin deps (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte authored Dec 13, 2024
1 parent 5cd7061 commit 9abaa83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sites/docs/scripts/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import path from "node:path";
import { parse, preprocess, walk } from "svelte/compiler";
import { type Registry, styles } from "../src/lib/registry";
import config from "../svelte.config.js";
import { TMP_PINNED_DEPS } from "./tmp";

// [Dependency, [...PeerDependencies]]
const DEPENDENCIES = new Map<string, string[]>([
Expand Down Expand Up @@ -102,7 +103,7 @@ async function buildUIRegistry(componentPath: string, componentName: string, sty
files,
name: componentName,
registryDependencies: Array.from(registryDependencies),
dependencies: Array.from(dependencies),
dependencies: Array.from(dependencies).map((dep) => TMP_PINNED_DEPS.get(dep) ?? dep),
} satisfies RegistryItem;
}

Expand Down Expand Up @@ -133,7 +134,7 @@ async function crawlDemo(rootPath: string, style: string, demoType: "example" |
style,
files: [file],
registryDependencies: Array.from(registryDependencies),
dependencies: Array.from(dependencies),
dependencies: Array.from(dependencies).map((dep) => TMP_PINNED_DEPS.get(dep) ?? dep),
});
}

Expand Down
1 change: 1 addition & 0 deletions sites/docs/scripts/tmp.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const TMP_PINNED_DEPS = new Map<string, string>([["formsnap", "[email protected]"]]);

0 comments on commit 9abaa83

Please sign in to comment.