Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@urql/exchange-auth

Package Overview
Dependencies
Maintainers
31
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@urql/exchange-auth - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

13

CHANGELOG.md
# Changelog
## 0.1.2
### Patch Changes
- Deprecate the `Operation.operationName` property in favor of `Operation.kind`. This name was
previously confusing as `operationName` was effectively referring to two different things. You can
safely upgrade to this new version, however to mute all deprecation warnings you will have to
**upgrade** all `urql` packages you use. If you have custom exchanges that spread operations, please
use [the new `makeOperation` helper
function](https://formidable.com/open-source/urql/docs/api/core/#makeoperation) instead, by [@bkonkle](https://github.com/bkonkle) (See [#1045](https://github.com/FormidableLabs/urql/pull/1045))
- Updated dependencies (See [#1094](https://github.com/FormidableLabs/urql/pull/1094) and [#1045](https://github.com/FormidableLabs/urql/pull/1045))
- @urql/core@1.14.0
## 0.1.1

@@ -4,0 +17,0 @@

14

dist/urql-exchange-auth.js

@@ -17,15 +17,13 @@ "use strict";

function _ref2(a) {
return "teardown" === a.operationName;
return "teardown" === a.kind;
}
function _ref3(a) {
return "teardown" !== a.operationName;
return "teardown" !== a.kind;
}
var wonka = require("wonka"), core = require("@urql/core"), addAuthAttemptToOperation = function(a, b) {
return _extends({}, a, {
context: _extends({}, a.context, {
authAttempt: b
})
});
return core.makeOperation(a.kind, a, _extends({}, a.context, {
authAttempt: b
}));
};

@@ -89,3 +87,3 @@

var b = wonka.filter((function(b) {
return "teardown" === b.operationName && b.key === a.key;
return "teardown" === b.kind && b.key === a.key;
}))(k);

@@ -92,0 +90,0 @@ return wonka.takeUntil(b)(wonka.map((function() {

{
"name": "@urql/exchange-auth",
"version": "0.1.1",
"version": "0.1.2",
"description": "An exchange for managing authentication and token refresh in urql",

@@ -54,3 +54,3 @@ "sideEffects": false,

"dependencies": {
"@urql/core": ">=1.12.0",
"@urql/core": ">=1.14.0",
"wonka": "^4.0.14"

@@ -62,3 +62,3 @@ },

"devDependencies": {
"graphql": "^15.1.0",
"graphql": "^15.4.0",
"graphql-tag": "^2.10.1"

@@ -65,0 +65,0 @@ },

@@ -21,2 +21,3 @@ <h2 align="center">@urql/exchange-auth</h2>

import { createClient, dedupExchange, cacheExchange, fetchExchange } from 'urql';
import { makeOperation } from '@urql/core';
import { authExchange } from '@urql/exchange-auth';

@@ -45,5 +46,6 @@

return {
...operation,
context: {
return makeOperation(
operation.kind,
operation,
{
...operation.context,

@@ -58,3 +60,3 @@ fetchOptions: {

},
};
);
},

@@ -61,0 +63,0 @@ willAuthError: ({ authState }) => {

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