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

Add deprecations for future flags #10126

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add future flags to e2e tests to avoid unwanted console output
brophdawg11 committed Oct 17, 2024
commit 293649e303bc9a84e89ee4ec28867d1ad611efeb
10 changes: 9 additions & 1 deletion integration/vite-build-test.ts
Original file line number Diff line number Diff line change
@@ -40,7 +40,15 @@ test.beforeAll(async () => {
},
plugins: [
mdx(),
remix(),
remix({
future: {
v3_fetcherPersist: true,
v3_lazyRouteDiscovery: true,
v3_relativeSplatPath: true,
v3_singleFetch: true,
v3_throwAbortReason: true,
}
}),
],
});
`,
15 changes: 13 additions & 2 deletions integration/vite-css-test.ts
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ const files = {
`,
"app/entry.client.tsx": js`
import "./entry.client.css";
import { RemixBrowser } from "@remix-run/react";
import { startTransition, StrictMode } from "react";
import { hydrateRoot } from "react-dom/client";
@@ -156,7 +156,18 @@ const VITE_CONFIG = async (port: number) => dedent`
export default {
${await viteConfig.server({ port })}
plugins: [remix(), vanillaExtractPlugin()],
plugins: [
remix({
future: {
v3_fetcherPersist: true,
v3_lazyRouteDiscovery: true,
v3_relativeSplatPath: true,
v3_singleFetch: true,
v3_throwAbortReason: true,
}
}),
vanillaExtractPlugin()
],
}
`;

20 changes: 18 additions & 2 deletions integration/vite-presets-test.ts
Original file line number Diff line number Diff line change
@@ -26,6 +26,13 @@ const files = {
assetsDir: "custom-assets-dir",
},
plugins: [remix({
future: {
v3_fetcherPersist: true,
v3_lazyRouteDiscovery: true,
v3_relativeSplatPath: true,
v3_singleFetch: true,
v3_throwAbortReason: true,
},
presets: [
// Ensure user config is passed to remixConfig hook
{
@@ -35,7 +42,16 @@ const files = {
throw new Error("Remix user config doesn't have presets array.");
}
let expected = JSON.stringify({ appDirectory: "app"});
let expected = JSON.stringify({
future: {
v3_fetcherPersist: true,
v3_lazyRouteDiscovery: true,
v3_relativeSplatPath: true,
v3_singleFetch: true,
v3_throwAbortReason: true,
},
appDirectory: "app",
});
let actual = JSON.stringify(restUserConfig);
if (actual !== expected) {
@@ -49,7 +65,7 @@ const files = {
return {};
},
},
// Ensure preset config takes lower precedence than user config
{
name: "test-preset",