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

Revert "chore: use isbot version 4" #8414

Merged
merged 1 commit into from
Jan 2, 2024
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
5 changes: 0 additions & 5 deletions .changeset/cool-doors-compete.md

This file was deleted.

1 change: 0 additions & 1 deletion contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@
- fergusmeiklejohn
- fernandojbf
- fgiuliani
- fifi98
- fishel-feng
- francisudeji
- frandiox
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/migrating-react-router-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import type {
} from "@remix-run/node";
import { createReadableStreamFromReadable } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToPipeableStream } from "react-dom/server";

const ABORT_DELAY = 5_000;
Expand All @@ -66,7 +66,7 @@ export default function handleRequest(
remixContext: EntryContext,
loadContext: AppLoadContext
) {
return isbot(request.headers.get("user-agent") || "")
return isbot(request.headers.get("user-agent"))
? handleBotRequest(
request,
responseStatusCode,
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The Remix compiler will not do any type checking (it simply removes the types).
"@remix-run/node": "latest",
"@remix-run/react": "latest",
"@remix-run/serve": "latest",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/start/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ Remix v2 also no longer exports these polyfilled implementations from `@remix-ru
- import { Response } from "@remix-run/node"; // or cloudflare/deno
+ import { createReadableStreamFromReadable } from "@remix-run/node"; // or cloudflare/deno
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToPipeableStream } from "react-dom/server";

const ABORT_DELAY = 5_000;
Expand Down
4 changes: 2 additions & 2 deletions integration/defer-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ test.describe("aborted", () => {
import type { AppLoadContext, EntryContext } from "@remix-run/node";
import { createReadableStreamFromReadable } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToPipeableStream } from "react-dom/server";

const ABORT_DELAY = 1;
Expand All @@ -997,7 +997,7 @@ test.describe("aborted", () => {
remixContext: EntryContext,
loadContext: AppLoadContext
) {
return isbot(request.headers.get("user-agent") || "")
return isbot(request.headers.get("user-agent"))
? handleBotRequest(
request,
responseStatusCode,
Expand Down
2 changes: 1 addition & 1 deletion integration/helpers/vite-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@remix-run/node": "*",
"@remix-run/react": "*",
"@remix-run/serve": "*",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"get-port": "^5.1.1",
"glob": "8.0.3",
"globby": "^11.1.0",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"npm-run-all": "^4.1.5",
"pidtree": "^0.6.0",
"postcss": "^8.4.19",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@remix-run/cloudflare-pages": "*",
"@remix-run/css-bundle": "*",
"@remix-run/react": "*",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@remix-run/dev/server-build": "https://esm.sh/@remix-run/dev@1.16.0/server-build",
"@remix-run/react": "https://esm.sh/@remix-run/react@1.16.0",
"@remix-run/server-runtime": "https://esm.sh/@remix-run/server-runtime@1.16.0",
"isbot": "https://esm.sh/isbot@^4.1.0",
"isbot": "https://esm.sh/isbot@^3.6.8",
"react": "https://esm.sh/react@^18.2.0",
"react-dom": "https://esm.sh/react-dom@^18.2.0",
"react-dom/client": "https://esm.sh/react-dom@^18.2.0/client",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/__tests__/fixtures/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@remix-run/css-bundle": "*",
"@remix-run/deno": "*",
"@remix-run/react": "*",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/__tests__/fixtures/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@remix-run/node": "*",
"@remix-run/react": "*",
"@remix-run/serve": "*",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ export async function resolveConfig(
pkgJson.update({
dependencies: {
...pkgJson.content.dependencies,
isbot: "^4",
isbot: "latest",
},
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AppLoadContext, EntryContext } from "@remix-run/cloudflare";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToReadableStream } from "react-dom/server";

export default async function handleRequest(
Expand All @@ -22,7 +22,7 @@ export default async function handleRequest(
}
);

if (isbot(request.headers.get("user-agent") || "")) {
if (isbot(request.headers.get("user-agent"))) {
await body.allReady;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-dev/config/defaults/entry.server.deno.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AppLoadContext, EntryContext } from "@remix-run/deno";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToReadableStream } from "react-dom/server";

export default async function handleRequest(
Expand All @@ -22,7 +22,7 @@ export default async function handleRequest(
}
);

if (isbot(request.headers.get("user-agent") || "")) {
if (isbot(request.headers.get("user-agent"))) {
await body.allReady;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-dev/config/defaults/entry.server.node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PassThrough } from "node:stream";
import type { AppLoadContext, EntryContext } from "@remix-run/node";
import { createReadableStreamFromReadable } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToPipeableStream } from "react-dom/server";

const ABORT_DELAY = 5_000;
Expand All @@ -15,7 +15,7 @@ export default function handleRequest(
remixContext: EntryContext,
loadContext: AppLoadContext
) {
return isbot(request.headers.get("user-agent") || "")
return isbot(request.headers.get("user-agent"))
? handleBotRequest(
request,
responseStatusCode,
Expand Down
4 changes: 2 additions & 2 deletions scripts/playground/template/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PassThrough } from "node:stream";
import type { AppLoadContext, EntryContext } from "@remix-run/node";
import { createReadableStreamFromReadable } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToPipeableStream } from "react-dom/server";

const ABORT_DELAY = 5000;
Expand All @@ -14,7 +14,7 @@ export default function handleRequest(
remixContext: EntryContext,
loadContext: AppLoadContext
) {
let callbackName = isbot(request.headers.get("user-agent") || "")
let callbackName = isbot(request.headers.get("user-agent"))
? "onAllReady"
: "onShellReady";

Expand Down
2 changes: 1 addition & 1 deletion scripts/playground/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"bcryptjs": "^2.4.3",
"express": "^4.18.1",
"get-port": "^6.1.2",
"isbot": "^4.1.0",
"isbot": "^3.5.1",
"morgan": "^1.10.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions templates/arc/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { PassThrough } from "node:stream";
import type { AppLoadContext, EntryContext } from "@remix-run/node";
import { createReadableStreamFromReadable } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToPipeableStream } from "react-dom/server";

const ABORT_DELAY = 5_000;
Expand All @@ -24,7 +24,7 @@ export default function handleRequest(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
loadContext: AppLoadContext
) {
return isbot(request.headers.get("user-agent") || "")
return isbot(request.headers.get("user-agent"))
? handleBotRequest(
request,
responseStatusCode,
Expand Down
2 changes: 1 addition & 1 deletion templates/arc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@remix-run/node": "*",
"@remix-run/react": "*",
"cross-env": "^7.0.3",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"source-map-support": "^0.5.21"
Expand Down
4 changes: 2 additions & 2 deletions templates/cloudflare-pages/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import type { AppLoadContext, EntryContext } from "@remix-run/cloudflare";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToReadableStream } from "react-dom/server";

export default async function handleRequest(
Expand All @@ -31,7 +31,7 @@ export default async function handleRequest(
}
);

if (isbot(request.headers.get("user-agent") || "")) {
if (isbot(request.headers.get("user-agent"))) {
await body.allReady;
}

Expand Down
2 changes: 1 addition & 1 deletion templates/cloudflare-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@remix-run/cloudflare-pages": "*",
"@remix-run/css-bundle": "*",
"@remix-run/react": "*",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions templates/cloudflare-workers/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import type { AppLoadContext, EntryContext } from "@remix-run/cloudflare";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToReadableStream } from "react-dom/server";

export default async function handleRequest(
Expand All @@ -31,7 +31,7 @@ export default async function handleRequest(
}
);

if (isbot(request.headers.get("user-agent") || "")) {
if (isbot(request.headers.get("user-agent"))) {
await body.allReady;
}

Expand Down
2 changes: 1 addition & 1 deletion templates/cloudflare-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@remix-run/cloudflare": "*",
"@remix-run/css-bundle": "*",
"@remix-run/react": "*",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion templates/deno/.vscode/resolve_npm_imports.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@remix-run/dev/server-build": "https://esm.sh/@remix-run/dev@1.16.0/server-build",
"@remix-run/react": "https://esm.sh/@remix-run/react@1.16.0",
"@remix-run/server-runtime": "https://esm.sh/@remix-run/server-runtime@1.16.0",
"isbot": "https://esm.sh/isbot@^4.1.0",
"isbot": "https://esm.sh/isbot@^3.6.8",
"react": "https://esm.sh/react@^18.2.0",
"react-dom": "https://esm.sh/react-dom@^18.2.0",
"react-dom/client": "https://esm.sh/react-dom@^18.2.0/client",
Expand Down
4 changes: 2 additions & 2 deletions templates/deno/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import type { AppLoadContext, EntryContext } from "@remix-run/deno";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToReadableStream } from "react-dom/server";

export default async function handleRequest(
Expand All @@ -31,7 +31,7 @@ export default async function handleRequest(
},
);

if (isbot(request.headers.get("user-agent") || "")) {
if (isbot(request.headers.get("user-agent"))) {
await body.allReady;
}

Expand Down
2 changes: 1 addition & 1 deletion templates/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@remix-run/css-bundle": "*",
"@remix-run/deno": "*",
"@remix-run/react": "*",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions templates/express/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { PassThrough } from "node:stream";
import type { AppLoadContext, EntryContext } from "@remix-run/node";
import { createReadableStreamFromReadable } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToPipeableStream } from "react-dom/server";

const ABORT_DELAY = 5_000;
Expand All @@ -24,7 +24,7 @@ export default function handleRequest(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
loadContext: AppLoadContext
) {
return isbot(request.headers.get("user-agent") || "")
return isbot(request.headers.get("user-agent"))
? handleBotRequest(
request,
responseStatusCode,
Expand Down
2 changes: 1 addition & 1 deletion templates/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"compression": "^1.7.4",
"cross-env": "^7.0.3",
"express": "^4.18.2",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"morgan": "^1.10.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions templates/fly/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { PassThrough } from "node:stream";
import type { AppLoadContext, EntryContext } from "@remix-run/node";
import { createReadableStreamFromReadable } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToPipeableStream } from "react-dom/server";

const ABORT_DELAY = 5_000;
Expand All @@ -24,7 +24,7 @@ export default function handleRequest(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
loadContext: AppLoadContext
) {
return isbot(request.headers.get("user-agent") || "")
return isbot(request.headers.get("user-agent"))
? handleBotRequest(
request,
responseStatusCode,
Expand Down
2 changes: 1 addition & 1 deletion templates/fly/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@remix-run/node": "*",
"@remix-run/react": "*",
"@remix-run/serve": "*",
"isbot": "^4.1.0",
"isbot": "^3.6.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions templates/remix-javascript/app/entry.server.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { PassThrough } from "node:stream";

import { createReadableStreamFromReadable } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import isbot from "isbot";
import { renderToPipeableStream } from "react-dom/server";

const ABORT_DELAY = 5_000;
Expand All @@ -19,7 +19,7 @@ export default function handleRequest(
responseHeaders,
remixContext
) {
return isbot(request.headers.get("user-agent") || "")
return isbot(request.headers.get("user-agent"))
? handleBotRequest(
request,
responseStatusCode,
Expand Down
Loading