New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

next-urql

Package Overview
Dependencies
Maintainers
32
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-urql - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0

20

CHANGELOG.md
# Changelog
## 2.0.0
This release moves `urql` from being in `dependencies` to `peerDependencies`. Please install it
explicitly, as you may have already in the past, and ensure that both `urql` and `@urql/core` are
not duplicated with either `npm dedupe` or `npx yarn-deduplicate`.
```sh
npm i --save urql
# or
yarn add urql
```
### Major Changes
- Move the `urql` dependency to a peer dependency.
- Remove the automatic polyfilling of `fetch` since this is done automatically starting at
[`Next v9.4`](https://nextjs.org/blog/next-9-4#improved-built-in-fetch-support)
If you are using a version before 9.4 you can upgrade by installing [`isomorphic-unfetch`](https://www.npmjs.com/package/isomorphic-unfetch)
and importing it to polyfill the behavior, by [@JoviDeCroock](https://github.com/JoviDeCroock) (See [#1018](https://github.com/FormidableLabs/urql/pull/1018))
## 1.2.0

@@ -4,0 +24,0 @@

1

dist/types/init-urql-client.d.ts
import { Client, ClientOptions } from 'urql';
import 'isomorphic-unfetch';
export declare function resetClient(): void;
export declare function initUrqlClient(clientOptions: ClientOptions, canEnableSuspense: boolean): Client | null;
{
"name": "next-urql",
"version": "1.2.0",
"version": "2.0.0",
"description": "Convenience wrappers for using urql with NextJS.",

@@ -46,3 +46,2 @@ "sideEffects": false,

"graphql-tag": "^2.10.3",
"isomorphic-unfetch": "^3.0.0",
"next": "^9.2.1",

@@ -54,9 +53,8 @@ "react": "^16.13.0",

"dependencies": {
"react-ssr-prepass": "^1.2.1",
"urql": ">=1.10.0"
"react-ssr-prepass": "^1.2.1"
},
"peerDependencies": {
"isomorphic-unfetch": "^3.0.0",
"react": ">=16.8.0"
"react": ">=16.8.0",
"urql": "^1.10.0"
}
}

@@ -28,3 +28,5 @@ <div align="center">

```sh
npm install --save next-urql urql react-is isomorphic-unfetch
yarn add next-urql react-is urql
# or
npm install --save next-urql react-is urql
```

@@ -34,2 +36,5 @@

Note that if you are using Next before v9.4 you'll need to polyfill fetch, this can be
done through [`isomorphic-unfetch`](https://www.npmjs.com/package/isomorphic-unfetch).
### Usage

@@ -252,5 +257,5 @@

When you are using `getStaticProps`, `getServerSideProps`, or `getStaticPaths`, you should opt-out of `Suspense` by setting the `neverSuspend` option to `true` in your `withUrqlClient` configuration.
When you are using `getStaticProps`, `getServerSideProps`, or `getStaticPaths`, you should opt-out of `Suspense` by setting the `neverSuspend` option to `true` in your `withUrqlClient` configuration.
your `withUrqlClient`.
During the prepass of your component tree `next-urql` can't know how these functions will alter the props passed to your page component. This injection
could change the `variables` used in your `useQuery`. This will lead to error being thrown during the subsequent `toString` pass, which isn't supported in React 16.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc