From 9bbc4eaa887d50507a4fecdc587a64125f0bdd7b Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Wed, 22 Mar 2023 16:29:35 -0400 Subject: [PATCH] test: remove flatRoutesWarning and v2_routeConvention future flag Signed-off-by: Logan McAnsh --- integration/abort-signal-test.ts | 1 - integration/action-test.ts | 3 - integration/bug-report-test.ts | 1 - integration/catch-boundary-data-test.ts | 3 - integration/catch-boundary-test.ts | 3 - integration/cf-compiler-test.ts | 1 - integration/compiler-test.ts | 5 +- integration/css-modules-test.ts | 1 - integration/css-side-effect-imports-test.ts | 1 - integration/custom-entry-server-test.ts | 1 - integration/defer-loader-test.ts | 1 - integration/defer-test.ts | 5 +- integration/deno-compiler-test.ts | 1 - .../deterministic-build-output-test.ts | 2 - integration/error-boundary-test.ts | 18 ----- integration/error-boundary-v2-test.ts | 3 - integration/error-data-request-test.ts | 1 - integration/esm-only-warning-test.ts | 1 - integration/fetcher-layout-test.ts | 1 - integration/fetcher-state-test.ts | 1 - integration/fetcher-test.ts | 1 - integration/flat-routes-test.ts | 10 +-- integration/form-data-test.ts | 1 - integration/form-test.ts | 1 - integration/headers-test.ts | 2 - integration/hmr-test.ts | 1 - integration/hook-useSubmit-test.ts | 1 - integration/js-routes-test.ts | 3 - integration/layout-route-test.ts | 3 - integration/link-test.ts | 3 - integration/loader-test.ts | 4 -- integration/matches-test.ts | 1 - integration/mdx-test.ts | 1 - integration/meta-test.ts | 3 - integration/multiple-cookies-test.ts | 3 - integration/path-mapping-test.ts | 1 - integration/postcss-test.ts | 1 - integration/prefetch-test.ts | 1 - integration/redirects-test.ts | 1 - integration/rendering-test.ts | 1 - integration/request-test.ts | 1 - integration/resource-routes-test.ts | 1 - integration/revalidate-test.ts | 3 - integration/scroll-test.ts | 1 - .../server-code-in-browser-message-test.ts | 1 - integration/server-entry-test.ts | 1 - integration/server-source-maps-test.ts | 1 - integration/set-cookie-revalidation-test.ts | 1 - integration/shared-route-imports-test.ts | 1 - integration/splat-routes-test.ts | 1 - integration/tailwind-test.ts | 1 - integration/transition-test.ts | 1 - integration/tsconfig-test.ts | 6 -- integration/upload-test.ts | 1 - integration/vanilla-extract-test.ts | 67 +++++++++---------- packages/remix-dev/__tests__/create-test.ts | 5 +- 56 files changed, 37 insertions(+), 153 deletions(-) diff --git a/integration/abort-signal-test.ts b/integration/abort-signal-test.ts index 17c55a06acd..35b7b562eab 100644 --- a/integration/abort-signal-test.ts +++ b/integration/abort-signal-test.ts @@ -9,7 +9,6 @@ let appFixture: AppFixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/_index.jsx": js` import { json } from "@remix-run/node"; diff --git a/integration/action-test.ts b/integration/action-test.ts index 1d30db48a19..6fb06fb1a02 100644 --- a/integration/action-test.ts +++ b/integration/action-test.ts @@ -17,9 +17,6 @@ test.describe("actions", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/routes/urlencoded.jsx": js` import { Form, useActionData } from "@remix-run/react"; diff --git a/integration/bug-report-test.ts b/integration/bug-report-test.ts index 8c6048ffe02..8634dc2a112 100644 --- a/integration/bug-report-test.ts +++ b/integration/bug-report-test.ts @@ -42,7 +42,6 @@ let appFixture: AppFixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, //////////////////////////////////////////////////////////////////////////// // 💿 Next, add files to this object, just like files in a real app, // `createFixture` will make an app and run your tests against it. diff --git a/integration/catch-boundary-data-test.ts b/integration/catch-boundary-data-test.ts index f675f24d80b..36f391a479f 100644 --- a/integration/catch-boundary-data-test.ts +++ b/integration/catch-boundary-data-test.ts @@ -26,9 +26,6 @@ let LAYOUT_DATA = "root data"; test.beforeAll(async () => { fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/root.jsx": js` import { json } from "@remix-run/node"; diff --git a/integration/catch-boundary-test.ts b/integration/catch-boundary-test.ts index c789d88c930..052e9b06d94 100644 --- a/integration/catch-boundary-test.ts +++ b/integration/catch-boundary-test.ts @@ -24,9 +24,6 @@ test.describe("CatchBoundary", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/root.jsx": js` import { json } from "@remix-run/node"; diff --git a/integration/cf-compiler-test.ts b/integration/cf-compiler-test.ts index ea586d57150..7e0af68629e 100644 --- a/integration/cf-compiler-test.ts +++ b/integration/cf-compiler-test.ts @@ -9,7 +9,6 @@ test.describe("cloudflare compiler", () => { test.beforeAll(async () => { projectDir = await createFixtureProject({ - future: { v2_routeConvention: true }, setup: "cloudflare", template: "cf-template", files: { diff --git a/integration/compiler-test.ts b/integration/compiler-test.ts index c6aaab18e3a..1a77a3056eb 100644 --- a/integration/compiler-test.ts +++ b/integration/compiler-test.ts @@ -25,9 +25,7 @@ test.describe("compiler", () => { "remix.config.js": js` let { getDependenciesToBundle } = require("@remix-run/dev"); module.exports = { - future: { - v2_routeConvention: true, - }, + serverDependenciesToBundle: [ "esm-only-pkg", "esm-only-single-export", @@ -329,7 +327,6 @@ test.describe("compiler", () => { await expect(() => createFixtureProject({ - future: { v2_routeConvention: true }, buildStdio, files: { "app/routes/_index.jsx": js` diff --git a/integration/css-modules-test.ts b/integration/css-modules-test.ts index d47ec381a53..ec5a75e588f 100644 --- a/integration/css-modules-test.ts +++ b/integration/css-modules-test.ts @@ -20,7 +20,6 @@ test.describe("CSS Modules", () => { test.beforeAll(async () => { fixture = await createFixture({ future: { - v2_routeConvention: true, // Enable all CSS future flags to // ensure features don't clash unstable_cssSideEffectImports: true, diff --git a/integration/css-side-effect-imports-test.ts b/integration/css-side-effect-imports-test.ts index f0035aff484..4615338906e 100644 --- a/integration/css-side-effect-imports-test.ts +++ b/integration/css-side-effect-imports-test.ts @@ -29,7 +29,6 @@ test.describe("CSS side-effect imports", () => { unstable_postcss: true, unstable_tailwind: true, unstable_vanillaExtract: true, - v2_routeConvention: true, }, }; `, diff --git a/integration/custom-entry-server-test.ts b/integration/custom-entry-server-test.ts index c9594d40e38..c7f4f64b17b 100644 --- a/integration/custom-entry-server-test.ts +++ b/integration/custom-entry-server-test.ts @@ -9,7 +9,6 @@ let appFixture: AppFixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/entry.server.jsx": js` import * as React from "react"; diff --git a/integration/defer-loader-test.ts b/integration/defer-loader-test.ts index 22a109b6ee2..d61bbe646f7 100644 --- a/integration/defer-loader-test.ts +++ b/integration/defer-loader-test.ts @@ -9,7 +9,6 @@ let appFixture: AppFixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/_index.jsx": js` import { useLoaderData, Link } from "@remix-run/react"; diff --git a/integration/defer-test.ts b/integration/defer-test.ts index 1c81b0e7e7d..79bcd3f09c8 100644 --- a/integration/defer-test.ts +++ b/integration/defer-test.ts @@ -33,9 +33,7 @@ test.describe("non-aborted", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, + future: {}, files: { "app/components/counter.tsx": js` import { useState } from "react"; @@ -939,7 +937,6 @@ test.describe("aborted", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, //////////////////////////////////////////////////////////////////////////// // 💿 Next, add files to this object, just like files in a real app, // `createFixture` will make an app and run your tests against it. diff --git a/integration/deno-compiler-test.ts b/integration/deno-compiler-test.ts index 3c79bc1b7e5..e9013a453b0 100644 --- a/integration/deno-compiler-test.ts +++ b/integration/deno-compiler-test.ts @@ -34,7 +34,6 @@ const searchFiles = async (pattern: string | RegExp, files: string[]) => { test.beforeAll(async () => { projectDir = await createFixtureProject({ - future: { v2_routeConvention: true }, template: "deno-template", files: { "package.json": json({ diff --git a/integration/deterministic-build-output-test.ts b/integration/deterministic-build-output-test.ts index 7a220bd82e4..29555f4b455 100644 --- a/integration/deterministic-build-output-test.ts +++ b/integration/deterministic-build-output-test.ts @@ -30,7 +30,6 @@ test("builds deterministically under different paths", async () => { unstable_cssSideEffectImports: true, unstable_postcss: true, unstable_vanillaExtract: true, - v2_routeConvention: true, }, files: { "app/routes/_index.mdx": "# hello world", @@ -120,7 +119,6 @@ test("builds Vanilla Extract files deterministically under different paths with let init: FixtureInit = { future: { unstable_vanillaExtract: { cache: true }, - v2_routeConvention: true, }, files: { "app/routes/foo.tsx": js` diff --git a/integration/error-boundary-test.ts b/integration/error-boundary-test.ts index 03103acbcae..25c1bb911f9 100644 --- a/integration/error-boundary-test.ts +++ b/integration/error-boundary-test.ts @@ -41,9 +41,6 @@ test.describe("ErrorBoundary", () => { _consoleError = console.error; console.error = () => {}; fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/root.jsx": js` import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; @@ -494,9 +491,6 @@ test.describe("ErrorBoundary", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/root.jsx": js` import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; @@ -662,9 +656,6 @@ test.describe("loaderData in ErrorBoundary", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/root.jsx": js` import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; @@ -1012,9 +1003,6 @@ test.describe("Default ErrorBoundary", () => { test.describe("When the root route does not have a boundary", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, files: getFiles({ includeRootErrorBoundary: false }), }); appFixture = await createAppFixture(fixture, ServerMode.Development); @@ -1083,9 +1071,6 @@ test.describe("Default ErrorBoundary", () => { test.describe("When the root route has a boundary", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, files: getFiles({ includeRootErrorBoundary: true }), }); appFixture = await createAppFixture(fixture, ServerMode.Development); @@ -1149,9 +1134,6 @@ test.describe("Default ErrorBoundary", () => { test.describe("When the root route has a boundary but it also throws 😦", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, files: getFiles({ includeRootErrorBoundary: true, rootErrorBoundaryThrows: true, diff --git a/integration/error-boundary-v2-test.ts b/integration/error-boundary-v2-test.ts index e8b1d381baf..0d775de1c50 100644 --- a/integration/error-boundary-v2-test.ts +++ b/integration/error-boundary-v2-test.ts @@ -13,9 +13,6 @@ test.describe("V2 Singular ErrorBoundary (future.v2_errorBoundary)", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/root.jsx": js` import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; diff --git a/integration/error-data-request-test.ts b/integration/error-data-request-test.ts index c282820e47b..bda825e5795 100644 --- a/integration/error-data-request-test.ts +++ b/integration/error-data-request-test.ts @@ -16,7 +16,6 @@ test.describe("ErrorBoundary", () => { }; fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; diff --git a/integration/esm-only-warning-test.ts b/integration/esm-only-warning-test.ts index 4af2e7f4b65..a22184d710a 100644 --- a/integration/esm-only-warning-test.ts +++ b/integration/esm-only-warning-test.ts @@ -10,7 +10,6 @@ test.beforeAll(async () => { await createFixtureProject({ buildStdio, - future: { v2_routeConvention: true }, files: { "package.json": json({ name: "remix-integration-9v4bpv66vd", diff --git a/integration/fetcher-layout-test.ts b/integration/fetcher-layout-test.ts index 90e3e30cccd..c7929ce4311 100644 --- a/integration/fetcher-layout-test.ts +++ b/integration/fetcher-layout-test.ts @@ -9,7 +9,6 @@ let appFixture: AppFixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/layout-action.jsx": js` import { json } from "@remix-run/node"; diff --git a/integration/fetcher-state-test.ts b/integration/fetcher-state-test.ts index fb11e706434..dcf7bcff255 100644 --- a/integration/fetcher-state-test.ts +++ b/integration/fetcher-state-test.ts @@ -19,7 +19,6 @@ test.describe("fetcher states", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import { useMemo, useRef } from "react"; diff --git a/integration/fetcher-test.ts b/integration/fetcher-test.ts index 340471d85ca..9042e58b3e2 100644 --- a/integration/fetcher-test.ts +++ b/integration/fetcher-test.ts @@ -17,7 +17,6 @@ test.describe("useFetcher", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/resource-route-action-only.ts": js` import { json } from "@remix-run/node"; diff --git a/integration/flat-routes-test.ts b/integration/flat-routes-test.ts index 0b4b6b6aab6..63642d75c7c 100644 --- a/integration/flat-routes-test.ts +++ b/integration/flat-routes-test.ts @@ -5,7 +5,6 @@ import { PlaywrightFixture } from "./helpers/playwright-fixture"; import type { Fixture, AppFixture } from "./helpers/create-fixture"; import { createFixtureProject } from "./helpers/create-fixture"; import { createAppFixture, createFixture, js } from "./helpers/create-fixture"; -import { flatRoutesWarning } from "../packages/remix-dev/config"; let fixture: Fixture; let appFixture: AppFixture; @@ -13,7 +12,6 @@ let appFixture: AppFixture; test.describe("flat routes", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; @@ -162,7 +160,7 @@ test.describe("warns when v1 routesConvention is used", () => { console.error = () => {}; await createFixtureProject({ buildStdio, - future: { v2_routeConvention: false }, + files: { "routes/index.tsx": js` export default function () { @@ -187,11 +185,6 @@ test.describe("warns when v1 routesConvention is used", () => { console.warn = originalConsoleWarn; console.error = originalConsoleError; }); - - test("warns about conflicting routes", () => { - console.log(buildOutput); - expect(buildOutput).toContain(flatRoutesWarning); - }); }); test.describe("emits warnings for route conflicts", async () => { @@ -208,7 +201,6 @@ test.describe("emits warnings for route conflicts", async () => { console.error = () => {}; await createFixtureProject({ buildStdio, - future: { v2_routeConvention: true }, files: { "routes/_dashboard._index.tsx": js` export default function () { diff --git a/integration/form-data-test.ts b/integration/form-data-test.ts index 1d272dacef7..431beb3cf2c 100644 --- a/integration/form-data-test.ts +++ b/integration/form-data-test.ts @@ -7,7 +7,6 @@ let fixture: Fixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/_index.jsx": js` import { json } from "@remix-run/node"; diff --git a/integration/form-test.ts b/integration/form-test.ts index b1bb6096ac1..a853c65abb0 100644 --- a/integration/form-test.ts +++ b/integration/form-test.ts @@ -49,7 +49,6 @@ test.describe("Forms", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/get-submission.jsx": js` import { useLoaderData, Form } from "@remix-run/react"; diff --git a/integration/headers-test.ts b/integration/headers-test.ts index 34d7ab6ba44..828d9e6766e 100644 --- a/integration/headers-test.ts +++ b/integration/headers-test.ts @@ -13,7 +13,6 @@ test.describe("headers export", () => { test.beforeAll(async () => { appFixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import { json } from "@remix-run/node"; @@ -100,7 +99,6 @@ test.describe("headers export", () => { let HEADER_VALUE = "SUCCESS"; let fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; diff --git a/integration/hmr-test.ts b/integration/hmr-test.ts index ba8a5ed1d1e..56d650c1ff0 100644 --- a/integration/hmr-test.ts +++ b/integration/hmr-test.ts @@ -14,7 +14,6 @@ let fixture = (options: { port: number; appServerPort: number }) => ({ appServerPort: options.appServerPort, }, unstable_tailwind: true, - v2_routeConvention: true, }, files: { "package.json": json({ diff --git a/integration/hook-useSubmit-test.ts b/integration/hook-useSubmit-test.ts index aae3fbb6f6a..11ab26d6e4c 100644 --- a/integration/hook-useSubmit-test.ts +++ b/integration/hook-useSubmit-test.ts @@ -10,7 +10,6 @@ test.describe("`useSubmit()` returned function", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/_index.jsx": js` import { useLoaderData, useSubmit } from "@remix-run/react"; diff --git a/integration/js-routes-test.ts b/integration/js-routes-test.ts index 5b3b314aeda..47ef5a33b51 100644 --- a/integration/js-routes-test.ts +++ b/integration/js-routes-test.ts @@ -10,9 +10,6 @@ test.describe(".js route files", () => { test.beforeAll(async () => { appFixture = await createAppFixture( await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/routes/js.js": js` export default () =>
Rendered with .js ext
; diff --git a/integration/layout-route-test.ts b/integration/layout-route-test.ts index eeab576a210..9f3ac291c2d 100644 --- a/integration/layout-route-test.ts +++ b/integration/layout-route-test.ts @@ -10,9 +10,6 @@ test.describe("pathless layout routes", () => { test.beforeAll(async () => { appFixture = await createAppFixture( await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/routes/_layout.jsx": js` import { Outlet } from "@remix-run/react"; diff --git a/integration/link-test.ts b/integration/link-test.ts index 1911913ab98..fdded5d5d76 100644 --- a/integration/link-test.ts +++ b/integration/link-test.ts @@ -32,9 +32,6 @@ test.describe("route module link export", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/favicon.ico": js``, diff --git a/integration/loader-test.ts b/integration/loader-test.ts index d0e810f0779..89656e431de 100644 --- a/integration/loader-test.ts +++ b/integration/loader-test.ts @@ -12,7 +12,6 @@ test.describe("loader", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import { json } from "@remix-run/node"; @@ -76,9 +75,6 @@ test.describe("loader in an app", () => { test.beforeAll(async () => { appFixture = await createAppFixture( await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/root.jsx": js` import { Outlet } from '@remix-run/react' diff --git a/integration/matches-test.ts b/integration/matches-test.ts index 7cf0862bf03..3516075152f 100644 --- a/integration/matches-test.ts +++ b/integration/matches-test.ts @@ -10,7 +10,6 @@ test.describe("useMatches", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import * as React from 'react'; diff --git a/integration/mdx-test.ts b/integration/mdx-test.ts index 7861e8f11f2..c502916ac54 100644 --- a/integration/mdx-test.ts +++ b/integration/mdx-test.ts @@ -15,7 +15,6 @@ test.describe("mdx", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; diff --git a/integration/meta-test.ts b/integration/meta-test.ts index 44870cb7bb2..3556d100ee6 100644 --- a/integration/meta-test.ts +++ b/integration/meta-test.ts @@ -19,9 +19,6 @@ test.describe("meta", () => { "remix.config.js": js` module.exports = { ignoredRouteFiles: ["**/.*"], - future: { - v2_routeConvention: true, - }, }; `, diff --git a/integration/multiple-cookies-test.ts b/integration/multiple-cookies-test.ts index 7aacbb2152d..19ff6348d47 100644 --- a/integration/multiple-cookies-test.ts +++ b/integration/multiple-cookies-test.ts @@ -10,9 +10,6 @@ test.describe("pathless layout routes", () => { test.beforeAll(async () => { appFixture = await createAppFixture( await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/routes/_index.jsx": js` import { redirect, json } from "@remix-run/node"; diff --git a/integration/path-mapping-test.ts b/integration/path-mapping-test.ts index 4064b9903e3..43cfcf0afa8 100644 --- a/integration/path-mapping-test.ts +++ b/integration/path-mapping-test.ts @@ -7,7 +7,6 @@ let fixture: Fixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/components/my-lib/index.ts": js` export const pizza = "this is a pizza"; diff --git a/integration/postcss-test.ts b/integration/postcss-test.ts index 71791ca9795..5a8c0af8073 100644 --- a/integration/postcss-test.ts +++ b/integration/postcss-test.ts @@ -34,7 +34,6 @@ test.describe("PostCSS", () => { test.beforeAll(async () => { fixture = await createFixture({ future: { - v2_routeConvention: true, unstable_cssSideEffectImports: true, unstable_postcss: true, unstable_tailwind: true, diff --git a/integration/prefetch-test.ts b/integration/prefetch-test.ts index 62e8fcde5e5..7e8c7e60ae3 100644 --- a/integration/prefetch-test.ts +++ b/integration/prefetch-test.ts @@ -8,7 +8,6 @@ import { PlaywrightFixture } from "./helpers/playwright-fixture"; // Generate the test app using the given prefetch mode function fixtureFactory(mode: RemixLinkProps["prefetch"]) { return { - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import { diff --git a/integration/redirects-test.ts b/integration/redirects-test.ts index 73a4897e6c3..3a9ef6400b4 100644 --- a/integration/redirects-test.ts +++ b/integration/redirects-test.ts @@ -10,7 +10,6 @@ test.describe("redirects", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/action.jsx": js` import { Outlet, useLoaderData } from "@remix-run/react"; diff --git a/integration/rendering-test.ts b/integration/rendering-test.ts index 0724ea9a050..d7abc2dc5bf 100644 --- a/integration/rendering-test.ts +++ b/integration/rendering-test.ts @@ -10,7 +10,6 @@ test.describe("rendering", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; diff --git a/integration/request-test.ts b/integration/request-test.ts index 27c4707143b..37bfc4f2721 100644 --- a/integration/request-test.ts +++ b/integration/request-test.ts @@ -9,7 +9,6 @@ let appFixture: AppFixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/_index.jsx": js` import { json } from "@remix-run/node"; diff --git a/integration/resource-routes-test.ts b/integration/resource-routes-test.ts index 7a662245550..52bb0b97481 100644 --- a/integration/resource-routes-test.ts +++ b/integration/resource-routes-test.ts @@ -13,7 +13,6 @@ test.describe("loader in an app", async () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/_index.jsx": js` import { Form, Link } from "@remix-run/react"; diff --git a/integration/revalidate-test.ts b/integration/revalidate-test.ts index 00ed60ca619..58690e753f4 100644 --- a/integration/revalidate-test.ts +++ b/integration/revalidate-test.ts @@ -10,9 +10,6 @@ test.describe("Revalidation", () => { test.beforeAll(async () => { appFixture = await createAppFixture( await createFixture({ - future: { - v2_routeConvention: true, - }, files: { "app/root.jsx": js` import { Link, Outlet, Scripts, useNavigation } from "@remix-run/react"; diff --git a/integration/scroll-test.ts b/integration/scroll-test.ts index 534476fd01d..ba2ead7397d 100644 --- a/integration/scroll-test.ts +++ b/integration/scroll-test.ts @@ -9,7 +9,6 @@ let appFixture: AppFixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/_index.jsx": js` import { redirect } from "@remix-run/node"; diff --git a/integration/server-code-in-browser-message-test.ts b/integration/server-code-in-browser-message-test.ts index ee58bdae575..fafc6bfcb4e 100644 --- a/integration/server-code-in-browser-message-test.ts +++ b/integration/server-code-in-browser-message-test.ts @@ -14,7 +14,6 @@ let appFixture: AppFixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "node_modules/has-side-effects/package.json": json({ name: "has-side-effects", diff --git a/integration/server-entry-test.ts b/integration/server-entry-test.ts index 32be4580a36..d0fc0a0c3e7 100644 --- a/integration/server-entry-test.ts +++ b/integration/server-entry-test.ts @@ -11,7 +11,6 @@ test.describe("Server Entry", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/entry.server.jsx": js` export default function handleRequest() { diff --git a/integration/server-source-maps-test.ts b/integration/server-source-maps-test.ts index ca4e61ad193..d4a5f3d72e5 100644 --- a/integration/server-source-maps-test.ts +++ b/integration/server-source-maps-test.ts @@ -9,7 +9,6 @@ let fixture: Fixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, sourcemap: true, files: { "app/routes/_index.jsx": js` diff --git a/integration/set-cookie-revalidation-test.ts b/integration/set-cookie-revalidation-test.ts index bf49d2945f0..f4b86c88b38 100644 --- a/integration/set-cookie-revalidation-test.ts +++ b/integration/set-cookie-revalidation-test.ts @@ -11,7 +11,6 @@ let BANNER_MESSAGE = "you do not have permission to view /protected"; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/session.server.js": js` import { createCookieSessionStorage } from "@remix-run/node"; diff --git a/integration/shared-route-imports-test.ts b/integration/shared-route-imports-test.ts index e6a0540fc66..0de8bf83311 100644 --- a/integration/shared-route-imports-test.ts +++ b/integration/shared-route-imports-test.ts @@ -9,7 +9,6 @@ let appFixture: AppFixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/parent.jsx": js` import { createContext, useContext } from "react"; diff --git a/integration/splat-routes-test.ts b/integration/splat-routes-test.ts index 0a15ae5e68b..ae54f277443 100644 --- a/integration/splat-routes-test.ts +++ b/integration/splat-routes-test.ts @@ -16,7 +16,6 @@ test.describe("rendering", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; diff --git a/integration/tailwind-test.ts b/integration/tailwind-test.ts index cc0ee7dd2e4..ffad1972cc8 100644 --- a/integration/tailwind-test.ts +++ b/integration/tailwind-test.ts @@ -18,7 +18,6 @@ test.describe("Tailwind", () => { test.beforeAll(async () => { fixture = await createFixture({ future: { - v2_routeConvention: true, // Enable all CSS future flags to // ensure features don't clash unstable_cssSideEffectImports: true, diff --git a/integration/transition-test.ts b/integration/transition-test.ts index b73f41945e1..bc3844a93cc 100644 --- a/integration/transition-test.ts +++ b/integration/transition-test.ts @@ -19,7 +19,6 @@ test.describe("rendering", () => { test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/root.jsx": js` import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; diff --git a/integration/tsconfig-test.ts b/integration/tsconfig-test.ts index 5c079a1e752..5e617f7c071 100644 --- a/integration/tsconfig-test.ts +++ b/integration/tsconfig-test.ts @@ -45,7 +45,6 @@ const DEFAULT_CONFIG: SerializableTsConfigJson = { // https://github.com/dividab/tsconfig-paths/pull/208 test("should output default tsconfig if file is empty", async () => { let fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "tsconfig.json": json({ compilerOptions: { baseUrl: "." } }), }, @@ -65,7 +64,6 @@ test("should add/update mandatory config", async () => { }; delete config.compilerOptions.moduleResolution; // this is required by esbuild let fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "tsconfig.json": json(config) }, }); @@ -84,7 +82,6 @@ test("shouldn't change suggested config if set", async () => { }; let fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "tsconfig.json": json(config), }, @@ -105,7 +102,6 @@ test("shouldn't change suggested config for moduleResolution: bundler", async () }; let fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "tsconfig.json": json(config), }, @@ -128,7 +124,6 @@ test("allows for `extends` in tsconfig", async () => { }; let fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "tsconfig.json": json(config), "tsconfig.base.json": json(baseConfig), @@ -155,7 +150,6 @@ test("works with jsconfig", async () => { }; let fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "jsconfig.json": json(config), }, diff --git a/integration/upload-test.ts b/integration/upload-test.ts index 9c2e9be3a25..491f49b8f02 100644 --- a/integration/upload-test.ts +++ b/integration/upload-test.ts @@ -10,7 +10,6 @@ let appFixture: AppFixture; test.beforeAll(async () => { fixture = await createFixture({ - future: { v2_routeConvention: true }, files: { "app/routes/file-upload-handler.jsx": js` import { diff --git a/integration/vanilla-extract-test.ts b/integration/vanilla-extract-test.ts index 00ff6d73a6e..b3b0dd94b2d 100644 --- a/integration/vanilla-extract-test.ts +++ b/integration/vanilla-extract-test.ts @@ -20,7 +20,6 @@ test.describe("Vanilla Extract", () => { test.beforeAll(async () => { fixture = await createFixture({ future: { - v2_routeConvention: true, // Enable all CSS future flags to // ensure features don't clash unstable_cssSideEffectImports: true, @@ -71,7 +70,7 @@ test.describe("Vanilla Extract", () => { let typeScriptFixture = () => ({ "app/fixtures/typescript/styles.css.ts": js` import { style } from "@vanilla-extract/css"; - + export const root = style({ background: 'peachpuff', padding: ${JSON.stringify(TEST_PADDING_VALUE)} @@ -79,7 +78,7 @@ test.describe("Vanilla Extract", () => { `, "app/routes/typescript-test.jsx": js` import * as styles from "../fixtures/typescript/styles.css"; - + export default function() { return (
@@ -102,7 +101,7 @@ test.describe("Vanilla Extract", () => { let javaScriptFixture = () => ({ "app/fixtures/javascript/styles.css.js": js` import { style } from "@vanilla-extract/css"; - + export const root = style({ background: 'peachpuff', padding: ${JSON.stringify(TEST_PADDING_VALUE)} @@ -110,7 +109,7 @@ test.describe("Vanilla Extract", () => { `, "app/routes/javascript-test.jsx": js` import * as styles from "../fixtures/javascript/styles.css"; - + export default function() { return (
@@ -134,7 +133,7 @@ test.describe("Vanilla Extract", () => { "app/fixtures/class-composition/styles.css.ts": js` import { style } from "@vanilla-extract/css"; import { padding } from "./padding.css"; - + export const root = style([ padding, { background: 'peachpuff' }, @@ -142,14 +141,14 @@ test.describe("Vanilla Extract", () => { `, "app/fixtures/class-composition/padding.css.ts": js` import { style } from "@vanilla-extract/css"; - + export const padding = style({ padding: ${JSON.stringify(TEST_PADDING_VALUE)} }); `, "app/routes/class-composition-test.jsx": js` import * as styles from "../fixtures/class-composition/styles.css"; - + export default function() { return (
@@ -173,7 +172,7 @@ test.describe("Vanilla Extract", () => { "app/fixtures/root-relative-class-composition/styles.css.ts": js` import { style } from "@vanilla-extract/css"; import { padding } from "~/fixtures/root-relative-class-composition/padding.css"; - + export const root = style([ padding, { background: 'peachpuff' }, @@ -181,14 +180,14 @@ test.describe("Vanilla Extract", () => { `, "app/fixtures/root-relative-class-composition/padding.css.ts": js` import { style } from "@vanilla-extract/css"; - + export const padding = style({ padding: ${JSON.stringify(TEST_PADDING_VALUE)} }); `, "app/routes/root-relative-class-composition-test.jsx": js` import * as styles from "../fixtures/root-relative-class-composition/styles.css"; - + export default function() { return (
@@ -213,14 +212,14 @@ test.describe("Vanilla Extract", () => { let sideEffectImportsFixture = () => ({ "app/fixtures/side-effect-imports/styles.css.ts": js` import { globalStyle } from "@vanilla-extract/css"; - + globalStyle(".side-effect-imports", { padding: ${JSON.stringify(TEST_PADDING_VALUE)} }); `, "app/routes/side-effect-imports-test.jsx": js` import "../fixtures/side-effect-imports/styles.css"; - + export default function() { return (
@@ -246,14 +245,14 @@ test.describe("Vanilla Extract", () => { `, "app/fixtures/side-effect-imports-within-child-compilation/nested-side-effect.css.ts": js` import { globalStyle } from "@vanilla-extract/css"; - + globalStyle(".side-effect-imports-within-child-compilation", { padding: ${JSON.stringify(TEST_PADDING_VALUE)} }); `, "app/routes/side-effect-imports-within-child-compilation-test.jsx": js` import "../fixtures/side-effect-imports-within-child-compilation/styles.css"; - + export default function() { return (
@@ -279,18 +278,18 @@ test.describe("Vanilla Extract", () => { "app/fixtures/stable-identifiers/styles_a.css.ts": js` import { style } from "@vanilla-extract/css"; import { shared } from "./shared.css"; - + export const root = shared; `, "app/fixtures/stable-identifiers/styles_b.css.ts": js` import { style } from "@vanilla-extract/css"; import { shared } from "./shared.css"; - + export const root = shared; `, "app/fixtures/stable-identifiers/shared.css.ts": js` import { style } from "@vanilla-extract/css"; - + export const shared = style({ padding: ${JSON.stringify(TEST_PADDING_VALUE)}, background: 'peachpuff', @@ -299,9 +298,9 @@ test.describe("Vanilla Extract", () => { "app/routes/stable-identifiers-test.jsx": js` import * as styles_a from "../fixtures/stable-identifiers/styles_a.css"; import * as styles_b from "../fixtures/stable-identifiers/styles_b.css"; - + const styles = new Set([styles_a.root, styles_b.root]); - + export default function() { return (
@@ -330,7 +329,7 @@ test.describe("Vanilla Extract", () => { let imageUrlsViaCssUrlFixture = () => ({ "app/fixtures/imageUrlsViaCssUrl/styles.css.ts": js` import { style } from "@vanilla-extract/css"; - + export const root = style({ backgroundColor: 'peachpuff', backgroundImage: 'url("./image.svg")', @@ -344,7 +343,7 @@ test.describe("Vanilla Extract", () => { `, "app/routes/image-urls-via-css-url-test.jsx": js` import * as styles from "../fixtures/imageUrlsViaCssUrl/styles.css"; - + export default function() { return (
@@ -374,7 +373,7 @@ test.describe("Vanilla Extract", () => { let imageUrlsViaRootRelativeCssUrlFixture = () => ({ "app/fixtures/imageUrlsViaRootRelativeCssUrl/styles.css.ts": js` import { style } from "@vanilla-extract/css"; - + export const root = style({ backgroundColor: 'peachpuff', backgroundImage: 'url("~/fixtures/imageUrlsViaRootRelativeCssUrl/image.svg")', @@ -388,7 +387,7 @@ test.describe("Vanilla Extract", () => { `, "app/routes/image-urls-via-root-relative-css-url-test.jsx": js` import * as styles from "../fixtures/imageUrlsViaRootRelativeCssUrl/styles.css"; - + export default function() { return (
@@ -419,7 +418,7 @@ test.describe("Vanilla Extract", () => { "app/fixtures/imageUrlsViaJsImport/styles.css.ts": js` import { style } from "@vanilla-extract/css"; import href from "./image.svg"; - + export const root = style({ backgroundColor: 'peachpuff', backgroundImage: 'url(' + href + ')', @@ -433,7 +432,7 @@ test.describe("Vanilla Extract", () => { `, "app/routes/image-urls-via-js-import-test.jsx": js` import * as styles from "../fixtures/imageUrlsViaJsImport/styles.css"; - + export default function() { return (
@@ -464,7 +463,7 @@ test.describe("Vanilla Extract", () => { "app/fixtures/imageUrlsViaRootRelativeJsImport/styles.css.ts": js` import { style } from "@vanilla-extract/css"; import href from "~/fixtures/imageUrlsViaRootRelativeJsImport/image.svg"; - + export const root = style({ backgroundColor: 'peachpuff', backgroundImage: 'url(' + href + ')', @@ -478,7 +477,7 @@ test.describe("Vanilla Extract", () => { `, "app/routes/image-urls-via-root-relative-js-import-test.jsx": js` import * as styles from "../fixtures/imageUrlsViaRootRelativeJsImport/styles.css"; - + export default function() { return (
@@ -509,7 +508,7 @@ test.describe("Vanilla Extract", () => { "app/fixtures/imageUrlsViaClassComposition/styles.css.ts": js` import { style } from "@vanilla-extract/css"; import { backgroundImage } from "./nested/backgroundImage.css"; - + export const root = style([ backgroundImage, { @@ -520,7 +519,7 @@ test.describe("Vanilla Extract", () => { `, "app/fixtures/imageUrlsViaClassComposition/nested/backgroundImage.css.ts": js` import { style } from "@vanilla-extract/css"; - + export const backgroundImage = style({ backgroundImage: 'url(../image.svg)', }); @@ -532,7 +531,7 @@ test.describe("Vanilla Extract", () => { `, "app/routes/image-urls-via-class-composition-test.jsx": js` import * as styles from "../fixtures/imageUrlsViaClassComposition/styles.css"; - + export default function() { return (
@@ -563,7 +562,7 @@ test.describe("Vanilla Extract", () => { "app/fixtures/imageUrlsViaJsImportClassComposition/styles.css.ts": js` import { style } from "@vanilla-extract/css"; import { backgroundImage } from "./nested/backgroundImage.css"; - + export const root = style([ backgroundImage, { @@ -575,7 +574,7 @@ test.describe("Vanilla Extract", () => { "app/fixtures/imageUrlsViaJsImportClassComposition/nested/backgroundImage.css.ts": js` import { style } from "@vanilla-extract/css"; import href from "../image.svg"; - + export const backgroundImage = style({ backgroundImage: 'url(' + href + ')', }); @@ -587,7 +586,7 @@ test.describe("Vanilla Extract", () => { `, "app/routes/image-urls-via-js-import-class-composition-test.jsx": js` import * as styles from "../fixtures/imageUrlsViaJsImportClassComposition/styles.css"; - + export default function() { return (
diff --git a/packages/remix-dev/__tests__/create-test.ts b/packages/remix-dev/__tests__/create-test.ts index 4508ac91907..4a0fbed9768 100644 --- a/packages/remix-dev/__tests__/create-test.ts +++ b/packages/remix-dev/__tests__/create-test.ts @@ -8,7 +8,6 @@ import stripAnsi from "strip-ansi"; import { run } from "../cli/run"; import { server } from "./msw"; -import { flatRoutesWarning } from "../config"; beforeAll(() => server.listen({ onUnhandledRequest: "error" })); afterAll(() => server.close()); @@ -348,9 +347,7 @@ describe("the create command", () => { "--no-typescript", ]); expect(output.trim()).toBe( - flatRoutesWarning + - "\n\n" + - getOptOutOfInstallMessage() + + getOptOutOfInstallMessage() + "\n\n" + getSuccessMessage(path.join("", "template-to-js")) );