@graphql-mesh/transform-prune 1.0.0-alpha-20220804093904-8e2e41f7f → 1.0.0-alpha-20230420220344-25b6b92bf

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,14 +1,13 @@
1
- 'use strict';
2
-
3
- const utils = require('@graphql-tools/utils');
4
-
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("@graphql-tools/utils");
5
4
  class PruneTransform {
6
5
  constructor(options) {
7
6
  this.options = options;
8
7
  this.noWrap = true;
9
8
  }
10
9
  transformSchema(schema) {
11
- return utils.pruneSchema(schema, {
10
+ return (0, utils_1.pruneSchema)(schema, {
12
11
  ...this.options.config,
13
12
  skipPruning: this.options.config.skipPruning
14
13
  ? type => this.options.config.skipPruning.includes(type.name)
@@ -16,5 +15,4 @@ class PruneTransform {
16
15
  });
17
16
  }
18
17
  }
19
-
20
- module.exports = PruneTransform;
18
+ exports.default = PruneTransform;
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -1,6 +1,5 @@
1
1
  import { pruneSchema } from '@graphql-tools/utils';
2
-
3
- class PruneTransform {
2
+ export default class PruneTransform {
4
3
  constructor(options) {
5
4
  this.options = options;
6
5
  this.noWrap = true;
@@ -14,5 +13,3 @@ class PruneTransform {
14
13
  });
15
14
  }
16
15
  }
17
-
18
- export default PruneTransform;
package/package.json CHANGED
@@ -1,36 +1,42 @@
1
1
  {
2
2
  "name": "@graphql-mesh/transform-prune",
3
- "version": "1.0.0-alpha-20220804093904-8e2e41f7f",
3
+ "version": "1.0.0-alpha-20230420220344-25b6b92bf",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@graphql-mesh/types": "0.79.0-alpha-20220804093904-8e2e41f7f",
7
- "graphql": "*"
8
- },
9
- "dependencies": {
10
- "@graphql-tools/utils": "8.9.0",
6
+ "@graphql-mesh/types": "1.0.0-alpha-20230420220344-25b6b92bf",
7
+ "@graphql-tools/utils": "^9.2.1",
8
+ "graphql": "*",
11
9
  "tslib": "^2.4.0"
12
10
  },
11
+ "dependencies": {},
13
12
  "repository": {
14
13
  "type": "git",
15
14
  "url": "Urigo/graphql-mesh",
16
15
  "directory": "packages/transforms/prune"
17
16
  },
18
17
  "license": "MIT",
19
- "main": "index.js",
20
- "module": "index.mjs",
21
- "typings": "index.d.ts",
18
+ "main": "cjs/index.js",
19
+ "module": "esm/index.js",
20
+ "typings": "typings/index.d.ts",
22
21
  "typescript": {
23
- "definition": "index.d.ts"
22
+ "definition": "typings/index.d.ts"
24
23
  },
24
+ "type": "module",
25
25
  "exports": {
26
26
  ".": {
27
- "require": "./index.js",
28
- "import": "./index.mjs"
29
- },
30
- "./*": {
31
- "require": "./*.js",
32
- "import": "./*.mjs"
27
+ "require": {
28
+ "types": "./typings/index.d.cts",
29
+ "default": "./cjs/index.js"
30
+ },
31
+ "import": {
32
+ "types": "./typings/index.d.ts",
33
+ "default": "./esm/index.js"
34
+ },
35
+ "default": {
36
+ "types": "./typings/index.d.ts",
37
+ "default": "./esm/index.js"
38
+ }
33
39
  },
34
40
  "./package.json": "./package.json"
35
41
  }
36
- }
42
+ }
@@ -0,0 +1,8 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { MeshTransform, MeshTransformOptions, YamlConfig } from '@graphql-mesh/types';
3
+ export default class PruneTransform implements MeshTransform {
4
+ private options;
5
+ noWrap: boolean;
6
+ constructor(options: MeshTransformOptions<YamlConfig.PruneTransformConfig>);
7
+ transformSchema(schema: GraphQLSchema): GraphQLSchema;
8
+ }
@@ -1,5 +1,5 @@
1
- import { MeshTransform, MeshTransformOptions, YamlConfig } from '@graphql-mesh/types';
2
1
  import { GraphQLSchema } from 'graphql';
2
+ import { MeshTransform, MeshTransformOptions, YamlConfig } from '@graphql-mesh/types';
3
3
  export default class PruneTransform implements MeshTransform {
4
4
  private options;
5
5
  noWrap: boolean;