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

keep devTool warning #11027

Merged
merged 4 commits into from
Jul 5, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cool-dogs-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@apollo/client': patch
---

Prevents the DevTool installation warning to be turned into a documentation link.
4 changes: 2 additions & 2 deletions .size-limit.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const checks = [
{
path: "dist/apollo-client.min.cjs",
limit: "37750"
limit: "37731"
},
{
path: "dist/main.cjs",
Expand All @@ -10,7 +10,7 @@ const checks = [
{
path: "dist/index.js",
import: "{ ApolloClient, InMemoryCache, HttpLink }",
limit: "33375"
limit: "33389"
},
...[
"ApolloProvider",
Expand Down
8 changes: 7 additions & 1 deletion config/processInvariants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ function getErrorCode(
extractString(file, target, message.alternate, condition)
);
} else if (isStringOnly(message)) {

const messageText = reprint(message);
if (messageText.includes('Apollo DevTools')) {
return message;
}

const obj = b.objectExpression([]);
const numLit = b.numericLiteral(nextErrorCode++);
target.push(b.property('init', numLit, obj));
Expand Down Expand Up @@ -113,7 +119,7 @@ function getErrorCode(
throw new Error(`invariant minification error: node cannot have dynamical error argument!
file: ${posix.join(distDir, file)}:${expr.loc?.start.line}
code:

${reprint(message)}
`);
}
Expand Down