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

Build tooling 3/? - export conditions #12385

Draft
wants to merge 18 commits into
base: release-4.0
Choose a base branch
from
Draft

Conversation

phryneas
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Feb 20, 2025

🦋 Changeset detected

Latest commit: 6a31945

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo/client Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@svc-apollo-docs
Copy link

svc-apollo-docs commented Feb 20, 2025

⚠️ Docs preview not attached to branch

The preview was not built because the PR's base branch release-4.0 is not in the list of sources.

An Apollo team member can comment one of the following commands to dictate which branch to attach the preview to:

  • !docs set-base-branch version-2.6
  • !docs set-base-branch main

Build ID: 0cbbe30b5e425a4ea44a1603

Copy link

netlify bot commented Feb 20, 2025

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit 6a31945
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/67b76bcc50f7640008f6561a
😎 Deploy Preview https://deploy-preview-12385--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

pkg-pr-new bot commented Feb 20, 2025

npm i https://pkg.pr.new/@apollo/client@12385

commit: 6a31945

Copy link
Contributor

github-actions bot commented Feb 20, 2025

size-limit report 📦

Path Size
import { ApolloClient, InMemoryCache, HttpLink } from "dist/__cjs/index.cjs" 44.2 KB (+0.48% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/__cjs/index.cjs" (production) 44.2 KB (+6.49% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 32.84 KB (-0.53% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 32.31 KB (+5.82% 🔺)
import { ApolloProvider } from "dist/react/index.js" 1.15 KB (-1.43% 🔽)
import { ApolloProvider } from "dist/react/index.js" (production) 1.15 KB (+0.09% 🔺)
import { useQuery } from "dist/react/index.js" 3.91 KB (-14.64% 🔽)
import { useQuery } from "dist/react/index.js" (production) 3.87 KB (+3.37% 🔺)
import { useLazyQuery } from "dist/react/index.js" 4.29 KB (-13.5% 🔽)
import { useLazyQuery } from "dist/react/index.js" (production) 4.25 KB (+2.99% 🔺)
import { useMutation } from "dist/react/index.js" 2.63 KB (-20.32% 🔽)
import { useMutation } from "dist/react/index.js" (production) 2.62 KB (+0.61% 🔺)
import { useSubscription } from "dist/react/index.js" 3.49 KB (-16.38% 🔽)
import { useSubscription } from "dist/react/index.js" (production) 3.45 KB (+4.9% 🔺)
import { useSuspenseQuery } from "dist/react/index.js" 4.79 KB (-11.86% 🔽)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.77 KB (+13.18% 🔺)
import { useBackgroundQuery } from "dist/react/index.js" 4.27 KB (-13.2% 🔽)
import { useBackgroundQuery } from "dist/react/index.js" (production) 4.25 KB (+15.63% 🔺)
import { useLoadableQuery } from "dist/react/index.js" 4.34 KB (-12.84% 🔽)
import { useLoadableQuery } from "dist/react/index.js" (production) 4.31 KB (+15.44% 🔺)
import { useReadQuery } from "dist/react/index.js" 2.13 KB (-1.67% 🔽)
import { useReadQuery } from "dist/react/index.js" (production) 2.11 KB (+0.38% 🔺)
import { useFragment } from "dist/react/index.js" 1.85 KB (-1.31% 🔽)
import { useFragment } from "dist/react/index.js" (production) 1.83 KB (+0.49% 🔺)

@phryneas
Copy link
Member Author

There's still something going on with side-effects, we need to look into this - from running size-limit locally:


    dist/errors/index.js:1:7:
      1 │ import "../utilities/globals/index.js";
        ╵        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json" file:

    dist/package.json:20:2:
      20 │   "sideEffects": false,
         ╵   ~~~~~~~~~~~~~

▲ [WARNING] Ignoring this import because "dist/utilities/globals/index.js" was marked as having no side effects [ignored-bare-import]

    dist/cache/index.js:1:7:
      1 │ import "../utilities/globals/index.js";
        ╵        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json" file:

    dist/package.json:20:2:
      20 │   "sideEffects": false,
         ╵   ~~~~~~~~~~~~~

▲ [WARNING] Ignoring this import because "dist/utilities/globals/index.js" was marked as having no side effects [ignored-bare-import]

    dist/link/core/index.js:1:7:
      1 │ import "../../utilities/globals/index.js";
        ╵        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json" file:

    dist/package.json:20:2:
      20 │   "sideEffects": false,
         ╵   ~~~~~~~~~~~~~

▲ [WARNING] Ignoring this import because "dist/utilities/globals/index.js" was marked as having no side effects [ignored-bare-import]

    dist/link/http/index.js:1:7:
      1 │ import "../../utilities/globals/index.js";
        ╵        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json" file:

    dist/package.json:20:2:
      20 │   "sideEffects": false,
         ╵   ~~~~~~~~~~~~~

▲ [WARNING] Ignoring this import because "dist/utilities/globals/index.js" was marked as having no side effects [ignored-bare-import]

    dist/link/utils/index.js:1:7:
      1 │ import "../../utilities/globals/index.js";
        ╵        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json" file:

    dist/package.json:20:2:
      20 │   "sideEffects": false,
         ╵   ~~~~~~~~~~~~~

▲ [WARNING] Ignoring this import because "dist/cache/inmemory/fixPolyfills.js" was marked as having no side effects [ignored-bare-import]

    dist/cache/inmemory/inMemoryCache.js:4:7:
      4 │ import "./fixPolyfills.js";
        ╵        ~~~~~~~~~~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json" file:

    dist/package.json:20:2:
      20 │   "sideEffects": false,
         ╵   ~~~~~~~~~~~~~

▲ [WARNING] Ignoring this import because "dist/utilities/globals/index.js" was marked as having no side effects [ignored-bare-import]

    dist/react/index.js:1:7:
      1 │ import "../utilities/globals/index.js";
        ╵        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Comment on lines 4 to 7
// Make builtins like Map and Set safe to use with non-extensible objects.
// TODO: this needs to be removed for 4.0, so we really don't have side effects.
// that means we have to find an alternative means for the React Native fixes in there.
import "./fixPolyfills.js";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pointing this out as a TODO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants