Skip to content

Commit

Permalink
keep devTool warning (#11027)
Browse files Browse the repository at this point in the history
* keep devTool warning

* size-limit
  • Loading branch information
phryneas authored Jul 5, 2023
1 parent 5ed2cfd commit e47cfd0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
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

0 comments on commit e47cfd0

Please sign in to comment.