apollo-link-context
Advanced tools
Comparing version 1.0.12 to 1.0.13
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('apollo-link')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'apollo-link'], factory) : | ||
(factory((global.apolloLink = global.apolloLink || {}, global.apolloLink.context = {}),global.apolloLink.core)); | ||
}(this, (function (exports,apolloLink) { 'use strict'; | ||
(global = global || self, factory((global.apolloLink = global.apolloLink || {}, global.apolloLink.context = {}), global.apolloLink.core)); | ||
}(this, function (exports, apolloLink) { 'use strict'; | ||
var __rest = (undefined && undefined.__rest) || function (s, e) { | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
function __rest(s, e) { | ||
var t = {}; | ||
@@ -15,3 +30,4 @@ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
return t; | ||
}; | ||
} | ||
var setContext = function (setter) { | ||
@@ -45,3 +61,3 @@ return new apolloLink.ApolloLink(function (operation, forward) { | ||
}))); | ||
})); | ||
//# sourceMappingURL=bundle.umd.js.map |
import { ApolloLink, GraphQLRequest } from 'apollo-link'; | ||
export declare type ContextSetter = (operation: GraphQLRequest, prevContext: any) => Promise<any> | any; | ||
export declare const setContext: (setter: ContextSetter) => ApolloLink; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __rest = (this && this.__rest) || function (s, e) { | ||
@@ -10,7 +11,8 @@ var t = {}; | ||
}; | ||
import { ApolloLink, Observable, } from 'apollo-link'; | ||
export var setContext = function (setter) { | ||
return new ApolloLink(function (operation, forward) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var apollo_link_1 = require("apollo-link"); | ||
exports.setContext = function (setter) { | ||
return new apollo_link_1.ApolloLink(function (operation, forward) { | ||
var request = __rest(operation, []); | ||
return new Observable(function (observer) { | ||
return new apollo_link_1.Observable(function (observer) { | ||
var handle; | ||
@@ -17,0 +19,0 @@ Promise.resolve(request) |
{ | ||
"name": "apollo-link-context", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "An easy way to set and cache context changes for Apollo Link", | ||
"author": "James Baxley <james@meteor.com>", | ||
"license": "MIT", | ||
"main": "./lib/bundle.umd.js", | ||
"module": "./lib/index.js", | ||
"jsnext:main": "./lib/index.js", | ||
"main": "./lib/index.js", | ||
"module": "./lib/bundle.esm.js", | ||
"typings": "./lib/index.d.ts", | ||
@@ -21,3 +20,3 @@ "repository": { | ||
"build:browser": "browserify ./lib/bundle.umd.js -o=./lib/bundle.js --i apollo-link && npm run minify:browser", | ||
"build": "tsc -p .", | ||
"build": "tsc -p ./tsconfig.cjs.json", | ||
"bundle": "rollup -c", | ||
@@ -27,6 +26,7 @@ "clean": "rimraf lib/* && rimraf coverage/*", | ||
"filesize": "npm run build && npm run build:browser", | ||
"lint": "tslint --type-check -p tsconfig.json -c ../../tslint.json src/*.ts", | ||
"lint": "tslint -c \"../../tslint.json\" -p tsconfig.json -c ../../tslint.json src/*.ts", | ||
"minify:browser": "uglifyjs -c -m -o ./lib/bundle.min.js -- ./lib/bundle.js", | ||
"postbuild": "npm run bundle", | ||
"prebuild": "npm run clean", | ||
"prepare": "npm run lint && npm run build", | ||
"prepublishOnly": "npm run clean && npm run build", | ||
@@ -37,15 +37,15 @@ "test": "jest", | ||
"dependencies": { | ||
"apollo-link": "^1.2.6" | ||
"apollo-link": "^1.2.7" | ||
}, | ||
"devDependencies": { | ||
"@types/graphql": "14.0.3", | ||
"@types/graphql": "14.0.5", | ||
"@types/jest": "22.2.3", | ||
"browserify": "16.2.3", | ||
"graphql": "14.0.2", | ||
"graphql-tag": "2.10.0", | ||
"graphql": "14.1.1", | ||
"graphql-tag": "2.10.1", | ||
"jest": "22.4.4", | ||
"rimraf": "2.6.1", | ||
"rollup": "0.67.4", | ||
"rimraf": "2.6.3", | ||
"rollup": "0.68.2", | ||
"ts-jest": "22.4.6", | ||
"tslint": "5.11.0", | ||
"tslint": "5.12.1", | ||
"typescript": "3.0.3", | ||
@@ -65,5 +65,4 @@ "uglify-js": "3.4.9" | ||
], | ||
"mapCoverage": true, | ||
"testURL": "http://localhost" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
40159
20
144
0
1
Updatedapollo-link@^1.2.7