@graphql-tools/jest-transform 2.0.0-rc-20230519104353-b09f3180 → 2.0.0
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/cjs/index.js +1 -2
- package/esm/index.js +1 -2
- package/package.json +2 -2
package/cjs/index.js
CHANGED
|
@@ -5,8 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const webpack_loader_1 = tslib_1.__importDefault(require("@graphql-tools/webpack-loader"));
|
|
6
6
|
class GraphQLTransformer {
|
|
7
7
|
process(input, _filePath, jestConfig) {
|
|
8
|
-
|
|
9
|
-
const config = ((_a = jestConfig.config.globals) === null || _a === void 0 ? void 0 : _a['graphql']) || {};
|
|
8
|
+
const config = jestConfig.config.globals?.['graphql'] || {};
|
|
10
9
|
// call directly the webpack loader with a mocked context
|
|
11
10
|
// as the loader leverages `this.cacheable()`
|
|
12
11
|
return {
|
package/esm/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import loader from '@graphql-tools/webpack-loader';
|
|
2
2
|
class GraphQLTransformer {
|
|
3
3
|
process(input, _filePath, jestConfig) {
|
|
4
|
-
|
|
5
|
-
const config = ((_a = jestConfig.config.globals) === null || _a === void 0 ? void 0 : _a['graphql']) || {};
|
|
4
|
+
const config = jestConfig.config.globals?.['graphql'] || {};
|
|
6
5
|
// call directly the webpack loader with a mocked context
|
|
7
6
|
// as the loader leverages `this.cacheable()`
|
|
8
7
|
return {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/jest-transform",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Jest Plugin to load and parse imported GraphQL files",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-tools/webpack-loader": "7.0.0
|
|
10
|
+
"@graphql-tools/webpack-loader": "7.0.0",
|
|
11
11
|
"@jest/transform": "^29.0.0",
|
|
12
12
|
"@jest/types": "^29.0.0",
|
|
13
13
|
"tslib": "^2.4.0"
|