Skip to content

Commit

Permalink
fix dependency from github api on foundation simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
jbolda committed Jan 17, 2025
1 parent 74544e1 commit b99bb74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@simulacrum/github-api-simulator": {
"path": "./packages/github-api",
"manager": "javascript",
"dependencies": []
"dependencies": ["@simulacrum/foundation-simulator"]
}
}
}
5 changes: 2 additions & 3 deletions packages/github-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
export type GitHubSimulator = ({
initialState,
extend,
}: {
}?: {
initialState?: GitHubInitialStore;
extend?: {
extendStore?: SimulationInput["extendStore"];
Expand All @@ -23,11 +23,10 @@ export type GitHubSimulator = ({
) => SimulationHandlers;
extendRouter?: SimulationInput["extendRouter"];
};
// | Pick<SimulationInput, "extendStore" | "extendRouter" | "openapi">
}) => ReturnType<FoundationSimulator<ExtendedSimulationStore>>;

type SimulationInput = Parameters<typeof createFoundationSimulationServer>[0];
export const simulation: GitHubSimulator = (args) => {
export const simulation: GitHubSimulator = (args = {}) => {
const parsedInitialState = !args?.initialState
? undefined
: gitubInitialStoreSchema.parse(args?.initialState);
Expand Down

0 comments on commit b99bb74

Please sign in to comment.