Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(remix-testing): fix deps #4757

Merged
merged 3 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions packages/remix-server-runtime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,3 @@ export type {
UploadHandler,
UploadHandlerPart,
} from "./reexport";

export type {
AgnosticDataRouteObject,
AgnosticIndexRouteObject,
AgnosticNonIndexRouteObject,
AgnosticRouteObject,
InitialEntry,
Location,
MemoryHistory,
StaticHandler,
} from "./router";
export {
createMemoryHistory,
matchRoutes,
unstable_createStaticHandler,
} from "./router";
export type { Update } from "./router/history";
export type { AgnosticRouteMatch } from "./router/utils";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer have this dup code, can import these right from @remix-run/router over in remix-testing instead of exporting through here

13 changes: 9 additions & 4 deletions packages/remix-testing/create-remix-stub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {
} from "@remix-run/react";
import { RemixEntry } from "@remix-run/react";
import type {
Action,
AgnosticDataRouteObject,
AgnosticIndexRouteObject,
AgnosticNonIndexRouteObject,
Expand All @@ -17,14 +18,18 @@ import type {
Location,
MemoryHistory,
StaticHandler,
Update,
} from "@remix-run/server-runtime";
} from "@remix-run/router";
import {
createMemoryHistory,
json,
matchRoutes,
unstable_createStaticHandler as createStaticHandler,
} from "@remix-run/server-runtime";
} from "@remix-run/router";
import { json } from "@remix-run/server-runtime";

type Update = {
action: Action;
location: Location;
};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't exported through the router since history is an implementation detail now, but it could be if needed. Just defined it here for now though


type RemixStubOptions = {
/**
Expand Down
1 change: 1 addition & 0 deletions packages/remix-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"dependencies": {
"@remix-run/node": "1.8.0",
"@remix-run/react": "1.8.0",
"@remix-run/router": "1.0.4",
"@remix-run/server-runtime": "1.8.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down