graphql 15.5.0 → 15.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jsutils/instanceOf.js +15 -9
- package/jsutils/instanceOf.js.flow +12 -5
- package/jsutils/instanceOf.mjs +13 -5
- package/package.json +2 -2
- package/version.js +2 -2
- package/version.js.flow +2 -2
- package/version.mjs +2 -2
package/jsutils/instanceOf.js
CHANGED
|
@@ -5,10 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
var _inspect = _interopRequireDefault(require("./inspect.js"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
13
|
+
|
|
12
14
|
// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
|
|
13
15
|
// See: https://webpack.js.org/guides/production/
|
|
14
16
|
var _default = process.env.NODE_ENV === 'production' ? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
|
|
@@ -21,12 +23,16 @@ function instanceOf(value, constructor) {
|
|
|
21
23
|
return true;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
if (value) {
|
|
25
|
-
var
|
|
26
|
-
|
|
26
|
+
if (_typeof(value) === 'object' && value !== null) {
|
|
27
|
+
var _value$constructor;
|
|
28
|
+
|
|
29
|
+
var className = constructor.prototype[Symbol.toStringTag];
|
|
30
|
+
var valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.
|
|
31
|
+
Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name;
|
|
27
32
|
|
|
28
|
-
if (className
|
|
29
|
-
|
|
33
|
+
if (className === valueClassName) {
|
|
34
|
+
var stringifiedValue = (0, _inspect.default)(value);
|
|
35
|
+
throw new Error("Cannot use ".concat(className, " \"").concat(stringifiedValue, "\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results."));
|
|
30
36
|
}
|
|
31
37
|
}
|
|
32
38
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
// @flow strict
|
|
2
|
+
import inspect from './inspect';
|
|
3
|
+
|
|
2
4
|
/**
|
|
3
5
|
* A replacement for instanceof which includes an error warning when multi-realm
|
|
4
6
|
* constructors are detected.
|
|
@@ -21,12 +23,17 @@ export default process.env.NODE_ENV === 'production'
|
|
|
21
23
|
if (value instanceof constructor) {
|
|
22
24
|
return true;
|
|
23
25
|
}
|
|
24
|
-
if (value) {
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
if (typeof value === 'object' && value !== null) {
|
|
27
|
+
const className = constructor.prototype[Symbol.toStringTag];
|
|
28
|
+
const valueClassName =
|
|
29
|
+
// We still need to support constructor's name to detect conflicts with older versions of this library.
|
|
30
|
+
Symbol.toStringTag in value
|
|
31
|
+
? value[Symbol.toStringTag]
|
|
32
|
+
: value.constructor?.name;
|
|
33
|
+
if (className === valueClassName) {
|
|
34
|
+
const stringifiedValue = inspect(value);
|
|
28
35
|
throw new Error(
|
|
29
|
-
`Cannot use ${className} "${
|
|
36
|
+
`Cannot use ${className} "${stringifiedValue}" from another module or realm.
|
|
30
37
|
|
|
31
38
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
32
39
|
directory. If different versions of "graphql" are the dependencies of other
|
package/jsutils/instanceOf.mjs
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
+
|
|
3
|
+
import inspect from "./inspect.mjs";
|
|
1
4
|
/**
|
|
2
5
|
* A replacement for instanceof which includes an error warning when multi-realm
|
|
3
6
|
* constructors are detected.
|
|
4
7
|
*/
|
|
8
|
+
|
|
5
9
|
// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
|
|
6
10
|
// See: https://webpack.js.org/guides/production/
|
|
7
11
|
export default process.env.NODE_ENV === 'production' ? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
|
|
@@ -14,12 +18,16 @@ function instanceOf(value, constructor) {
|
|
|
14
18
|
return true;
|
|
15
19
|
}
|
|
16
20
|
|
|
17
|
-
if (value) {
|
|
18
|
-
var
|
|
19
|
-
|
|
21
|
+
if (_typeof(value) === 'object' && value !== null) {
|
|
22
|
+
var _value$constructor;
|
|
23
|
+
|
|
24
|
+
var className = constructor.prototype[Symbol.toStringTag];
|
|
25
|
+
var valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.
|
|
26
|
+
Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name;
|
|
20
27
|
|
|
21
|
-
if (className
|
|
22
|
-
|
|
28
|
+
if (className === valueClassName) {
|
|
29
|
+
var stringifiedValue = inspect(value);
|
|
30
|
+
throw new Error("Cannot use ".concat(className, " \"").concat(stringifiedValue, "\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results."));
|
|
23
31
|
}
|
|
24
32
|
}
|
|
25
33
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphql",
|
|
3
|
-
"version": "15.5.
|
|
3
|
+
"version": "15.5.1",
|
|
4
4
|
"description": "A Query Language and Runtime which can target any service.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index",
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">= 10.x"
|
|
24
24
|
}
|
|
25
|
-
}
|
|
25
|
+
}
|
package/version.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.versionInfo = exports.version = void 0;
|
|
|
13
13
|
/**
|
|
14
14
|
* A string containing the version of the GraphQL.js library
|
|
15
15
|
*/
|
|
16
|
-
var version = '15.5.
|
|
16
|
+
var version = '15.5.1';
|
|
17
17
|
/**
|
|
18
18
|
* An object containing the components of the GraphQL.js version string
|
|
19
19
|
*/
|
|
@@ -22,7 +22,7 @@ exports.version = version;
|
|
|
22
22
|
var versionInfo = Object.freeze({
|
|
23
23
|
major: 15,
|
|
24
24
|
minor: 5,
|
|
25
|
-
patch:
|
|
25
|
+
patch: 1,
|
|
26
26
|
preReleaseTag: null
|
|
27
27
|
});
|
|
28
28
|
exports.versionInfo = versionInfo;
|
package/version.js.flow
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* A string containing the version of the GraphQL.js library
|
|
9
9
|
*/
|
|
10
|
-
export const version = '15.5.
|
|
10
|
+
export const version = '15.5.1';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* An object containing the components of the GraphQL.js version string
|
|
@@ -15,6 +15,6 @@ export const version = '15.5.0';
|
|
|
15
15
|
export const versionInfo = Object.freeze({
|
|
16
16
|
major: 15,
|
|
17
17
|
minor: 5,
|
|
18
|
-
patch:
|
|
18
|
+
patch: 1,
|
|
19
19
|
preReleaseTag: null,
|
|
20
20
|
});
|
package/version.mjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* A string containing the version of the GraphQL.js library
|
|
8
8
|
*/
|
|
9
|
-
export var version = '15.5.
|
|
9
|
+
export var version = '15.5.1';
|
|
10
10
|
/**
|
|
11
11
|
* An object containing the components of the GraphQL.js version string
|
|
12
12
|
*/
|
|
@@ -14,6 +14,6 @@ export var version = '15.5.0';
|
|
|
14
14
|
export var versionInfo = Object.freeze({
|
|
15
15
|
major: 15,
|
|
16
16
|
minor: 5,
|
|
17
|
-
patch:
|
|
17
|
+
patch: 1,
|
|
18
18
|
preReleaseTag: null
|
|
19
19
|
});
|