renovate 39.257.1 → 39.257.3

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.
@@ -27,9 +27,7 @@ export declare const KubernetesResource: z.ZodObject<{
27
27
  };
28
28
  kind: string;
29
29
  }>;
30
- export declare const HelmRelease: z.ZodObject<z.objectUtil.extendShape<{
31
- apiVersion: z.ZodString;
32
- kind: z.ZodString;
30
+ export declare const HelmRelease: z.ZodObject<{
33
31
  metadata: z.ZodObject<{
34
32
  name: z.ZodString;
35
33
  namespace: z.ZodOptional<z.ZodString>;
@@ -40,7 +38,7 @@ export declare const HelmRelease: z.ZodObject<z.objectUtil.extendShape<{
40
38
  name: string;
41
39
  namespace?: string | undefined;
42
40
  }>;
43
- }, {
41
+ } & {
44
42
  apiVersion: z.ZodString;
45
43
  kind: z.ZodLiteral<"HelmRelease">;
46
44
  spec: z.ZodObject<{
@@ -150,7 +148,7 @@ export declare const HelmRelease: z.ZodObject<z.objectUtil.extendShape<{
150
148
  kind?: string | undefined;
151
149
  } | undefined;
152
150
  }>;
153
- }>, "strip", z.ZodTypeAny, {
151
+ }, "strip", z.ZodTypeAny, {
154
152
  apiVersion: string;
155
153
  metadata: {
156
154
  name: string;
@@ -204,9 +202,7 @@ export declare const HelmRelease: z.ZodObject<z.objectUtil.extendShape<{
204
202
  };
205
203
  }>;
206
204
  export type HelmRelease = z.infer<typeof HelmRelease>;
207
- export declare const HelmRepository: z.ZodObject<z.objectUtil.extendShape<{
208
- apiVersion: z.ZodString;
209
- kind: z.ZodString;
205
+ export declare const HelmRepository: z.ZodObject<{
210
206
  metadata: z.ZodObject<{
211
207
  name: z.ZodString;
212
208
  namespace: z.ZodOptional<z.ZodString>;
@@ -217,7 +213,7 @@ export declare const HelmRepository: z.ZodObject<z.objectUtil.extendShape<{
217
213
  name: string;
218
214
  namespace?: string | undefined;
219
215
  }>;
220
- }, {
216
+ } & {
221
217
  apiVersion: z.ZodString;
222
218
  kind: z.ZodLiteral<"HelmRepository">;
223
219
  spec: z.ZodObject<{
@@ -230,7 +226,7 @@ export declare const HelmRepository: z.ZodObject<z.objectUtil.extendShape<{
230
226
  url: string;
231
227
  type?: "default" | "oci" | undefined;
232
228
  }>;
233
- }>, "strip", z.ZodTypeAny, {
229
+ }, "strip", z.ZodTypeAny, {
234
230
  apiVersion: string;
235
231
  metadata: {
236
232
  name: string;
@@ -254,9 +250,7 @@ export declare const HelmRepository: z.ZodObject<z.objectUtil.extendShape<{
254
250
  };
255
251
  }>;
256
252
  export type HelmRepository = z.infer<typeof HelmRepository>;
257
- export declare const HelmChart: z.ZodObject<z.objectUtil.extendShape<{
258
- apiVersion: z.ZodString;
259
- kind: z.ZodString;
253
+ export declare const HelmChart: z.ZodObject<{
260
254
  metadata: z.ZodObject<{
261
255
  name: z.ZodString;
262
256
  namespace: z.ZodOptional<z.ZodString>;
@@ -267,7 +261,7 @@ export declare const HelmChart: z.ZodObject<z.objectUtil.extendShape<{
267
261
  name: string;
268
262
  namespace?: string | undefined;
269
263
  }>;
270
- }, {
264
+ } & {
271
265
  apiVersion: z.ZodString;
272
266
  kind: z.ZodLiteral<"HelmChart">;
273
267
  spec: z.ZodObject<{
@@ -298,7 +292,7 @@ export declare const HelmChart: z.ZodObject<z.objectUtil.extendShape<{
298
292
  };
299
293
  version?: string | undefined;
300
294
  }>;
301
- }>, "strip", z.ZodTypeAny, {
295
+ }, "strip", z.ZodTypeAny, {
302
296
  apiVersion: string;
303
297
  metadata: {
304
298
  name: string;
@@ -330,9 +324,7 @@ export declare const HelmChart: z.ZodObject<z.objectUtil.extendShape<{
330
324
  };
331
325
  }>;
332
326
  export type HelmChart = z.infer<typeof HelmChart>;
333
- export declare const GitRepository: z.ZodObject<z.objectUtil.extendShape<{
334
- apiVersion: z.ZodString;
335
- kind: z.ZodString;
327
+ export declare const GitRepository: z.ZodObject<{
336
328
  metadata: z.ZodObject<{
337
329
  name: z.ZodString;
338
330
  namespace: z.ZodOptional<z.ZodString>;
@@ -343,7 +335,7 @@ export declare const GitRepository: z.ZodObject<z.objectUtil.extendShape<{
343
335
  name: string;
344
336
  namespace?: string | undefined;
345
337
  }>;
346
- }, {
338
+ } & {
347
339
  apiVersion: z.ZodString;
348
340
  kind: z.ZodLiteral<"GitRepository">;
349
341
  spec: z.ZodObject<{
@@ -371,7 +363,7 @@ export declare const GitRepository: z.ZodObject<z.objectUtil.extendShape<{
371
363
  tag?: string | undefined;
372
364
  } | undefined;
373
365
  }>;
374
- }>, "strip", z.ZodTypeAny, {
366
+ }, "strip", z.ZodTypeAny, {
375
367
  apiVersion: string;
376
368
  metadata: {
377
369
  name: string;
@@ -400,9 +392,7 @@ export declare const GitRepository: z.ZodObject<z.objectUtil.extendShape<{
400
392
  } | undefined;
401
393
  };
402
394
  }>;
403
- export declare const OCIRepository: z.ZodObject<z.objectUtil.extendShape<{
404
- apiVersion: z.ZodString;
405
- kind: z.ZodString;
395
+ export declare const OCIRepository: z.ZodObject<{
406
396
  metadata: z.ZodObject<{
407
397
  name: z.ZodString;
408
398
  namespace: z.ZodOptional<z.ZodString>;
@@ -413,7 +403,7 @@ export declare const OCIRepository: z.ZodObject<z.objectUtil.extendShape<{
413
403
  name: string;
414
404
  namespace?: string | undefined;
415
405
  }>;
416
- }, {
406
+ } & {
417
407
  apiVersion: z.ZodString;
418
408
  kind: z.ZodLiteral<"OCIRepository">;
419
409
  spec: z.ZodObject<{
@@ -441,7 +431,7 @@ export declare const OCIRepository: z.ZodObject<z.objectUtil.extendShape<{
441
431
  tag?: string | undefined;
442
432
  } | undefined;
443
433
  }>;
444
- }>, "strip", z.ZodTypeAny, {
434
+ }, "strip", z.ZodTypeAny, {
445
435
  apiVersion: string;
446
436
  metadata: {
447
437
  name: string;
@@ -470,9 +460,7 @@ export declare const OCIRepository: z.ZodObject<z.objectUtil.extendShape<{
470
460
  } | undefined;
471
461
  };
472
462
  }>;
473
- export declare const Kustomization: z.ZodObject<z.objectUtil.extendShape<{
474
- apiVersion: z.ZodString;
475
- kind: z.ZodString;
463
+ export declare const Kustomization: z.ZodObject<{
476
464
  metadata: z.ZodObject<{
477
465
  name: z.ZodString;
478
466
  namespace: z.ZodOptional<z.ZodString>;
@@ -483,7 +471,7 @@ export declare const Kustomization: z.ZodObject<z.objectUtil.extendShape<{
483
471
  name: string;
484
472
  namespace?: string | undefined;
485
473
  }>;
486
- }, {
474
+ } & {
487
475
  apiVersion: z.ZodString;
488
476
  kind: z.ZodLiteral<"Kustomization">;
489
477
  spec: z.ZodObject<{
@@ -518,7 +506,7 @@ export declare const Kustomization: z.ZodObject<z.objectUtil.extendShape<{
518
506
  newTag?: string | undefined;
519
507
  }[] | undefined;
520
508
  }>;
521
- }>, "strip", z.ZodTypeAny, {
509
+ }, "strip", z.ZodTypeAny, {
522
510
  apiVersion: string;
523
511
  metadata: {
524
512
  name: string;
@@ -549,9 +537,7 @@ export declare const Kustomization: z.ZodObject<z.objectUtil.extendShape<{
549
537
  }[] | undefined;
550
538
  };
551
539
  }>;
552
- export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
553
- apiVersion: z.ZodString;
554
- kind: z.ZodString;
540
+ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
555
541
  metadata: z.ZodObject<{
556
542
  name: z.ZodString;
557
543
  namespace: z.ZodOptional<z.ZodString>;
@@ -562,7 +548,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
562
548
  name: string;
563
549
  namespace?: string | undefined;
564
550
  }>;
565
- }, {
551
+ } & {
566
552
  apiVersion: z.ZodString;
567
553
  kind: z.ZodLiteral<"HelmRelease">;
568
554
  spec: z.ZodObject<{
@@ -672,7 +658,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
672
658
  kind?: string | undefined;
673
659
  } | undefined;
674
660
  }>;
675
- }>, "strip", z.ZodTypeAny, {
661
+ }, "strip", z.ZodTypeAny, {
676
662
  apiVersion: string;
677
663
  metadata: {
678
664
  name: string;
@@ -724,9 +710,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
724
710
  kind?: string | undefined;
725
711
  } | undefined;
726
712
  };
727
- }>, z.ZodObject<z.objectUtil.extendShape<{
728
- apiVersion: z.ZodString;
729
- kind: z.ZodString;
713
+ }>, z.ZodObject<{
730
714
  metadata: z.ZodObject<{
731
715
  name: z.ZodString;
732
716
  namespace: z.ZodOptional<z.ZodString>;
@@ -737,7 +721,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
737
721
  name: string;
738
722
  namespace?: string | undefined;
739
723
  }>;
740
- }, {
724
+ } & {
741
725
  apiVersion: z.ZodString;
742
726
  kind: z.ZodLiteral<"HelmRepository">;
743
727
  spec: z.ZodObject<{
@@ -750,7 +734,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
750
734
  url: string;
751
735
  type?: "default" | "oci" | undefined;
752
736
  }>;
753
- }>, "strip", z.ZodTypeAny, {
737
+ }, "strip", z.ZodTypeAny, {
754
738
  apiVersion: string;
755
739
  metadata: {
756
740
  name: string;
@@ -772,9 +756,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
772
756
  url: string;
773
757
  type?: "default" | "oci" | undefined;
774
758
  };
775
- }>]>, z.ZodObject<z.objectUtil.extendShape<{
776
- apiVersion: z.ZodString;
777
- kind: z.ZodString;
759
+ }>]>, z.ZodObject<{
778
760
  metadata: z.ZodObject<{
779
761
  name: z.ZodString;
780
762
  namespace: z.ZodOptional<z.ZodString>;
@@ -785,7 +767,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
785
767
  name: string;
786
768
  namespace?: string | undefined;
787
769
  }>;
788
- }, {
770
+ } & {
789
771
  apiVersion: z.ZodString;
790
772
  kind: z.ZodLiteral<"HelmChart">;
791
773
  spec: z.ZodObject<{
@@ -816,7 +798,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
816
798
  };
817
799
  version?: string | undefined;
818
800
  }>;
819
- }>, "strip", z.ZodTypeAny, {
801
+ }, "strip", z.ZodTypeAny, {
820
802
  apiVersion: string;
821
803
  metadata: {
822
804
  name: string;
@@ -846,9 +828,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
846
828
  };
847
829
  version?: string | undefined;
848
830
  };
849
- }>]>, z.ZodObject<z.objectUtil.extendShape<{
850
- apiVersion: z.ZodString;
851
- kind: z.ZodString;
831
+ }>]>, z.ZodObject<{
852
832
  metadata: z.ZodObject<{
853
833
  name: z.ZodString;
854
834
  namespace: z.ZodOptional<z.ZodString>;
@@ -859,7 +839,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
859
839
  name: string;
860
840
  namespace?: string | undefined;
861
841
  }>;
862
- }, {
842
+ } & {
863
843
  apiVersion: z.ZodString;
864
844
  kind: z.ZodLiteral<"GitRepository">;
865
845
  spec: z.ZodObject<{
@@ -887,7 +867,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
887
867
  tag?: string | undefined;
888
868
  } | undefined;
889
869
  }>;
890
- }>, "strip", z.ZodTypeAny, {
870
+ }, "strip", z.ZodTypeAny, {
891
871
  apiVersion: string;
892
872
  metadata: {
893
873
  name: string;
@@ -915,9 +895,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
915
895
  tag?: string | undefined;
916
896
  } | undefined;
917
897
  };
918
- }>]>, z.ZodObject<z.objectUtil.extendShape<{
919
- apiVersion: z.ZodString;
920
- kind: z.ZodString;
898
+ }>]>, z.ZodObject<{
921
899
  metadata: z.ZodObject<{
922
900
  name: z.ZodString;
923
901
  namespace: z.ZodOptional<z.ZodString>;
@@ -928,7 +906,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
928
906
  name: string;
929
907
  namespace?: string | undefined;
930
908
  }>;
931
- }, {
909
+ } & {
932
910
  apiVersion: z.ZodString;
933
911
  kind: z.ZodLiteral<"OCIRepository">;
934
912
  spec: z.ZodObject<{
@@ -956,7 +934,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
956
934
  tag?: string | undefined;
957
935
  } | undefined;
958
936
  }>;
959
- }>, "strip", z.ZodTypeAny, {
937
+ }, "strip", z.ZodTypeAny, {
960
938
  apiVersion: string;
961
939
  metadata: {
962
940
  name: string;
@@ -984,9 +962,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
984
962
  tag?: string | undefined;
985
963
  } | undefined;
986
964
  };
987
- }>]>, z.ZodObject<z.objectUtil.extendShape<{
988
- apiVersion: z.ZodString;
989
- kind: z.ZodString;
965
+ }>]>, z.ZodObject<{
990
966
  metadata: z.ZodObject<{
991
967
  name: z.ZodString;
992
968
  namespace: z.ZodOptional<z.ZodString>;
@@ -997,7 +973,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
997
973
  name: string;
998
974
  namespace?: string | undefined;
999
975
  }>;
1000
- }, {
976
+ } & {
1001
977
  apiVersion: z.ZodString;
1002
978
  kind: z.ZodLiteral<"Kustomization">;
1003
979
  spec: z.ZodObject<{
@@ -1032,7 +1008,7 @@ export declare const FluxResource: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnio
1032
1008
  newTag?: string | undefined;
1033
1009
  }[] | undefined;
1034
1010
  }>;
