@depup/graphql-codegen__plugin-helpers 7.2.1-depup.0 → 7.4.0-depup.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/README.md +3 -3
- package/changes.json +2 -2
- package/package.json +5 -5
- package/typings/oldVisit.d.cts +19 -2
- package/typings/oldVisit.d.ts +19 -2
- package/typings/types.d.cts +39 -0
- package/typings/types.d.ts +39 -0
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/graphql-codegen__plugin-helpers
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [@graphql-codegen/plugin-helpers](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers) @ 7.
|
|
17
|
-
| Processed | 2026-
|
|
16
|
+
| Original | [@graphql-codegen/plugin-helpers](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers) @ 7.4.0 |
|
|
17
|
+
| Processed | 2026-09-28 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
19
|
| Deps updated | 2 |
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ npm install @depup/graphql-codegen__plugin-helpers
|
|
|
22
22
|
|
|
23
23
|
| Dependency | From | To |
|
|
24
24
|
|------------|------|-----|
|
|
25
|
-
| @graphql-tools/utils | ^11.2.0 | ^12.0.
|
|
25
|
+
| @graphql-tools/utils | ^11.2.0 | ^12.0.1 |
|
|
26
26
|
| tslib | ^2.8.0 | ^2.8.1 |
|
|
27
27
|
|
|
28
28
|
---
|
package/changes.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"bumped": {
|
|
3
3
|
"@graphql-tools/utils": {
|
|
4
4
|
"from": "^11.2.0",
|
|
5
|
-
"to": "^12.0.
|
|
5
|
+
"to": "^12.0.1"
|
|
6
6
|
},
|
|
7
7
|
"tslib": {
|
|
8
8
|
"from": "^2.8.0",
|
|
9
9
|
"to": "^2.8.1"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
-
"timestamp": "2026-
|
|
12
|
+
"timestamp": "2026-09-28T16:10:23.358Z",
|
|
13
13
|
"totalUpdated": 2
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/graphql-codegen__plugin-helpers",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0-depup.0",
|
|
4
4
|
"description": "GraphQL Code Generator common utils and types (with updated dependencies)",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@graphql-tools/utils": "^12.0.
|
|
9
|
+
"@graphql-tools/utils": "^12.0.1",
|
|
10
10
|
"change-case-all": "^2.1.0",
|
|
11
11
|
"common-tags": "1.8.2",
|
|
12
12
|
"import-from": "4.0.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"changes": {
|
|
58
58
|
"@graphql-tools/utils": {
|
|
59
59
|
"from": "^11.2.0",
|
|
60
|
-
"to": "^12.0.
|
|
60
|
+
"to": "^12.0.1"
|
|
61
61
|
},
|
|
62
62
|
"tslib": {
|
|
63
63
|
"from": "^2.8.0",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
},
|
|
67
67
|
"depsUpdated": 2,
|
|
68
68
|
"originalPackage": "@graphql-codegen/plugin-helpers",
|
|
69
|
-
"originalVersion": "7.
|
|
70
|
-
"processedAt": "2026-
|
|
69
|
+
"originalVersion": "7.4.0",
|
|
70
|
+
"processedAt": "2026-09-28T16:10:27.084Z",
|
|
71
71
|
"smokeTest": "passed"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/typings/oldVisit.d.cts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
import { ASTNode } from 'graphql';
|
|
2
|
-
|
|
1
|
+
import { ASTNode, DocumentNode } from 'graphql';
|
|
2
|
+
/**
|
|
3
|
+
* The result of `oldVisit` on a `DocumentNode` with `leave` visitors.
|
|
4
|
+
*
|
|
5
|
+
* Each definition is replaced by whatever its leave visitor returned (usually a string). Definitions
|
|
6
|
+
* without a leave visitor stay as AST nodes, so check each one before using it.
|
|
7
|
+
*/
|
|
8
|
+
export type OldVisitDocumentResult = Omit<DocumentNode, 'definitions'> & {
|
|
9
|
+
definitions: unknown[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Visits `root` with `enter` and `leave` visitor maps keyed by AST node kind.
|
|
13
|
+
*
|
|
14
|
+
* Leave visitors replace nodes with whatever they return, so the result's shape depends on the
|
|
15
|
+
* visitor. For a `DocumentNode`, it defaults to `OldVisitDocumentResult`. When a `Document` leave
|
|
16
|
+
* visitor returns a value of its own, pass its type as `TResult`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function oldVisit<TResult = OldVisitDocumentResult>(root: DocumentNode, visitor: any): TResult;
|
|
19
|
+
export declare function oldVisit<TResult = unknown>(root: ASTNode, visitor: any): TResult;
|
package/typings/oldVisit.d.ts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
import { ASTNode } from 'graphql';
|
|
2
|
-
|
|
1
|
+
import { ASTNode, DocumentNode } from 'graphql';
|
|
2
|
+
/**
|
|
3
|
+
* The result of `oldVisit` on a `DocumentNode` with `leave` visitors.
|
|
4
|
+
*
|
|
5
|
+
* Each definition is replaced by whatever its leave visitor returned (usually a string). Definitions
|
|
6
|
+
* without a leave visitor stay as AST nodes, so check each one before using it.
|
|
7
|
+
*/
|
|
8
|
+
export type OldVisitDocumentResult = Omit<DocumentNode, 'definitions'> & {
|
|
9
|
+
definitions: unknown[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Visits `root` with `enter` and `leave` visitor maps keyed by AST node kind.
|
|
13
|
+
*
|
|
14
|
+
* Leave visitors replace nodes with whatever they return, so the result's shape depends on the
|
|
15
|
+
* visitor. For a `DocumentNode`, it defaults to `OldVisitDocumentResult`. When a `Document` leave
|
|
16
|
+
* visitor returns a value of its own, pass its type as `TResult`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function oldVisit<TResult = OldVisitDocumentResult>(root: DocumentNode, visitor: any): TResult;
|
|
19
|
+
export declare function oldVisit<TResult = unknown>(root: ASTNode, visitor: any): TResult;
|
package/typings/types.d.cts
CHANGED
|
@@ -3,6 +3,21 @@ import type { ApolloEngineOptions } from '@graphql-tools/apollo-engine-loader';
|
|
|
3
3
|
import { Source } from '@graphql-tools/utils';
|
|
4
4
|
import type { Profiler } from './profiler.cjs';
|
|
5
5
|
export declare namespace Types {
|
|
6
|
+
/**
|
|
7
|
+
* @description Controls how the CLI decides whether the generated content already
|
|
8
|
+
* matches the output file so the write can be skipped:
|
|
9
|
+
*
|
|
10
|
+
* - `'cache-first'` (default): compare against the in-memory hash of what codegen
|
|
11
|
+
* last wrote, falling back to reading the file from disk when there is no cached
|
|
12
|
+
* entry. Assumes the output is a pure function of the codegen inputs.
|
|
13
|
+
* - `'disk'`: always compare against the file on disk. Use this when the output
|
|
14
|
+
* depends on the file's existing content (e.g. a preset that reads the file and
|
|
15
|
+
* rewrites part of it), so a file that was changed on disk is not wrongly skipped
|
|
16
|
+
* in watch mode.
|
|
17
|
+
*
|
|
18
|
+
* @default 'cache-first'
|
|
19
|
+
*/
|
|
20
|
+
type ContentComparison = 'cache-first' | 'disk';
|
|
6
21
|
interface GenerateOptions {
|
|
7
22
|
filename: string;
|
|
8
23
|
plugins: Types.ConfiguredPlugin[];
|
|
@@ -24,6 +39,11 @@ export declare namespace Types {
|
|
|
24
39
|
documentTransforms?: ConfiguredDocumentTransform[];
|
|
25
40
|
emitLegacyCommonJSImports?: boolean;
|
|
26
41
|
importExtension?: '' | `.${string}`;
|
|
42
|
+
/**
|
|
43
|
+
* @description How the CLI compares generated content against the output file
|
|
44
|
+
* to decide whether the write can be skipped. See {@link Types.ContentComparison}.
|
|
45
|
+
*/
|
|
46
|
+
contentComparison?: Types.ContentComparison;
|
|
27
47
|
}
|
|
28
48
|
type FileOutput = {
|
|
29
49
|
filename: string;
|
|
@@ -32,6 +52,17 @@ export declare namespace Types {
|
|
|
32
52
|
beforeOneFileWrite?: LifecycleHooksDefinition['beforeOneFileWrite'];
|
|
33
53
|
afterOneFileWrite?: LifecycleHooksDefinition['afterOneFileWrite'];
|
|
34
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* @description How the CLI compares generated content against the output file
|
|
57
|
+
* to decide whether the write can be skipped. See {@link Types.ContentComparison}.
|
|
58
|
+
*/
|
|
59
|
+
contentComparison?: Types.ContentComparison;
|
|
60
|
+
/**
|
|
61
|
+
* @description Carries the `overwrite` setting from the `generates` entry that
|
|
62
|
+
* produced this file, so the CLI can honor it per file (e.g. a preset keyed by a
|
|
63
|
+
* directory, which can't be looked up by a generated file's path).
|
|
64
|
+
*/
|
|
65
|
+
overwrite?: boolean | Partial<NormalizedOverwriteOption>;
|
|
35
66
|
};
|
|
36
67
|
interface DocumentFile extends Source {
|
|
37
68
|
hash?: string | null;
|
|
@@ -258,6 +289,14 @@ export declare namespace Types {
|
|
|
258
289
|
* For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
|
|
259
290
|
*/
|
|
260
291
|
overwrite?: boolean | Partial<NormalizedOverwriteOption>;
|
|
292
|
+
/**
|
|
293
|
+
* @description How the CLI compares generated content against the output file
|
|
294
|
+
* to decide whether the write can be skipped. See {@link Types.ContentComparison}.
|
|
295
|
+
*
|
|
296
|
+
* A preset can also set this per output from `buildGeneratesSection`; the value
|
|
297
|
+
* returned there takes precedence over this one.
|
|
298
|
+
*/
|
|
299
|
+
contentComparison?: Types.ContentComparison;
|
|
261
300
|
/**
|
|
262
301
|
* @description A pointer(s) to your GraphQL documents: query, mutation, subscription and fragment. These documents will be loaded into for all your output files.
|
|
263
302
|
* You can use one of the following:
|
package/typings/types.d.ts
CHANGED
|
@@ -3,6 +3,21 @@ import type { ApolloEngineOptions } from '@graphql-tools/apollo-engine-loader';
|
|
|
3
3
|
import { Source } from '@graphql-tools/utils';
|
|
4
4
|
import type { Profiler } from './profiler.js';
|
|
5
5
|
export declare namespace Types {
|
|
6
|
+
/**
|
|
7
|
+
* @description Controls how the CLI decides whether the generated content already
|
|
8
|
+
* matches the output file so the write can be skipped:
|
|
9
|
+
*
|
|
10
|
+
* - `'cache-first'` (default): compare against the in-memory hash of what codegen
|
|
11
|
+
* last wrote, falling back to reading the file from disk when there is no cached
|
|
12
|
+
* entry. Assumes the output is a pure function of the codegen inputs.
|
|
13
|
+
* - `'disk'`: always compare against the file on disk. Use this when the output
|
|
14
|
+
* depends on the file's existing content (e.g. a preset that reads the file and
|
|
15
|
+
* rewrites part of it), so a file that was changed on disk is not wrongly skipped
|
|
16
|
+
* in watch mode.
|
|
17
|
+
*
|
|
18
|
+
* @default 'cache-first'
|
|
19
|
+
*/
|
|
20
|
+
type ContentComparison = 'cache-first' | 'disk';
|
|
6
21
|
interface GenerateOptions {
|
|
7
22
|
filename: string;
|
|
8
23
|
plugins: Types.ConfiguredPlugin[];
|
|
@@ -24,6 +39,11 @@ export declare namespace Types {
|
|
|
24
39
|
documentTransforms?: ConfiguredDocumentTransform[];
|
|
25
40
|
emitLegacyCommonJSImports?: boolean;
|
|
26
41
|
importExtension?: '' | `.${string}`;
|
|
42
|
+
/**
|
|
43
|
+
* @description How the CLI compares generated content against the output file
|
|
44
|
+
* to decide whether the write can be skipped. See {@link Types.ContentComparison}.
|
|
45
|
+
*/
|
|
46
|
+
contentComparison?: Types.ContentComparison;
|
|
27
47
|
}
|
|
28
48
|
type FileOutput = {
|
|
29
49
|
filename: string;
|
|
@@ -32,6 +52,17 @@ export declare namespace Types {
|
|
|
32
52
|
beforeOneFileWrite?: LifecycleHooksDefinition['beforeOneFileWrite'];
|
|
33
53
|
afterOneFileWrite?: LifecycleHooksDefinition['afterOneFileWrite'];
|
|
34
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* @description How the CLI compares generated content against the output file
|
|
57
|
+
* to decide whether the write can be skipped. See {@link Types.ContentComparison}.
|
|
58
|
+
*/
|
|
59
|
+
contentComparison?: Types.ContentComparison;
|
|
60
|
+
/**
|
|
61
|
+
* @description Carries the `overwrite` setting from the `generates` entry that
|
|
62
|
+
* produced this file, so the CLI can honor it per file (e.g. a preset keyed by a
|
|
63
|
+
* directory, which can't be looked up by a generated file's path).
|
|
64
|
+
*/
|
|
65
|
+
overwrite?: boolean | Partial<NormalizedOverwriteOption>;
|
|
35
66
|
};
|
|
36
67
|
interface DocumentFile extends Source {
|
|
37
68
|
hash?: string | null;
|
|
@@ -258,6 +289,14 @@ export declare namespace Types {
|
|
|
258
289
|
* For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
|
|
259
290
|
*/
|
|
260
291
|
overwrite?: boolean | Partial<NormalizedOverwriteOption>;
|
|
292
|
+
/**
|
|
293
|
+
* @description How the CLI compares generated content against the output file
|
|
294
|
+
* to decide whether the write can be skipped. See {@link Types.ContentComparison}.
|
|
295
|
+
*
|
|
296
|
+
* A preset can also set this per output from `buildGeneratesSection`; the value
|
|
297
|
+
* returned there takes precedence over this one.
|
|
298
|
+
*/
|
|
299
|
+
contentComparison?: Types.ContentComparison;
|
|
261
300
|
/**
|
|
262
301
|
* @description A pointer(s) to your GraphQL documents: query, mutation, subscription and fragment. These documents will be loaded into for all your output files.
|
|
263
302
|
* You can use one of the following:
|