Skip to content

Commit 575ec0e

Browse files
author
Guillaume Chau
committed
chore: v3.0.0-rc.1
1 parent 9901b63 commit 575ec0e

File tree

4 files changed

+124
-86
lines changed

4 files changed

+124
-86
lines changed

dist/vue-apollo.esm.js

+61-42
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ function () {
665665
} else if (error.networkError) {
666666
console.error("Error sending the ".concat(this.type, " '").concat(this.key, "'"), error.networkError);
667667
} else {
668-
console.error("[vue-apollo] An error has occured for ".concat(this.type, " '").concat(this.key, "'"));
668+
console.error("[vue-apollo] An error has occurred for ".concat(this.type, " '").concat(this.key, "'"));
669669

670670
if (Array.isArray(error)) {
671671
var _console;
@@ -1513,7 +1513,7 @@ function formatObjectValue(value, previouslySeenValues) {
15131513
if (value) {
15141514
var customInspectFn = getCustomFn(value);
15151515

1516-
if (customInspectFn) {
1516+
if (customInspectFn !== undefined) {
15171517
// $FlowFixMe(>=0.90.0)
15181518
var customValue = customInspectFn.call(value); // check for infinite recursion
15191519

@@ -1633,8 +1633,10 @@ classObject) {
16331633
*
16341634
*/
16351635
function invariant(condition, message) {
1636+
var booleanCondition = Boolean(condition);
16361637
/* istanbul ignore else */
1637-
if (!condition) {
1638+
1639+
if (!booleanCondition) {
16381640
throw new Error(message);
16391641
}
16401642
}
@@ -1872,14 +1874,14 @@ function lpad(len, str) {
18721874
return whitespace(len - str.length) + str;
18731875
}
18741876

1877+
function _typeof$2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
18751878
/**
1876-
* Copyright (c) Facebook, Inc. and its affiliates.
1877-
*
1878-
* This source code is licensed under the MIT license found in the
1879-
* LICENSE file in the root directory of this source tree.
1880-
*
1881-
*
1879+
* A GraphQLError describes an Error found during the parse, validate, or
1880+
* execute phases of performing a GraphQL operation. In addition to a message
1881+
* and stack trace, it also includes information about the locations in a
1882+
* GraphQL document and/or execution result that correspond to the Error.
18821883
*/
1884+
18831885
function GraphQLError( // eslint-disable-line no-redeclare
18841886
message, nodes, source, positions, path, originalError, extensions) {
18851887
// Compute list of blame nodes.
@@ -1925,7 +1927,15 @@ message, nodes, source, positions, path, originalError, extensions) {
19251927
}, []);
19261928
}
19271929

1928-
var _extensions = extensions || originalError && originalError.extensions;
1930+
var _extensions = extensions;
1931+
1932+
if (_extensions == null && originalError != null) {
1933+
var originalExtensions = originalError.extensions;
1934+
1935+
if (originalExtensions != null && _typeof$2(originalExtensions) === 'object') {
1936+
_extensions = originalExtensions;
1937+
}
1938+
}
19291939

19301940
Object.defineProperties(this, {
19311941
message: {
@@ -2070,24 +2080,11 @@ function dedentBlockStringValue(rawString) {
20702080
// Expand a block string's raw value into independent lines.
20712081
var lines = rawString.split(/\r\n|[\n\r]/g); // Remove common indentation from all lines but first.
20722082

2073-
var commonIndent = null;
2074-
2075-
for (var i = 1; i < lines.length; i++) {
2076-
var line = lines[i];
2077-
var indent = leadingWhitespace(line);
2078-
2079-
if (indent < line.length && (commonIndent === null || indent < commonIndent)) {
2080-
commonIndent = indent;
2081-
2082-
if (commonIndent === 0) {
2083-
break;
2084-
}
2085-
}
2086-
}
2083+
var commonIndent = getBlockStringIndentation(lines);
20872084

2088-
if (commonIndent) {
2089-
for (var _i = 1; _i < lines.length; _i++) {
2090-
lines[_i] = lines[_i].slice(commonIndent);
2085+
if (commonIndent !== 0) {
2086+
for (var i = 1; i < lines.length; i++) {
2087+
lines[i] = lines[i].slice(commonIndent);
20912088
}
20922089
} // Remove leading and trailing blank lines.
20932090

@@ -2102,6 +2099,29 @@ function dedentBlockStringValue(rawString) {
21022099

21032100

21042101
return lines.join('\n');
2102+
} // @internal
2103+
2104+
function getBlockStringIndentation(lines) {
2105+
var commonIndent = null;
2106+
2107+
for (var i = 1; i < lines.length; i++) {
2108+
var line = lines[i];
2109+
var indent = leadingWhitespace(line);
2110+
2111+
if (indent === line.length) {
2112+
continue; // skip empty lines
2113+
}
2114+
2115+
if (commonIndent === null || indent < commonIndent) {
2116+
commonIndent = indent;
2117+
2118+
if (commonIndent === 0) {
2119+
break;
2120+
}
2121+
}
2122+
}
2123+
2124+
return commonIndent === null ? 0 : commonIndent;
21052125
}
21062126

21072127
function leadingWhitespace(str) {
@@ -2201,13 +2221,10 @@ var TokenKind = Object.freeze({
22012221
BLOCK_STRING: 'BlockString',
22022222
COMMENT: 'Comment'
22032223
});
2204-
/**
2205-
* The enum type representing the token kinds values.
2206-
*/
2207-
22082224
/**
22092225
* A helper function to describe a token as a string for debugging
22102226
*/
2227+
22112228
function getTokenDesc(token) {
22122229
var value = token.value;
22132230
return value ? "".concat(token.kind, " \"").concat(value, "\"") : token.kind;
@@ -2631,16 +2648,18 @@ function readString(source, start, line, col, prev) {
26312648
break;
26322649

26332650
case 117:
2634-
// u
2635-
var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));
2651+
{
2652+
// uXXXX
2653+
var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));
26362654

2637-
if (charCode < 0) {
2638-
throw syntaxError(source, position, 'Invalid character escape sequence: ' + "\\u".concat(body.slice(position + 1, position + 5), "."));
2639-
}
2655+
if (charCode < 0) {
2656+
throw syntaxError(source, position, 'Invalid character escape sequence: ' + "\\u".concat(body.slice(position + 1, position + 5), "."));
2657+
}
26402658

2641-
value += String.fromCharCode(charCode);
2642-
position += 4;
2643-
break;
2659+
value += String.fromCharCode(charCode);
2660+
position += 4;
2661+
break;
2662+
}
26442663

26452664
default:
26462665
throw syntaxError(source, position, "Invalid character escape sequence: \\".concat(String.fromCharCode(code), "."));
@@ -4219,7 +4238,7 @@ function parseDirectiveLocation(lexer) {
42194238
var start = lexer.token;
42204239
var name = parseName(lexer);
42214240

4222-
if (DirectiveLocation.hasOwnProperty(name.value)) {
4241+
if (DirectiveLocation[name.value] !== undefined) {
42234242
return name;
42244243
}
42254244

@@ -4704,7 +4723,7 @@ var CApolloQuery = {
47044723
_result = Object.assign({}, _result);
47054724

47064725
if (errors && errors.length) {
4707-
error = new Error("Apollo errors occured (".concat(errors.length, ")"));
4726+
error = new Error("Apollo errors occurred (".concat(errors.length, ")"));
47084727
error.graphQLErrors = errors;
47094728
}
47104729

@@ -5132,7 +5151,7 @@ function install(Vue, options) {
51325151
}
51335152
ApolloProvider.install = install; // eslint-disable-next-line no-undef
51345153

5135-
ApolloProvider.version = "3.0.0-beta.30"; // Apollo provider
5154+
ApolloProvider.version = "3.0.0-rc.1"; // Apollo provider
51365155

51375156
var ApolloProvider$1 = ApolloProvider; // Components
51385157

dist/vue-apollo.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-apollo.umd.js

+61-42
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@
671671
} else if (error.networkError) {
672672
console.error("Error sending the ".concat(this.type, " '").concat(this.key, "'"), error.networkError);
673673
} else {
674-
console.error("[vue-apollo] An error has occured for ".concat(this.type, " '").concat(this.key, "'"));
674+
console.error("[vue-apollo] An error has occurred for ".concat(this.type, " '").concat(this.key, "'"));
675675

676676
if (Array.isArray(error)) {
677677
var _console;
@@ -1519,7 +1519,7 @@
15191519
if (value) {
15201520
var customInspectFn = getCustomFn(value);
15211521

1522-
if (customInspectFn) {
1522+
if (customInspectFn !== undefined) {
15231523
// $FlowFixMe(>=0.90.0)
15241524
var customValue = customInspectFn.call(value); // check for infinite recursion
15251525

@@ -1639,8 +1639,10 @@
16391639
*
16401640
*/
16411641
function invariant(condition, message) {
1642+
var booleanCondition = Boolean(condition);
16421643
/* istanbul ignore else */
1643-
if (!condition) {
1644+
1645+
if (!booleanCondition) {
16441646
throw new Error(message);
16451647
}
16461648
}
@@ -1878,14 +1880,14 @@
18781880
return whitespace(len - str.length) + str;
18791881
}
18801882

1883+
function _typeof$2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
18811884
/**
1882-
* Copyright (c) Facebook, Inc. and its affiliates.
1883-
*
1884-
* This source code is licensed under the MIT license found in the
1885-
* LICENSE file in the root directory of this source tree.
1886-
*
1887-
*
1885+
* A GraphQLError describes an Error found during the parse, validate, or
1886+
* execute phases of performing a GraphQL operation. In addition to a message
1887+
* and stack trace, it also includes information about the locations in a
1888+
* GraphQL document and/or execution result that correspond to the Error.
18881889
*/
1890+
18891891
function GraphQLError( // eslint-disable-line no-redeclare
18901892
message, nodes, source, positions, path, originalError, extensions) {
18911893
// Compute list of blame nodes.
@@ -1931,7 +1933,15 @@
19311933
}, []);
19321934
}
19331935

1934-
var _extensions = extensions || originalError && originalError.extensions;
1936+
var _extensions = extensions;
1937+
1938+
if (_extensions == null && originalError != null) {
1939+
var originalExtensions = originalError.extensions;
1940+
1941+
if (originalExtensions != null && _typeof$2(originalExtensions) === 'object') {
1942+
_extensions = originalExtensions;
1943+
}
1944+
}
19351945

19361946
Object.defineProperties(this, {
19371947
message: {
@@ -2076,24 +2086,11 @@
20762086
// Expand a block string's raw value into independent lines.
20772087
var lines = rawString.split(/\r\n|[\n\r]/g); // Remove common indentation from all lines but first.
20782088

2079-
var commonIndent = null;
2080-
2081-
for (var i = 1; i < lines.length; i++) {
2082-
var line = lines[i];
2083-
var indent = leadingWhitespace(line);
2084-
2085-
if (indent < line.length && (commonIndent === null || indent < commonIndent)) {
2086-
commonIndent = indent;
2087-
2088-
if (commonIndent === 0) {
2089-
break;
2090-
}
2091-
}
2092-
}
2089+
var commonIndent = getBlockStringIndentation(lines);
20932090

2094-
if (commonIndent) {
2095-
for (var _i = 1; _i < lines.length; _i++) {
2096-
lines[_i] = lines[_i].slice(commonIndent);
2091+
if (commonIndent !== 0) {
2092+
for (var i = 1; i < lines.length; i++) {
2093+
lines[i] = lines[i].slice(commonIndent);
20972094
}
20982095
} // Remove leading and trailing blank lines.
20992096

@@ -2108,6 +2105,29 @@
21082105

21092106

21102107
return lines.join('\n');
2108+
} // @internal
2109+
2110+
function getBlockStringIndentation(lines) {
2111+
var commonIndent = null;
2112+
2113+
for (var i = 1; i < lines.length; i++) {
2114+
var line = lines[i];
2115+
var indent = leadingWhitespace(line);
2116+
2117+
if (indent === line.length) {
2118+
continue; // skip empty lines
2119+
}
2120+
2121+
if (commonIndent === null || indent < commonIndent) {
2122+
commonIndent = indent;
2123+
2124+
if (commonIndent === 0) {
2125+
break;
2126+
}
2127+
}
2128+
}
2129+
2130+
return commonIndent === null ? 0 : commonIndent;
21112131
}
21122132

21132133
function leadingWhitespace(str) {
@@ -2207,13 +2227,10 @@
22072227
BLOCK_STRING: 'BlockString',
22082228
COMMENT: 'Comment'
22092229
});
2210-
/**
2211-
* The enum type representing the token kinds values.
2212-
*/
2213-
22142230
/**
22152231
* A helper function to describe a token as a string for debugging
22162232
*/
2233+
22172234
function getTokenDesc(token) {
22182235
var value = token.value;
22192236
return value ? "".concat(token.kind, " \"").concat(value, "\"") : token.kind;
@@ -2637,16 +2654,18 @@
26372654
break;
26382655

26392656
case 117:
2640-
// u
2641-
var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));
2657+
{
2658+
// uXXXX
2659+
var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));
26422660

2643-
if (charCode < 0) {
2644-
throw syntaxError(source, position, 'Invalid character escape sequence: ' + "\\u".concat(body.slice(position + 1, position + 5), "."));
2645-
}
2661+
if (charCode < 0) {
2662+
throw syntaxError(source, position, 'Invalid character escape sequence: ' + "\\u".concat(body.slice(position + 1, position + 5), "."));
2663+
}
26462664

2647-
value += String.fromCharCode(charCode);
2648-
position += 4;
2649-
break;
2665+
value += String.fromCharCode(charCode);
2666+
position += 4;
2667+
break;
2668+
}
26502669

26512670
default:
26522671
throw syntaxError(source, position, "Invalid character escape sequence: \\".concat(String.fromCharCode(code), "."));
@@ -4225,7 +4244,7 @@
42254244
var start = lexer.token;
42264245
var name = parseName(lexer);
42274246

4228-
if (DirectiveLocation.hasOwnProperty(name.value)) {
4247+
if (DirectiveLocation[name.value] !== undefined) {
42294248
return name;
42304249
}
42314250

@@ -4710,7 +4729,7 @@
47104729
_result = Object.assign({}, _result);
47114730

47124731
if (errors && errors.length) {
4713-
error = new Error("Apollo errors occured (".concat(errors.length, ")"));
4732+
error = new Error("Apollo errors occurred (".concat(errors.length, ")"));
47144733
error.graphQLErrors = errors;
47154734
}
47164735

@@ -5138,7 +5157,7 @@
51385157
}
51395158
ApolloProvider.install = install; // eslint-disable-next-line no-undef
51405159

5141-
ApolloProvider.version = "3.0.0-beta.30"; // Apollo provider
5160+
ApolloProvider.version = "3.0.0-rc.1"; // Apollo provider
51425161

51435162
var ApolloProvider$1 = ApolloProvider; // Components
51445163

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-apollo",
3-
"version": "3.0.0-beta.30",
3+
"version": "3.0.0-rc.1",
44
"description": "Use Apollo and GraphQL with Vue.js",
55
"main": "dist/vue-apollo.umd.js",
66
"module": "dist/vue-apollo.esm.js",

0 commit comments

Comments
 (0)