1035
- }>, "strip", z.ZodTypeAny, {
1011
+ }, "strip", z.ZodTypeAny, {
1036
1012
  apiVersion: string;
1037
1013
  metadata: {
1038
1014
  name: string;
@@ -5,7 +5,9 @@ exports.updateDependency = updateDependency;
5
5
  const logger_1 = require("../../../logger");
6
6
  const regex_1 = require("../../../util/regex");
7
7
  function getNameWithNoVersion(name) {
8
- let nameNoVersion = name.split('/').slice(0, 3).join('/');
8
+ // remove version suffixes like /v1 or /v2
9
+ let nameNoVersion = name.replace(/\/v\d+$/, '');
10
+ // gopkg.in is a special case where the major version is added with a dot rather than a slash
9
11
  if (nameNoVersion.startsWith('gopkg.in')) {
10
12
  nameNoVersion = nameNoVersion.replace((0, regex_1.regEx)(/\.v\d+$/), '');
11
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../lib/modules/manager/gomod/update.ts"],"names":[],"mappings":";;AAaA,4CAsJC;AAnKD,uBAAuB;AACvB,4CAAyC;AACzC,+CAA0D;AAG1D,SAAS,oBAAoB,CAAC,IAAY;IACxC,IAAI,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1D,IAAI,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACzC,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,IAAA,aAAK,EAAC,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,SAAgB,gBAAgB,CAAC,EAC/B,WAAW,EACX,OAAO,GACgB;IACvB,IAAI,CAAC;QACH,eAAM,CAAC,KAAK,CAAC,2BAA2B,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC5D,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QACxC,MAAM,WAAW,GAAG,OAAO,CAAC,OA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Y,CAAC,QAAQ,CAAC,eAAe,CAAC;YACtC,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,EAC5C,CAAC;YACD,IAAI,KAAK,GAAG,eAAe,CAAC;YAE5B,IAAI,OAAO,CAAC,UAAU,KAAK,OAAO,IAAI,OAAO,CAAC,QAAS,IAAI,CAAC,EAAE,CAAC;gBAC7D,KAAK,GAAG,EAAE,CAAC;YACb,CAAC;YACD,OAAO,IAAI,KAAK,CAAC;QACnB,CAAC;QACD,IAAI,OAAO,KAAK,YAAY,EAAE,CAAC;YAC7B,eAAM,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;YACrC,OAAO,WAAW,CAAC;QACrB,CAAC;QAED,IAAI,OAAO,KAAK,UAAU,EAAE,CAAC;YAC3B,OAAO,GAAG,OAAO,CAAC,OAAO,CACvB,IAAA,aAAK,EAAC,sCAAsC,CAAC,EAC7C,cAAc,CACf,CAAC;QACJ,CAAC;QAED,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC;QAChD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,kCAAkC,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["// TODO: types (#22198)\nimport { logger } from '../../../logger';\nimport { newlineRegex, regEx } from '../../../util/regex';\nimport type { UpdateDependencyConfig } from '../types';\n\nfunction getNameWithNoVersion(name: string): string {\n let nameNoVersion = name.split('/').slice(0, 3).join('/');\n if (nameNoVersion.startsWith('gopkg.in')) {\n nameNoVersion = nameNoVersion.replace(regEx(/\\.v\\d+$/), '');\n }\n return nameNoVersion;\n}\n\nexport function updateDependency({\n fileContent,\n upgrade,\n}: UpdateDependencyConfig): string | null {\n try {\n logger.debug(`gomod.updateDependency: ${upgrade.newValue}`);\n const { depType, updateType } = upgrade;\n const currentName = upgrade.depName;\n if (updateType === 'replacement') {\n logger.warn('gomod manager does not support replacement updates yet');\n return null;\n }\n /* v8 ignore next 3 -- should never happen */\n if (!currentName || !upgrade.managerData) {\n return null;\n }\n const currentNameNoVersion = getNameWithNoVersion(currentName);\n const lines = fileContent.split(newlineRegex);\n /* v8 ignore next 4 -- hard to test */\n if (lines.length <= upgrade.managerData.lineNumber) {\n logger.warn('go.mod current line no longer exists after update');\n return null;\n }\n const lineToChange = lines[upgrade.managerData.lineNumber];\n logger.trace({ upgrade, lineToChange }, 'go.mod current line');\n if (\n !lineToChange.includes(currentNameNoVersion) &&\n !lineToChange.includes('rethinkdb/rethinkdb-go.v5')\n ) {\n logger.debug(\n { lineToChange, depName: currentName },\n \"go.mod current line doesn't contain dependency\",\n );\n return null;\n }\n let updateLineExp: RegExp | undefined;\n\n if (depType === 'golang' || depType === 'toolchain') {\n updateLineExp = regEx(\n /(?<depPart>(?:toolchain )?go)(?<divider>\\s*)([^\\s]+|[\\w]+)/,\n );\n }\n if (depType === 'replace') {\n if (upgrade.managerData.multiLine) {\n updateLineExp = regEx(\n /^(?<depPart>\\s+[^\\s]+[\\s]+[=][>]+\\s+)(?<divider>[^\\s]+\\s+)[^\\s]+/,\n );\n } else {\n updateLineExp = regEx(\n /^(?<depPart>replace\\s+[^\\s]+[\\s]+[=][>]+\\s+)(?<divider>[^\\s]+\\s+)[^\\s]+/,\n );\n }\n } else if (depType === 'require' || depType === 'indirect') {\n if (upgrade.managerData.multiLine) {\n updateLineExp = regEx(/^(?<depPart>\\s+[^\\s]+)(?<divider>\\s+)[^\\s]+/);\n } else {\n updateLineExp = regEx(\n /^(?<depPart>require\\s+[^\\s]+)(?<divider>\\s+)[^\\s]+/,\n );\n }\n }\n if (updateLineExp && !updateLineExp.test(lineToChange)) {\n logger.debug('No line found to update');\n return null;\n }\n let newLine: string;\n if (upgrade.updateType === 'digest') {\n const newDigestRightSized = upgrade.newDigest!.substring(\n 0,\n upgrade.currentDigest!.length,\n );\n if (lineToChange.includes(newDigestRightSized)) {\n return fileContent;\n }\n logger.debug(\n { depName: currentName, lineToChange, newDigestRightSized },\n 'gomod: need to update digest',\n );\n newLine = lineToChange.replace(\n // TODO: can be undefined? (#22198)\n updateLineExp!,\n `$<depPart>$<divider>${newDigestRightSized}`,\n );\n } else {\n newLine = lineToChange.replace(\n // TODO: can be undefined? (#22198)\n updateLineExp!,\n `$<depPart>$<divider>${upgrade.newValue}`,\n );\n }\n if (upgrade.updateType === 'major') {\n logger.debug(`gomod: major update for ${currentName}`);\n if (currentName.startsWith('gopkg.in/')) {\n const oldV = currentName.split('.').pop();\n newLine = newLine.replace(`.${oldV}`, `.v${upgrade.newMajor}`);\n // Package renames - I couldn't think of a better place to do this\n newLine = newLine.replace(\n 'gorethink/gorethink.v5',\n 'rethinkdb/rethinkdb-go.v5',\n );\n } else if (\n upgrade.newMajor! > 1 &&\n !newLine.includes(`/v${upgrade.newMajor}`) &&\n !upgrade.newValue!.endsWith('+incompatible')\n ) {\n if (currentName === currentNameNoVersion) {\n // If package currently has no version, pin to latest one.\n newLine = newLine.replace(\n currentName,\n `${currentName}/v${upgrade.newMajor}`,\n );\n } else {\n // Replace version\n const [oldV] = upgrade.currentValue!.split('.');\n newLine = newLine.replace(\n regEx(`/${oldV}(\\\\s+)`, undefined, false),\n `/v${upgrade.newMajor}$1`,\n );\n }\n }\n }\n if (\n lineToChange.endsWith('+incompatible') &&\n !upgrade.newValue?.endsWith('+incompatible')\n ) {\n let toAdd = '+incompatible';\n\n if (upgrade.updateType === 'major' && upgrade.newMajor! >= 2) {\n toAdd = '';\n }\n newLine += toAdd;\n }\n if (newLine === lineToChange) {\n logger.debug('No changes necessary');\n return fileContent;\n }\n\n if (depType === 'indirect') {\n newLine = newLine.replace(\n regEx(/\\s*(?:\\/\\/\\s*indirect(?:\\s*;)?\\s*)*$/),\n ' // indirect',\n );\n }\n\n lines[upgrade.managerData.lineNumber] = newLine;\n return lines.join('\\n');\n } catch (err) {\n logger.debug({ err }, 'Error setting new go.mod version');\n return null;\n }\n}\n"]}
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../lib/modules/manager/gomod/update.ts"],"names":[],"mappings":";;AAeA,4CAsJC;AArKD,uBAAuB;AACvB,4CAAyC;AACzC,+CAA0D;AAG1D,SAAS,oBAAoB,CAAC,IAAY;IACxC,0CAA0C;IAC1C,IAAI,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAChD,6FAA6F;IAC7F,IAAI,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACzC,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,IAAA,aAAK,EAAC,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,SAAgB,gBAAgB,CAAC,EAC/B,WAAW,EACX,OAAO,GACgB;IACvB,IAAI,CAAC;QACH,eAAM,CAAC,KAAK,CAAC,2BAA2B,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC5D,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QACxC,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;QACpC,IAAI,UAAU,KAAK,aAAa,EAAE,CAAC;YACjC,eAAM,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;YACtE,OAAO,IAAI,CAAC;QACd,CAAC;QACD,6CAA6C;QAC7C,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YACzC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;QAC/D,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,oBAAY,CAAC,CAAC;QAC9C,sCAAsC;QACtC,IAAI,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CAAC;YACrC,OAAO,WAAW,CAAC;QACrB,CAAC;QAED,IAAI,OAAO,KAAK,UAAU,EAAE,CAAC;YAC3B,OAAO,GAAG,OAAO,CAAC,OAAO,CACvB,IAAA,aAAK,EAAC,sCAAsC,CAAC,EAC7C,cAAc,CACf,CAAC;QACJ,CAAC;QAED,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC;QAChD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,kCAAkC,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["// TODO: types (#22198)\nimport { logger } from '../../../logger';\nimport { newlineRegex, regEx } from '../../../util/regex';\nimport type { UpdateDependencyConfig } from '../types';\n\nfunction getNameWithNoVersion(name: string): string {\n // remove version suffixes like /v1 or /v2\n let nameNoVersion = name.replace(/\\/v\\d+$/, '');\n // gopkg.in is a special case where the major version is added with a dot rather than a slash\n if (nameNoVersion.startsWith('gopkg.in')) {\n nameNoVersion = nameNoVersion.replace(regEx(/\\.v\\d+$/), '');\n }\n return nameNoVersion;\n}\n\nexport function updateDependency({\n fileContent,\n upgrade,\n}: UpdateDependencyConfig): string | null {\n try {\n logger.debug(`gomod.updateDependency: ${upgrade.newValue}`);\n const { depType, updateType } = upgrade;\n const currentName = upgrade.depName;\n if (updateType === 'replacement') {\n logger.warn('gomod manager does not support replacement updates yet');\n return null;\n }\n /* v8 ignore next 3 -- should never happen */\n if (!currentName || !upgrade.managerData) {\n return null;\n }\n const currentNameNoVersion = getNameWithNoVersion(currentName);\n const lines = fileContent.split(newlineRegex);\n /* v8 ignore next 4 -- hard to test */\n if (lines.length <= upgrade.managerData.lineNumber) {\n logger.warn('go.mod current line no longer exists after update');\n return null;\n }\n const lineToChange = lines[upgrade.managerData.lineNumber];\n logger.trace({ upgrade, lineToChange }, 'go.mod current line');\n if (\n !lineToChange.includes(currentNameNoVersion) &&\n !lineToChange.includes('rethinkdb/rethinkdb-go.v5')\n ) {\n logger.debug(\n { lineToChange, depName: currentName },\n \"go.mod current line doesn't contain dependency\",\n );\n return null;\n }\n let updateLineExp: RegExp | undefined;\n\n if (depType === 'golang' || depType === 'toolchain') {\n updateLineExp = regEx(\n /(?<depPart>(?:toolchain )?go)(?<divider>\\s*)([^\\s]+|[\\w]+)/,\n );\n }\n if (depType === 'replace') {\n if (upgrade.managerData.multiLine) {\n updateLineExp = regEx(\n /^(?<depPart>\\s+[^\\s]+[\\s]+[=][>]+\\s+)(?<divider>[^\\s]+\\s+)[^\\s]+/,\n );\n } else {\n updateLineExp = regEx(\n /^(?<depPart>replace\\s+[^\\s]+[\\s]+[=][>]+\\s+)(?<divider>[^\\s]+\\s+)[^\\s]+/,\n );\n }\n } else if (depType === 'require' || depType === 'indirect') {\n if (upgrade.managerData.multiLine) {\n updateLineExp = regEx(/^(?<depPart>\\s+[^\\s]+)(?<divider>\\s+)[^\\s]+/);\n } else {\n updateLineExp = regEx(\n /^(?<depPart>require\\s+[^\\s]+)(?<divider>\\s+)[^\\s]+/,\n );\n }\n }\n if (updateLineExp && !updateLineExp.test(lineToChange)) {\n logger.debug('No line found to update');\n return null;\n }\n let newLine: string;\n if (upgrade.updateType === 'digest') {\n const newDigestRightSized = upgrade.newDigest!.substring(\n 0,\n upgrade.currentDigest!.length,\n );\n if (lineToChange.includes(newDigestRightSized)) {\n return fileContent;\n }\n logger.debug(\n { depName: currentName, lineToChange, newDigestRightSized },\n 'gomod: need to update digest',\n );\n newLine = lineToChange.replace(\n // TODO: can be undefined? (#22198)\n updateLineExp!,\n `$<depPart>$<divider>${newDigestRightSized}`,\n );\n } else {\n newLine = lineToChange.replace(\n // TODO: can be undefined? (#22198)\n updateLineExp!,\n `$<depPart>$<divider>${upgrade.newValue}`,\n );\n }\n if (upgrade.updateType === 'major') {\n logger.debug(`gomod: major update for ${currentName}`);\n if (currentName.startsWith('gopkg.in/')) {\n const oldV = currentName.split('.').pop();\n newLine = newLine.replace(`.${oldV}`, `.v${upgrade.newMajor}`);\n // Package renames - I couldn't think of a better place to do this\n newLine = newLine.replace(\n 'gorethink/gorethink.v5',\n 'rethinkdb/rethinkdb-go.v5',\n );\n } else if (\n upgrade.newMajor! > 1 &&\n !newLine.includes(`/v${upgrade.newMajor}`) &&\n !upgrade.newValue!.endsWith('+incompatible')\n ) {\n if (currentName === currentNameNoVersion) {\n // If package currently has no version, pin to latest one.\n newLine = newLine.replace(\n currentName,\n `${currentName}/v${upgrade.newMajor}`,\n );\n } else {\n // Replace version\n const [oldV] = upgrade.currentValue!.split('.');\n newLine = newLine.replace(\n regEx(`/${oldV}(\\\\s+)`, undefined, false),\n `/v${upgrade.newMajor}$1`,\n );\n }\n }\n }\n if (\n lineToChange.endsWith('+incompatible') &&\n !upgrade.newValue?.endsWith('+incompatible')\n ) {\n let toAdd = '+incompatible';\n\n if (upgrade.updateType === 'major' && upgrade.newMajor! >= 2) {\n toAdd = '';\n }\n newLine += toAdd;\n }\n if (newLine === lineToChange) {\n logger.debug('No changes necessary');\n return fileContent;\n }\n\n if (depType === 'indirect') {\n newLine = newLine.replace(\n regEx(/\\s*(?:\\/\\/\\s*indirect(?:\\s*;)?\\s*)*$/),\n ' // indirect',\n );\n }\n\n lines[upgrade.managerData.lineNumber] = newLine;\n return lines.join('\\n');\n } catch (err) {\n logger.debug({ err }, 'Error setting new go.mod version');\n return null;\n }\n}\n"]}
@@ -34,9 +34,7 @@ export declare const SveltosHelmSpec: z.ZodObject<{
34
34
  helmCharts?: any[] | undefined;
35
35
  }>;
36
36
  export type SveltosHelmSpec = z.infer<typeof SveltosHelmSpec>;
37
- export declare const ClusterProfile: z.ZodObject<z.objectUtil.extendShape<{
38
- apiVersion: z.ZodString;
39
- kind: z.ZodString;
37
+ export declare const ClusterProfile: z.ZodObject<{
40
38
  metadata: z.ZodObject<{
41
39
  name: z.ZodString;
42
40
  namespace: z.ZodOptional<z.ZodString>;
@@ -47,7 +45,7 @@ export declare const ClusterProfile: z.ZodObject<z.objectUtil.extendShape<{
47
45
  name: string;
48
46
  namespace?: string | undefined;
49
47
  }>;
50
- }, {
48
+ } & {
51
49
  apiVersion: z.ZodString;
52
50
  kind: z.ZodLiteral<"ClusterProfile">;
53
51
  spec: z.ZodObject<{
@@ -67,7 +65,7 @@ export declare const ClusterProfile: z.ZodObject<z.objectUtil.extendShape<{
67
65
  }, {
68
66
  helmCharts?: any[] | undefined;
69
67
  }>;
70
- }>, "strip", z.ZodTypeAny, {
68
+ }, "strip", z.ZodTypeAny, {
71
69
  apiVersion: string;
72
70
  metadata: {
73
71
  name: string;
@@ -93,9 +91,7 @@ export declare const ClusterProfile: z.ZodObject<z.objectUtil.extendShape<{
93
91
  helmCharts?: any[] | undefined;
94
92
  };
95
93
  }>;
96
- export declare const Profile: z.ZodObject<z.objectUtil.extendShape<{
97
- apiVersion: z.ZodString;
98
- kind: z.ZodString;
94
+ export declare const Profile: z.ZodObject<{
99
95
  metadata: z.ZodObject<{
100
96
  name: z.ZodString;
101
97
  namespace: z.ZodOptional<z.ZodString>;
@@ -106,7 +102,7 @@ export declare const Profile: z.ZodObject<z.objectUtil.extendShape<{
106
102
  name: string;
107
103
  namespace?: string | undefined;
108
104
  }>;
109
- }, {
105
+ } & {
110
106
  apiVersion: z.ZodString;
111
107
  kind: z.ZodLiteral<"Profile">;
112
108
  spec: z.ZodObject<{
@@ -126,7 +122,7 @@ export declare const Profile: z.ZodObject<z.objectUtil.extendShape<{
126
122
  }, {
127
123
  helmCharts?: any[] | undefined;
128
124
  }>;
129
- }>, "strip", z.ZodTypeAny, {
125
+ }, "strip", z.ZodTypeAny, {
130
126
  apiVersion: string;
131
127
  metadata: {
132
128
  name: string;
@@ -152,9 +148,7 @@ export declare const Profile: z.ZodObject<z.objectUtil.extendShape<{
152
148
  helmCharts?: any[] | undefined;
153
149
  };
154
150
  }>;
155
- export declare const EventTrigger: z.ZodObject<z.objectUtil.extendShape<{
156
- apiVersion: z.ZodString;
157
- kind: z.ZodString;
151
+ export declare const EventTrigger: z.ZodObject<{
158
152
  metadata: z.ZodObject<{
159
153
  name: z.ZodString;
160
154
  namespace: z.ZodOptional<z.ZodString>;
@@ -165,7 +159,7 @@ export declare const EventTrigger: z.ZodObject<z.objectUtil.extendShape<{
165
159
  name: string;
166
160
  namespace?: string | undefined;
167
161
  }>;
168
- }, {
162
+ } & {
169
163
  apiVersion: z.ZodString;
170
164
  kind: z.ZodLiteral<"EventTrigger">;
171
165
  spec: z.ZodObject<{
@@ -185,7 +179,7 @@ export declare const EventTrigger: z.ZodObject<z.objectUtil.extendShape<{
185
179
  }, {
186
180
  helmCharts?: any[] | undefined;
187
181
  }>;
188
- }>, "strip", z.ZodTypeAny, {
182
+ }, "strip", z.ZodTypeAny, {
189
183
  apiVersion: string;
190
184
  metadata: {
191
185
  name: string;
@@ -211,9 +205,7 @@ export declare const EventTrigger: z.ZodObject<z.objectUtil.extendShape<{
211
205
  helmCharts?: any[] | undefined;
212
206
  };
213
207
  }>;
214
- export declare const ProfileDefinition: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
215
- apiVersion: z.ZodString;
216
- kind: z.ZodString;
208
+ export declare const ProfileDefinition: z.ZodUnion<[z.ZodObject<{
217
209
  metadata: z.ZodObject<{
218
210
  name: z.ZodString;
219
211
  namespace: z.ZodOptional<z.ZodString>;
@@ -224,7 +216,7 @@ export declare const ProfileDefinition: z.ZodUnion<[z.ZodObject<z.objectUtil.ext
224
216
  name: string;
225
217
  namespace?: string | undefined;
226
218
  }>;
227
- }, {
219
+ } & {
228
220
  apiVersion: z.ZodString;
229
221
  kind: z.ZodLiteral<"Profile">;
230
222
  spec: z.ZodObject<{
@@ -244,7 +236,7 @@ export declare const ProfileDefinition: z.ZodUnion<[z.ZodObject<z.objectUtil.ext
244
236
  }, {
245
237
  helmCharts?: any[] | undefined;
246
238
  }>;
247
- }>, "strip", z.ZodTypeAny, {
239
+ }, "strip", z.ZodTypeAny, {
248
240
  apiVersion: string;
249
241
  metadata: {
250
242
  name: string;
@@ -269,9 +261,7 @@ export declare const ProfileDefinition: z.ZodUnion<[z.ZodObject<z.objectUtil.ext
269
261
  spec: {
270
262
  helmCharts?: any[] | undefined;
271
263
  };
272
- }>, z.ZodObject<z.objectUtil.extendShape<{
273
- apiVersion: z.ZodString;
274
- kind: z.ZodString;
264
+ }>, z.ZodObject<{
275
265
  metadata: z.ZodObject<{
276
266
  name: z.ZodString;
277
267
  namespace: z.ZodOptional<z.ZodString>;
@@ -282,7 +272,7 @@ export declare const ProfileDefinition: z.ZodUnion<[z.ZodObject<z.objectUtil.ext
282
272
  name: string;
283
273
  namespace?: string | undefined;
284
274
  }>;
285
- }, {
275
+ } & {
286
276
  apiVersion: z.ZodString;
287
277
  kind: z.ZodLiteral<"ClusterProfile">;
288
278
  spec: z.ZodObject<{
@@ -302,7 +292,7 @@ export declare const ProfileDefinition: z.ZodUnion<[z.ZodObject<z.objectUtil.ext
302
292
  }, {
303
293
  helmCharts?: any[] | undefined;
304
294
  }>;
305
- }>, "strip", z.ZodTypeAny, {
295
+ }, "strip", z.ZodTypeAny, {
306
296
  apiVersion: string;
307
297
  metadata: {
308
298
  name: string;
@@ -327,9 +317,7 @@ export declare const ProfileDefinition: z.ZodUnion<[z.ZodObject<z.objectUtil.ext
327
317
  spec: {
328
318
  helmCharts?: any[] | undefined;
329
319
  };
330
- }>, z.ZodObject<z.objectUtil.extendShape<{
331
- apiVersion: z.ZodString;
332
- kind: z.ZodString;
320
+ }>, z.ZodObject<{
333
321
  metadata: z.ZodObject<{
334
322
  name: z.ZodString;
335
323
  namespace: z.ZodOptional<z.ZodString>;
@@ -340,7 +328,7 @@ export declare const ProfileDefinition: z.ZodUnion<[z.ZodObject<z.objectUtil.ext
340
328
  name: string;
341
329
  namespace?: string | undefined;
342
330
  }>;
343
- }, {
331
+ } & {
344
332
  apiVersion: z.ZodString;
345
333
  kind: z.ZodLiteral<"EventTrigger">;
346
334
  spec: z.ZodObject<{
@@ -360,7 +348,7 @@ export declare const ProfileDefinition: z.ZodUnion<[z.ZodObject<z.objectUtil.ext
360
348
  }, {
361
349
  helmCharts?: any[] | undefined;
362
350
  }>;
363
- }>, "strip", z.ZodTypeAny, {
351
+ }, "strip", z.ZodTypeAny, {
364
352
  apiVersion: string;
365
353
  metadata: {
366
354
  name: string;
@@ -251,10 +251,10 @@ export declare const Contents: z.ZodUnion<[z.ZodObject<{
251
251
  slug: string;
252
252
  };
253
253
  }>]>;
254
- export declare const Vendir: z.ZodObject<z.objectUtil.extendShape<{
254
+ export declare const Vendir: z.ZodObject<{
255
255
  apiVersion: z.ZodLiteral<"vendir.k14s.io/v1alpha1">;
256
256
  kind: z.ZodLiteral<"Config">;
257
- }, {
257
+ } & {
258
258
  directories: z.ZodArray<z.ZodObject<{
259
259
  path: z.ZodString;
260
260
  contents: z.ZodEffects<z.ZodArray<z.ZodAny, "many">, ({
@@ -309,7 +309,7 @@ export declare const Vendir: z.ZodObject<z.objectUtil.extendShape<{
309
309
  path: string;
310
310
  contents: any[];
311
311
  }>, "many">;
312
- }>, "strip", z.ZodTypeAny, {
312
+ }, "strip", z.ZodTypeAny, {
313
313
  apiVersion: "vendir.k14s.io/v1alpha1";
314
314
  kind: "Config";
315
315
  directories: {
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
- export declare const PagedSourceResultsSchema: z.ZodObject<z.objectUtil.extendShape<{
2
+ export declare const PagedSourceResultsSchema: z.ZodObject<{
3
3
  page: z.ZodOptional<z.ZodNumber>;
4
4
  pagelen: z.ZodNumber;
5
5
  size: z.ZodOptional<z.ZodNumber>;
6
6
  next: z.ZodOptional<z.ZodString>;
7
- }, {
7
+ } & {
8
8
  values: z.ZodArray<z.ZodObject<{
9
9
  path: z.ZodString;
10
10
  type: z.ZodEnum<["commit_directory", "commit_file"]>;
@@ -28,7 +28,7 @@ export declare const PagedSourceResultsSchema: z.ZodObject<z.objectUtil.extendSh
28
28
  };
29
29
  type: "commit_directory" | "commit_file";
30
30
  }>, "many">;
31
- }>, "strip", z.ZodTypeAny, {
31
+ }, "strip", z.ZodTypeAny, {
32
32
  values: {
33
33
  path: string;
34
34
  commit: {
@@ -1,12 +1,12 @@
1
1
  import { z } from 'zod';
2
- export declare const GithubIssue: z.ZodUnion<[z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
2
+ export declare const GithubIssue: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
3
3
  number: z.ZodNumber;
4
4
  state: z.ZodEffects<z.ZodString, string, string>;
5
5
  title: z.ZodString;
6
6
  body: z.ZodString;
7
- }, {
7
+ } & {
8
8
  updatedAt: z.ZodString;
9
- }>, "strip", z.ZodTypeAny, {
9
+ }, "strip", z.ZodTypeAny, {
10
10
  number: number;
11
11
  body: string;
12
12
  state: string;
@@ -30,14 +30,14 @@ export declare const GithubIssue: z.ZodUnion<[z.ZodEffects<z.ZodObject<z.objectU
30
30
  state: string;
31
31
  updatedAt: string;
32
32
  title: string;
33
- }>, z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
33
+ }>, z.ZodEffects<z.ZodObject<{
34
34
  number: z.ZodNumber;
35
35
  state: z.ZodEffects<z.ZodString, string, string>;
36
36
  title: z.ZodString;
37
37
  body: z.ZodString;
38
- }, {
38
+ } & {
39
39
  updated_at: z.ZodString;
40
- }>, "strip", z.ZodTypeAny, {
40
+ }, "strip", z.ZodTypeAny, {
41
41
  number: number;
42
42
  body: string;
43
43
  state: string;