@depup/graphql-codegen__plugin-helpers 7.1.0-depup.9 → 7.2.1-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 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.1.0 |
17
- | Processed | 2026-08-13 |
16
+ | Original | [@graphql-codegen/plugin-helpers](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers) @ 7.2.1 |
17
+ | Processed | 2026-08-23 |
18
18
  | Smoke test | passed |
19
19
  | Deps updated | 2 |
20
20
 
package/changes.json CHANGED
@@ -9,6 +9,6 @@
9
9
  "to": "^2.8.1"
10
10
  }
11
11
  },
12
- "timestamp": "2026-08-13T00:26:54.544Z",
12
+ "timestamp": "2026-08-23T16:05:28.243Z",
13
13
  "totalUpdated": 2
14
14
  }
package/cjs/profiler.js CHANGED
@@ -4,20 +4,37 @@ exports.createNoopProfiler = createNoopProfiler;
4
4
  exports.createProfiler = createProfiler;
5
5
  function createNoopProfiler() {
6
6
  return {
7
+ outputName: null,
7
8
  run(fn) {
8
9
  return Promise.resolve().then(() => fn());
9
10
  },
10
11
  collect() {
11
12
  return [];
12
13
  },
14
+ clear() { },
13
15
  };
14
16
  }
15
17
  function createProfiler() {
18
+ /** Build a unique, human-readable trace filename e.g. `codegen-20111005T144800000.json` */
19
+ function generateOutputName() {
20
+ const datetimeNormalized = new Date()
21
+ .toISOString() // 2011-10-05T14:48:00.000Z
22
+ .replace(/[-:.Z]/g, ''); // 20111005T144800000
23
+ return `codegen-${datetimeNormalized}.json`;
24
+ }
16
25
  const events = [];
26
+ let outputName = generateOutputName();
17
27
  return {
28
+ get outputName() {
29
+ return outputName;
30
+ },
18
31
  collect() {
19
32
  return events;
20
33
  },
34
+ clear() {
35
+ events.length = 0;
36
+ outputName = generateOutputName();
37
+ },
21
38
  run(fn, name, cat) {
22
39
  let startTime;
23
40
  return Promise.resolve()
package/esm/profiler.js CHANGED
@@ -1,19 +1,36 @@
1
1
  export function createNoopProfiler() {
2
2
  return {
3
+ outputName: null,
3
4
  run(fn) {
4
5
  return Promise.resolve().then(() => fn());
5
6
  },
6
7
  collect() {
7
8
  return [];
8
9
  },
10
+ clear() { },
9
11
  };
10
12
  }
11
13
  export function createProfiler() {
14
+ /** Build a unique, human-readable trace filename e.g. `codegen-20111005T144800000.json` */
15
+ function generateOutputName() {
16
+ const datetimeNormalized = new Date()
17
+ .toISOString() // 2011-10-05T14:48:00.000Z
18
+ .replace(/[-:.Z]/g, ''); // 20111005T144800000
19
+ return `codegen-${datetimeNormalized}.json`;
20
+ }
12
21
  const events = [];
22
+ let outputName = generateOutputName();
13
23
  return {
24
+ get outputName() {
25
+ return outputName;
26
+ },
14
27
  collect() {
15
28
  return events;
16
29
  },
30
+ clear() {
31
+ events.length = 0;
32
+ outputName = generateOutputName();
33
+ },
17
34
  run(fn, name, cat) {
18
35
  let startTime;
19
36
  return Promise.resolve()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depup/graphql-codegen__plugin-helpers",
3
- "version": "7.1.0-depup.9",
3
+ "version": "7.2.1-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"
@@ -66,8 +66,8 @@
66
66
  },
67
67
  "depsUpdated": 2,
68
68
  "originalPackage": "@graphql-codegen/plugin-helpers",
69
- "originalVersion": "7.1.0",
70
- "processedAt": "2026-08-13T00:26:57.802Z",
69
+ "originalVersion": "7.2.1",
70
+ "processedAt": "2026-08-23T16:05:30.382Z",
71
71
  "smokeTest": "passed"
72
72
  }
73
73
  }
@@ -21,8 +21,16 @@ export interface ProfilerEvent {
21
21
  cname?: string;
22
22
  }
23
23
  export interface Profiler {
24
+ /**
25
+ * Filename of the current trace's collected events should be written to,
26
+ * or `null` when profiling is disabled.
27
+ * A fresh name is generated whenever {@link clear} starts a new trace.
28
+ */
29
+ readonly outputName: string | null;
24
30
  run<T>(fn: () => Promise<T>, name: string, cat?: string): Promise<T>;
25
31
  collect(): ProfilerEvent[];
32
+ /** Discard all collected events so the next {@link collect} starts fresh */
33
+ clear(): void;
26
34
  }
27
35
  export declare function createNoopProfiler(): Profiler;
28
36
  export declare function createProfiler(): Profiler;
@@ -21,8 +21,16 @@ export interface ProfilerEvent {
21
21
  cname?: string;
22
22
  }
23
23
  export interface Profiler {
24
+ /**
25
+ * Filename of the current trace's collected events should be written to,
26
+ * or `null` when profiling is disabled.
27
+ * A fresh name is generated whenever {@link clear} starts a new trace.
28
+ */
29
+ readonly outputName: string | null;
24
30
  run<T>(fn: () => Promise<T>, name: string, cat?: string): Promise<T>;
25
31
  collect(): ProfilerEvent[];
32
+ /** Discard all collected events so the next {@link collect} starts fresh */
33
+ clear(): void;
26
34
  }
27
35
  export declare function createNoopProfiler(): Profiler;
28
36
  export declare function createProfiler(): Profiler;
@@ -257,7 +257,7 @@ export declare namespace Types {
257
257
  *
258
258
  * For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
259
259
  */
260
- overwrite?: boolean;
260
+ overwrite?: boolean | Partial<NormalizedOverwriteOption>;
261
261
  /**
262
262
  * @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
263
  * You can use one of the following:
@@ -426,7 +426,7 @@ export declare namespace Types {
426
426
  *
427
427
  * For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
428
428
  */
429
- overwrite?: boolean;
429
+ overwrite?: boolean | Partial<NormalizedOverwriteOption>;
430
430
  /**
431
431
  * @description A flag to trigger codegen when there are changes in the specified GraphQL schemas.
432
432
  *
@@ -527,6 +527,10 @@ export declare namespace Types {
527
527
  */
528
528
  cwd?: string;
529
529
  }
530
+ type NormalizedOverwriteOption = {
531
+ removeStaleFiles: boolean;
532
+ updateExistingFiles: boolean;
533
+ };
530
534
  type ComplexPluginOutput<M = Record<string, unknown>> = {
531
535
  content: string;
532
536
  prepend?: string[];
@@ -257,7 +257,7 @@ export declare namespace Types {
257
257
  *
258
258
  * For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
259
259
  */
260
- overwrite?: boolean;
260
+ overwrite?: boolean | Partial<NormalizedOverwriteOption>;
261
261
  /**
262
262
  * @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
263
  * You can use one of the following:
@@ -426,7 +426,7 @@ export declare namespace Types {
426
426
  *
427
427
  * For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
428
428
  */
429
- overwrite?: boolean;
429
+ overwrite?: boolean | Partial<NormalizedOverwriteOption>;
430
430
  /**
431
431
  * @description A flag to trigger codegen when there are changes in the specified GraphQL schemas.
432
432
  *
@@ -527,6 +527,10 @@ export declare namespace Types {
527
527
  */
528
528
  cwd?: string;
529
529
  }
530
+ type NormalizedOverwriteOption = {
531
+ removeStaleFiles: boolean;
532
+ updateExistingFiles: boolean;
533
+ };
530
534
  type ComplexPluginOutput<M = Record<string, unknown>> = {
531
535
  content: string;
532
536
  prepend?: string[];