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

Release 3.5.0 #8554

Merged
merged 227 commits into from
Nov 8, 2021
Merged

Release 3.5.0 #8554

merged 227 commits into from
Nov 8, 2021

Conversation

benjamn
Copy link
Member

@benjamn benjamn commented Jul 28, 2021

Like the Release 3.4.0 PR, this PR will serve to collect significant new features, deprecation warnings, and minor breaking changes that we intend to release in @apollo/client@3.5.0.

If you want to test these changes, run

npm i @apollo/client@3.5.0-beta.n

in your application, where the n in -beta.n comes from the most recent commit message like

Bump @apollo/client npm version to 3.5.0-beta.n.

Until v3.5.0 is released, we can continue merging smaller changes into main and releasing them, without worrying about larger changes on the release-3.5 branch.

bennypowers and others added 5 commits July 28, 2021 13:51
Consider trying to load `@apollo/client/core` in node.js

```bash
node -v # 16.3.0
```
```js
// server/index.js
import { ApolloClient } from '@apollo/client/core';
```
> import { ApolloClient, InMemoryCache } from '@apollo/client/core/index.js';
>          ^^^^^^^^^^^^
> SyntaxError: Named export 'ApolloClient' not found. The requested module '@apollo/client/core/index.js' is a CommonJS module, which may not support all module.exports as named exports.
> CommonJS modules can always be imported via the default export, for example using:

```js
import AC from '@apollo/client/core';
const { ApolloClient } = AC;
```
> (node:35704) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
> (Use `node --trace-warnings ...` to show where the warning was created)
> /path/to/node_modules/@apollo/client/core/index.js:1
> export { ApolloClient, mergeOptions, } from "./ApolloClient.js";
> ^^^^^^
>
> SyntaxError: Unexpected token 'export'

adding `"type": "module"` to core will solve those errors nicely
For example, this rewrites the import from "ts-invariant/process" in
@apollo/client/utilities/globals/graphql.js to instead import from
"ts-invariant/process/index.js, so Node.js won't complain about the
directory import (even though ts-invariant/process/package.json exists).
Add `"type": "module"` to `@apollo/client/**/package.json` (all entry points).
This will allow us to release the changes from PR #8558 in a beta
release before merging them to main and publishing v3.4.1.
The root package.json file was neglected in #8396, since it isn't
generated in the same way as the other (nested) package.json files.

This commit puts `"type": "module"` in the _published_
`@apollo/client/package.json` file, which is generated at build time as
the file `dist/package.json`. The root `package.json` file that's
checked into the repository does _not_ contain `"type": "module"` (even
though putting it there would also put it in `dist/package.json`).
Attempting to enable ES module syntax at that level interfered pretty
severely with tools like ts-node, which we use to run various
config/*.ts scripts. Rewriting those scripts is a job for another time.

I'm happy to revisit this as the ecosystem progresses.
@hwillson hwillson added 2021-08 and removed 2021-07 labels Aug 3, 2021
benjamn and others added 23 commits November 3, 2021 15:15
…using-StoreObject-in-processSelectionSet

Identify written results using processed `StoreObject` in `StoreWriter#processSelectionSet`
…to-v27

Update Jest-related dependencies to latest version (v27) to address `npm audit` problems
Our docs `typedoc` version has fallen behind and has recently
started throwing `Maximum call stack size exceeded` errors when
trying to generate types via `npm run types`. This was likely caused
by a recent `typescript` update (e.g. #8926), but regardless updating
to a current version of `typedoc` fixes the issue. Note that the
`typedoc` `--ignoreCompilerErrors` option was removed in version 0.20, so
this commit also removes it from the docs scripts.
@hwillson hwillson self-requested a review November 8, 2021 20:54
Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

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

Full steam ahead! 👍 🎉

@hwillson hwillson merged commit b214dd1 into main Nov 8, 2021
@hwillson hwillson mentioned this pull request Nov 16, 2021
7 tasks
@apollographql apollographql locked as resolved and limited conversation to collaborators Feb 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants