@graphql-tools/jest-transform 1.1.4 → 1.2.0-alpha-6c480b2d.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.
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const loader = _interopDefault(require('@graphql-tools/webpack-loader'));
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.process = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const webpack_loader_1 = tslib_1.__importDefault(require("@graphql-tools/webpack-loader"));
|
|
9
6
|
class GraphQLTransformer {
|
|
10
7
|
process(input, _filePath, jestConfig) {
|
|
11
8
|
var _a;
|
|
@@ -13,7 +10,7 @@ class GraphQLTransformer {
|
|
|
13
10
|
// call directly the webpack loader with a mocked context
|
|
14
11
|
// as the loader leverages `this.cacheable()`
|
|
15
12
|
return {
|
|
16
|
-
code:
|
|
13
|
+
code: webpack_loader_1.default.call({
|
|
17
14
|
cacheable() { },
|
|
18
15
|
query: config,
|
|
19
16
|
}, input),
|
|
@@ -27,9 +24,8 @@ function defaultTransformer() {
|
|
|
27
24
|
function process(...args) {
|
|
28
25
|
return defaultTransformer().process(...args);
|
|
29
26
|
}
|
|
27
|
+
exports.process = process;
|
|
30
28
|
const transformerFactory = {
|
|
31
29
|
process,
|
|
32
30
|
};
|
|
33
|
-
|
|
34
31
|
exports.default = transformerFactory;
|
|
35
|
-
exports.process = process;
|
package/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import loader from '@graphql-tools/webpack-loader';
|
|
2
|
-
|
|
3
2
|
class GraphQLTransformer {
|
|
4
3
|
process(input, _filePath, jestConfig) {
|
|
5
4
|
var _a;
|
|
@@ -18,12 +17,10 @@ let transformer;
|
|
|
18
17
|
function defaultTransformer() {
|
|
19
18
|
return transformer || (transformer = new GraphQLTransformer());
|
|
20
19
|
}
|
|
21
|
-
function process(...args) {
|
|
20
|
+
export function process(...args) {
|
|
22
21
|
return defaultTransformer().process(...args);
|
|
23
22
|
}
|
|
24
23
|
const transformerFactory = {
|
|
25
24
|
process,
|
|
26
25
|
};
|
|
27
|
-
|
|
28
26
|
export default transformerFactory;
|
|
29
|
-
export { process };
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/jest-transform",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-alpha-6c480b2d.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": "6.
|
|
10
|
+
"@graphql-tools/webpack-loader": "6.7.0-alpha-6c480b2d.0",
|
|
11
11
|
"@jest/transform": "^28.0.0",
|
|
12
12
|
"@jest/types": "^28.0.0",
|
|
13
|
-
"tslib": "
|
|
13
|
+
"tslib": "^2.4.0"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
@@ -18,21 +18,42 @@
|
|
|
18
18
|
"directory": "packages/jest-transform"
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
|
-
"main": "index.js",
|
|
22
|
-
"module": "index.
|
|
23
|
-
"typings": "index.d.ts",
|
|
21
|
+
"main": "cjs/index.js",
|
|
22
|
+
"module": "esm/index.js",
|
|
23
|
+
"typings": "typings/index.d.ts",
|
|
24
24
|
"typescript": {
|
|
25
|
-
"definition": "index.d.ts"
|
|
25
|
+
"definition": "typings/index.d.ts"
|
|
26
26
|
},
|
|
27
|
+
"type": "module",
|
|
27
28
|
"exports": {
|
|
28
29
|
".": {
|
|
29
|
-
"require":
|
|
30
|
-
|
|
30
|
+
"require": {
|
|
31
|
+
"types": "./typings/index.d.ts",
|
|
32
|
+
"default": "./cjs/index.js"
|
|
33
|
+
},
|
|
34
|
+
"import": {
|
|
35
|
+
"types": "./typings/index.d.ts",
|
|
36
|
+
"default": "./esm/index.js"
|
|
37
|
+
},
|
|
38
|
+
"default": {
|
|
39
|
+
"types": "./typings/index.d.ts",
|
|
40
|
+
"default": "./esm/index.js"
|
|
41
|
+
}
|
|
31
42
|
},
|
|
32
43
|
"./*": {
|
|
33
|
-
"require":
|
|
34
|
-
|
|
44
|
+
"require": {
|
|
45
|
+
"types": "./typings/*.d.ts",
|
|
46
|
+
"default": "./cjs/*.js"
|
|
47
|
+
},
|
|
48
|
+
"import": {
|
|
49
|
+
"types": "./typings/*.d.ts",
|
|
50
|
+
"default": "./esm/*.js"
|
|
51
|
+
},
|
|
52
|
+
"default": {
|
|
53
|
+
"types": "./typings/*.d.ts",
|
|
54
|
+
"default": "./esm/*.js"
|
|
55
|
+
}
|
|
35
56
|
},
|
|
36
57
|
"./package.json": "./package.json"
|
|
37
58
|
}
|
|
38
|
-
}
|
|
59
|
+
}
|
|
File without changes
|