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

startViewTransition updates #10928

Merged
merged 8 commits into from
Oct 13, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/lift-start-view-transition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"react-router-dom": patch
"react-router": patch
---

Export a separate `RouterProvider` from `react-router-dom` with `startViewTransition` support
1 change: 0 additions & 1 deletion .changeset/start-view-transition.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
"react-router-dom": minor
"react-router": minor
"@remix-run/router": minor
---

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,16 @@
"none": "48.3 kB"
},
"packages/react-router/dist/react-router.production.min.js": {
"none": "15.2 kB"
"none": "13.9 kB"
},
"packages/react-router/dist/umd/react-router.production.min.js": {
"none": "17.61 kB"
"none": "16.3 kB"
},
"packages/react-router-dom/dist/react-router-dom.production.min.js": {
"none": "13.61 kB"
"none": "15.9 kB"
},
"packages/react-router-dom/dist/umd/react-router-dom.production.min.js": {
"none": "19.91 kB"
"none": "22.1 kB"
}
}
}
17 changes: 12 additions & 5 deletions packages/react-router-dom/__tests__/exports-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,23 @@ let nonReExportedKeys = new Set([
"UNSAFE_useRoutesImpl",
]);

let modifiedExports = new Set(["RouterProvider"]);

describe("react-router-dom", () => {
for (let key in ReactRouter) {
if (!nonReExportedKeys.has(key)) {
it(`re-exports ${key} from react-router`, () => {
expect(ReactRouterDOM[key]).toBe(ReactRouter[key]);
});
} else {
if (nonReExportedKeys.has(key)) {
it(`does not re-export ${key} from react-router`, () => {
expect(ReactRouterDOM[key]).toBe(undefined);
});
} else if (modifiedExports.has(key)) {
it(`re-exports a different version of ${key}`, () => {
expect(ReactRouterDOM[key]).toBeDefined();
expect(ReactRouterDOM[key]).not.toBe(ReactRouter[key]);
});
} else {
it(`re-exports ${key} from react-router`, () => {
expect(ReactRouterDOM[key]).toBe(ReactRouter[key]);
});
}
}
});